sfs_load-2.4 on-the-fly

Miscellaneous tools
Message
Author
User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#301 Post by LazY Puppy »

SFS Modules loaded with shinobar's sfs_load are loaded into a lower layer, so the main SFS stays on top of all SFS Modules. To have contents of a loaded SFS Modules on top of the main SFS, there is a Script by mikeb in the second Post of this topic to load SFS Modules to a top layer.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#302 Post by mavrothal »

Sfs_load completely fails to load SFSs in pupmode 6.
Given that it now handles all the extra sfs in place of the boot manager it means that there is no way to load any extra SFSs in pupmode 6.
With the availability of savefolder, pupmode6 may not be so useful, however is still a puppy mode...
So would be nice if it is fixed or atleast stop handling SFSs in pupmode 6 and allow the job to be done by the bootmanager with something like this

Code: Select all

--- a/etc/init.d/sfs_load	2014-07-22 11:11:10.000000000 +0300
+++ b/etc/init.d/sfs_load	2015-01-28 11:23:11.000000000 +0200
@@ -1,5 +1,7 @@
 #!/bin/sh
 which sfs_load &>/dev/null || exit 0
+. /etc/rc.d/PUPSTATE 
+[ "$PUPMODE" = "6" ] && exit 0
 if [ "$1" = "stop" ] ; then
   exec sfs_load --cli stop
 fi
(actually it works fine to load SFSs with the bootmanager at startup)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#303 Post by ASRI éducation »

To facilitate the participation of French-speaking users, I created a thread sfs_load on-the-fly : contributions et améliorations
Regards,
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#304 Post by ASRI éducation »

I use a lot of sfs files.

This prompts me to propose some changes to the main interface of sfs_load.

- Increasing the size of the interface.
- Added information "number of sfs mounted".
- For the list of mounted sfs, use of a "table" (instead of "list") to sort the list alphabetically.

If you want to test ...

Regards
Attachments
sfs_load_84_mounted.png
(75.74 KiB) Downloaded 959 times
sfs_load_20150215.tar.gz
/usr/sbin/sfs_load (version 20150215)
(28.89 KiB) Downloaded 367 times
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#305 Post by ASRI éducation »

The limit of Puppy mount points (pup_ro *) seems to be 125. This is obviously more than we need.

More information on the French forum http://www.murga-linux.com/puppy/viewto ... 648#828648

Regards,
Attachments
sfs_load_122_mounted.png
(132.63 KiB) Downloaded 891 times
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#306 Post by Argolance »

Bonsoir,
I updated sfs_load 1.9.7 coming with Puppy Precise 5.7.1 while installing the latest release 2.3. My nvidia-glx-319.43.k3.2.29.sfs file driver doesn't load anymore and Puppy freezes at startup. So I cannot see exactly what's going wrong while reading the xerrs.log or any other system tmp file!
If I "uninstall" sfs_load 2.3 (i. e. delete manually files directly from my pupsave file) nvidia driver is normally loaded and works fine again.

Cordialement..

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#307 Post by LazY Puppy »

RSH wrote:Hi.

I have to post an issue in sfs_load 2.0.2 which I did experience already in version 1.9.9.

If having a SFS loaded and removing some files (I did try to remove some files from /usr/share/applications and also from /usr/local/bin), those removed files re-appear in the running OS when unloading the loaded SFS files.

I did try this in several Puppies with several files - same results.

Though, it seems not to happen with files that are only changed (changed its content e.g.).

RSH
Hi.

This seems to be gone in sfs_load 2.3 (did not test any different version since 2.0.2).

Thanks.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

Pelo

On the fly

#308 Post by Pelo »

On the fly is for the session time,
If usage done is different, if SFS are to be permanent, it's a different pet. Or it should be.
It's my opinion.
Sorry ASRI,.. :?

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

he can't automatically detect my /usr/local/texlive dir

#309 Post by recobayu »

