Page 16 of 19

Posted: Wed 14 Jan 2015, 20:20
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.

Posted: Wed 28 Jan 2015, 09:19
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)

Posted: Sat 14 Feb 2015, 22:28
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,

Posted: Sun 15 Feb 2015, 11:36
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

Posted: Sun 15 Feb 2015, 20:49
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,

Posted: Sun 08 Mar 2015, 19:07
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..

Posted: Thu 12 Mar 2015, 17:12
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.

On the fly

Posted: Fri 13 Mar 2015, 03:04
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,.. :?

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

Posted: Sat 14 Mar 2015, 02:01
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. :(

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

Posted: Sat 14 Mar 2015, 15:14
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.

Posted: Tue 07 Apr 2015, 17:20
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".

Posted: Wed 08 Apr 2015, 07:55
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

Posted: Wed 08 Apr 2015, 11:54
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.

Posted: Wed 08 Apr 2015, 13:28
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.

Posted: Wed 15 Apr 2015, 03:16
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?... :(

Re: sfs_load-2.3.2 on pupmode=13

Posted: Fri 17 Apr 2015, 22:38
by shinobar
tnx mavrothal.
i am using sfs_load-2.3.2 on PUPMODE=13 and working with no problem so far.

Posted: Sat 18 Apr 2015, 05:40
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

Posted: Fri 05 Jun 2015, 09:58
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.

Posted: Fri 05 Jun 2015, 10:35
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

Posted: Wed 08 Jul 2015, 15:14
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