Hi All, I make a texlive2014.sfs.
My binary files located at /usr/local/texlive/2014/bin/i386-linux.
I try to use pinstall.sh inside of that (just like in .pet).
The script is:

Code: Select all

export PATH=$PATH:/usr/local/texlive/2014/bin/i386-linux
But when i do install this sfs on the fly, puppy can't detect my path locate on.
Can anyone help me how to solve that?

*if I manually add that code to /root/.bashrc, it's work only when I run geany from terminal. :(

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

Re: he can't automatically detect my /usr/local/texlive dir

#310 Post by LazY Puppy »

recobayu wrote:Hi All, I make a texlive2014.sfs.
My binary files located at /usr/local/texlive/2014/bin/i386-linux.
I try to use pinstall.sh inside of that (just like in .pet).
The script is:

Code: Select all

export PATH=$PATH:/usr/local/texlive/2014/bin/i386-linux
But when i do install this sfs on the fly, puppy can't detect my path locate on.
Can anyone help me how to solve that?

*if I manually add that code to /root/.bashrc, it's work only when I run geany from terminal. :(
Just put the pinstall.sh File (probably rename it first) into /root/Startup inside of the SFS - sfs_load will execute such located files from /root/Startup inside of the SFS.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#311 Post by mavrothal »

Looked a bit further on the failure of v2.3 at pupmode=6.
It would appear that the condition

Code: Select all

&& [ "$FILEISAT" != "home" ] 
at line 2453 results in the failure.
I would guess because in pupmode 6, $(readlink /mnt/home) points to "/" instead of "/initrd/pup_rw".
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#312 Post by mavrothal »

mavrothal wrote:I would guess because in pupmode 6, $(readlink /mnt/home) points to "/" instead of "/initrd/pup_rw".
Indeed the following ugly hack makes sfs_load 2.3 work in pupmode 6

Code: Select all

--- a/usr/sbin/sfs_load	2014-09-06 11:44:34.000000000 +0300
+++ b/usr/sbin/sfs_load	2015-04-08 10:44:48.000000000 +0300
@@ -51,6 +51,8 @@
 #v2.1.9: fix loop device conflict with irregular initramfs
 #2014-08-10 v2.2: fix was removed all sfs after abnormal shutdown
 #2014-09-06 v2.3: fix again save-to-directry, avoid always mounted puppy sfs partition under PUPMODE=5  
+[ "$(grep PUPMODE /etc/rc.d/PUPSTATE | cut -f2 -d '=')" = "6" ] && \
+ rm /mnt/home && ln -sf /initrd/pup_rw /mnt/home 
 MYPATH=$0
 MYNAME=$(basename "$0")
 VERSION=2.3
@@ -188,6 +190,8 @@
   case "$1" in
   --usage) shift
    [ "$@" ] && error "$@"
+   [ "$(grep PUPMODE /etc/rc.d/PUPSTATE | cut -f2 -d '=')" = "6" ] && \
+    rm /mnt/home && ln -sf / /mnt/home
    usage; exit 1;;
   esac 
   error "fatal:$*"
@@ -197,6 +201,8 @@
 }
 finish() {
  splash --stop
+ [ "$(grep PUPMODE /etc/rc.d/PUPSTATE | cut -f2 -d '=')" = "6" ] && \
+  rm /mnt/home && ln -sf / /mnt/home
  [ "$UNMOUNTME" ] && umount "$UNMOUNTME" && UNMOUNTME=""
  [ "$REENT" = "" ] && exit 0
  [ -x "$MYPATH" ] && exec "$MYPATH" $ORGOPT --quiet
However, a proper solution should be developed for proper $DESDIR detection in pupmode 6
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#313 Post by mavrothal »

Another approach that also works in pupmode 2 is to remove hard-coded paths, as the below patch does:

Code: Select all

--- a/usr/sbin/sfs_load	2014-09-06 11:44:34.000000000 +0300
+++ b/usr/sbin/sfs_load	2015-04-08 14:36:26.000000000 +0300
@@ -1559,7 +1559,7 @@
   [ "$EXT" = "sfs" ] || FILENAME="$FILENAME.sfs"
   # /mnt/home?
   if [ "$PUP_HOME" != "" -a "$DIRNAME" != "" ]; then
-    DIRNAME=$(echo $DIRNAME| sed -e "s,/initrd$PUP_HOME,/mnt/home,")
+    DIRNAME=$(echo $DIRNAME| sed -e "s,$INITRDHOME,$MNTHOME,")
   fi
   EXTRASFS="$DIRNAME/$FILENAME"
 }
@@ -1831,6 +1831,14 @@
   esac
 fi ############ for debugging end
 
+if [ "$PUPMODE" = "6" ];then
+ INITRDHOME=/
+ MNTHOME=/
+else
+ INITRDHOME=/initrd$PUP_HOME
+ MNTHOME=/mnt/home
+fi
+
 # see what pup_*.sfs file is used
 SFSPART=$(echo $PUPSFS|cut -d',' -f1)
 SFSTYPE=$(echo $PUPSFS|cut -s -d',' -f2)
@@ -1899,8 +1907,8 @@
   12|13) SAVEFILE=$(echo $PUPSAVE| cut -sd',' -f3);;
   *) SAVEFILE="";;
   esac
-  [ "$PUP_HOME" != "" ] && PUPHOME=/initrd$PUP_HOME
-  [ "$PUPHOME" = "/initrd$PUP_HOME" ] && PUPHOME=/mnt/home && DESTDIR=$PUPHOME
+  [ "$PUP_HOME" != "" ] && PUPHOME=$INITRDHOME
+  [ "$PUPHOME" = "$INITRDHOME" ] && PUPHOME=$MNTHOME && DESTDIR=$PUPHOME
 else
   # PUPMODE=2 or 5
   if [ "$PUPMODE" = "2" ]; then
@@ -2326,8 +2334,8 @@
   case "$DIRNAME" in
   http://*|ftp://*) FILEISAT="url" ;;
   /mnt/cdrom*|/mnt/dvd*|/mnt/sr*) FILEISAT="cd";;
-  /mnt/home/$PSUBDIR) FILEISAT="home";;
-  /mnt/home) FILEISAT="home";;
+  $MNTHOME/$PSUBDIR) FILEISAT="home";;
+  $MNTHOME) FILEISAT="home";;
   /tmp*) FILEISAT="tmpfs";;
   $DESTDIR|$DESTDIR/$PSUBDIR) FILEISAT="home";;
   /mnt/network/*) FILEISAT="remote";;
@@ -2410,7 +2418,7 @@
   #TITLEICON='icon-name="gtk-add"'
   confirm "$MSG\n$WARNSHORT" || finish
 fi
-[ "$(readlink /mnt/home)" = "$DESTDIR" ] && DESTDIR=/mnt/home
+[ "$(readlink $MNTHOME)" = "$DESTDIR" ] && DESTDIR=$MNTHOME
 
 # free space in the destination
 dest_free
@@ -2457,7 +2465,7 @@
     done
     if [ "$FOUND" != "" ]; then
       debug "FOUND=$FOUND;"
-      [ "$(readlink /mnt/home)" = "$D" ] && FOUND="/mnt/home/$FILENAME"
+      [ "$(readlink $MNTHOME)" = "$D" ] && FOUND="$MNTHOME/$FILENAME"
       MSG=$(printf "$(gettext "%s is found. Do you use it?")" $FOUND)
       confirm $MSG || finish
       EXTRASFS="$FOUND"
However, altough both this and the above patch load sfs fine, they fail to loaf the extra sfs at boot time, reporting the sfs_load is already running. :?
Hints anyone?

PS: Combining this patch with the one for the init.d above allows proper loading at boot, but it still indicates that there is something wrong.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#314 Post by mavrothal »

Here are 2 sfs_load pets that should work fine in pupmode 6 (save to partition) and of course in the other pupmodes.

2.3.1 has the /mnt/home link-change approach, while 2.3.2 has the /mnt/home and /initrd$PUP_HOME soft-coding approach. Both pets stop sfs_load from handling extra SFSs at boot time in pupmode=6

2.3.1 is simpler but if it crashes midway may leave you with the wrong symlink for /mnt/home. This is (usually) harmless, It will just make your boot drive to look like one in a frugal install, till reboot.
2.3.2 seams better but a bit more involved so might have some issue in some setting.
I currently have 2.3.2 in my systems :wink:

Both could use some testing in pupmode 6 but also in other pupmodes. So please test if you can.
Attachments
sfs_load-2.3.2.pet
/mnt/home and /initrd$PUP_HOME soft-coding in pupmode 6
(34.79 KiB) Downloaded 303 times
sfs_load-2.3.1.pet
symlink /mnt/home in pupmode 6
(34.54 KiB) Downloaded 240 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#315 Post by mavrothal »

mavrothal wrote: Both could use some testing in pupmode 6 but also in other pupmodes. So please test if you can.
Anybody with pupmode 6?... :(
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: sfs_load-2.3.2 on pupmode=13

#316 Post by shinobar »

tnx mavrothal.
i am using sfs_load-2.3.2 on PUPMODE=13 and working with no problem so far.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#317 Post by mavrothal »

Thx
Any ideas how to adapt it for pupmode 2?
It should be possible as aufs is there just the same.
Is it worth trying to integrate it with the current or maybe write a new script and have it called from sfs_load?
Best
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#318 Post by Argolance »

Bonjour,
:arrow: Please take a look around this thread...

sfs_load (2.3.2) seems to generate a (wrong) path starting with '/initrd/initrd/' (pupmode 5)

Cordialement.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#319 Post by mavrothal »

Argolance wrote:Bonjour,
:arrow: Please take a look around this thread...

sfs_load (2.3.2) seems to generate a (wrong) path starting with '/initrd/initrd/' (pupmode 5)

Cordialement.
I did
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#320 Post by ASRI éducation »

sfs_load-2.3.0.pet

I used the latest version of shinobar 'sfs_load-2.3.pet (2014-09-06)'.
I have not integrated the mavrothal changes (v2.3.1/2.3.2) because testing is not finished.

Proposed changes for /usr/sbin/sfs_load
#20150706 v2.3.0 by ASRI: Increase the size of main GUI # Add info "number of sfs mounted" # For the list of mounted sfs, use a "table" (instead of "list") to sort the list alphabetically # Add button refresh

Regards

Code: Select all

--- ./sfs_load_2.3	2014-09-06 10:44:34.000000000 +0200
+++ ./sfs_load_2.3.0	2015-07-07 16:06:31.000000000 +0200
@@ -51,9 +51,10 @@
 #v2.1.9: fix loop device conflict with irregular initramfs
 #2014-08-10 v2.2: fix was removed all sfs after abnormal shutdown
 #2014-09-06 v2.3: fix again save-to-directry, avoid always mounted puppy sfs partition under PUPMODE=5  
+#20150706 v2.3.0 by ASRI: Increase the size of main GUI # Add info "number of sfs mounted" # For the list of mounted sfs, use of a "table" (instead of "list") to sort the list alphabetically # Add button refresh
 MYPATH=$0
 MYNAME=$(basename "$0")
-VERSION=2.3
+VERSION=2.3.0
 ORGOPT="$@"
 #some options the puplet builder can choose
 WIPEWHITEONINIT="true"	# true/false
@@ -761,7 +762,18 @@
 }
 main_dialog() {
 	waitsplash $(gettext "Probing...")
-	BOXHEIGHT=150
+	BOXHEIGHT1=300
+	BOXWIDTH=650
+	TEXTWIDTH=580
+	TEXTWIDTHCHARS=30
+		list="/tmp/sfs_load/loop_device_list"
+		cntsfsloaded=0
+		while read LINE
+		do
+			if [ "$LINE" != "" ]; then
+				cntsfsloaded=`expr $cntsfsloaded + 1`
+			fi
+		done < "$list"
 	LOADVISIBLE="enabled"
 	UNLOADVISIBLE="eabled"
 	if [ "$ACTION" = "unload" ]; then
@@ -793,8 +805,9 @@
 	UNLOADCOMBO=""
 	if [ "$ALREADY_SFS_LIST" != "" ]; then
 	  UNLOADABLE="enabled"
-	  UNLOADCOMBO='<list tooltip-text="'$(gettext "Select the sfs file you want to unload.")'">
-	  <variable>UNLOADSFS</variable>'$(make_combo $ALREADY_SFS_LIST)'<visible>'$UNLOADVISIBLE'</visible></list>'
+	  UNLOADCOMBO='<table tooltip-text="'$(gettext "Select the sfs file you want to unload.")'">
+	  <label>'$(gettext 'Total of mounted SFS =')' '$cntsfsloaded'</label>
+	  <variable>UNLOADSFS</variable>'$(make_combo $ALREADY_SFS_LIST)'<visible>'$UNLOADVISIBLE'</visible></table>'
 	  [ "$QUEUELIST" ] && UNLOADCOMBO="$UNLOADCOMBO
 	  "'<text><input>echo -en "'$(gettext "Some are not loaded but in the queue.")'"</input></text>'
 	else
@@ -804,10 +817,10 @@
 	DIALOG='<window title="'$LONG_TITLE'"><vbox>
     <hbox>
     <pixmap><input file>'$MYICON'</input></pixmap>
-	<text width-chars="40"><input>echo -en "'$(gettext "You can load or unload extra SFS files on-the-fly.")'"</input></text>
+	<text width-chars="'$TEXTWIDTHCHARS'" width-request="'$TEXTWIDTH'"><input>echo -en "'$(gettext "You can load or unload extra SFS files on-the-fly.")'"</input></text>
    </hbox>
-	<hbox><frame '$(gettext "Load SFS")'>
-	<vbox height-request="'$BOXHEIGHT'">
+	<hbox width-request="'$BOXWIDTH'"><frame '$(gettext "Load SFS")'>
+	<vbox height-request="'$BOXHEIGHT1'">
    '"$LOADCOMBO
 	$WRONGTEXT"'
 	</vbox>
@@ -816,7 +829,7 @@
 	<action>EXIT:Load</action><visible>'$LOADVISIBLE'</visible></button>
 	</frame>
 	<frame '$(gettext "Unload SFS")'>
-	<vbox height-request="'$BOXHEIGHT'">
+	<vbox height-request="'$BOXHEIGHT1'">
    '$UNLOADCOMBO'
     </vbox>
      <button tooltip-text="'$(gettext "Which SFS do you want to unload?")' '$(gettext "Click here after you choose the extra sfs file.")'">
@@ -825,7 +838,8 @@
 
     </frame></hbox>
     <hbox>
-     <button><label>'$(gettext 'Quit')'</label><input file stock="gtk-quit"></input><action>EXIT:Abort</action></button>
+     <button tooltip-text="'$(gettext "Refresh list of loaded sfs.")'"><input file stock="gtk-refresh"></input><action>sfs_load &</action><action>EXIT:Abort</action></button>
+     <button tooltip-text="'$(eval_gettext "Quit $TITLE v$VERSION.")'"><input file stock="gtk-quit"></input><action>EXIT:Abort</action></button>
     </hbox>
 	</vbox></window>'
 	waitsplash --stop
Attachments
sfs_load-2.3.0.pet
md5 ac2aaf2b4d6831f6923dd70ba39d9f31
(33.94 KiB) Downloaded 345 times
sfs_load-2.3.0.jpg
(48.7 KiB) Downloaded 836 times
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

Post Reply