Page 3 of 7

Posted: Wed 08 Oct 2014, 15:51
by mavrothal
backi wrote:Could make it working with ----savefile2dir /full/path/to/savefile/savefile.2fs

Want to ask ....can this be used in other Puppies too for example "Raring" ?

Whats necessary ?
If the patches can be applied cleanly it should work.
Keep in mind that for the init patch you must expand initrd.gz, patch it and re-compress it (must be a pet somewhere in the forum that does that if you do not know how).
You will also need the freememapplet_tray pet from above and of cource the sevefile2dir script

Posted: Wed 08 Oct 2014, 16:13
by Bert
Success!

I now suddenly have 19GB to save to :D
Thanks to mavrothal.

EDIT: this may be useful for others: the savefile2dir script needs some time to do its work. Nothing appears in the terminal for maybe a minute and then 2 lines appear, indicating process is finished.

Posted: Wed 08 Oct 2014, 16:19
by backi
Thanks for your answer mavrothal

Where to place these patches ?

Posted: Wed 08 Oct 2014, 16:29
by mavrothal
Bert wrote: I now suddenly have 19GB to save to :D
Thanks to mavrothal.
Thanks, but this is gyro's work.
I just change the wrapping/packaging a bit :wink: so hopefully will be tested by more people and possible issues will be identified and solved, so it can make it to woof-CE.

Posted: Wed 08 Oct 2014, 16:35
by mavrothal
backi wrote: Where to place these patches ?
Patches are applied to files.
You need to have devx loaded to patch.

Posted: Wed 08 Oct 2014, 18:08
by backi
Thank you mavrothal .........but sorry this is beyond my understanding i have to drop

*just beginner*

Posted: Wed 08 Oct 2014, 18:12
by gyro
@mavrothal
I do appreciate the effort you are putting into this little project.

@backi
I don't expect most folk will need to apply the patches directly, rather I hope that a few folk will do exactly what mavrothal has done for precise 5.7. i.e. for a particular puppy, apply the patches and then bundle it all up, and make it readily available for others.
Of course eventually I hope it might be included in new versions of puppy.

@Bert
The utility 'savefile2dir' was developed as a test tool for creating a savefolder, because no 'shutdownconfig' supporting savefolder had yet been developed.
If a fresh frugal install is done with a puppy that contains a savefolder supporting 'shutdownconfig', then it should not be necessary to use 'savefile2dir'.

gyro

Posted: Wed 08 Oct 2014, 18:24
by backi
Hi gyro
@gyro
i don't expect most folk will need to apply the patches directly, rather I hope that a few folk will do exactly what mavrothal has done for precise 5.7. i.e. for a particular puppy, apply the patches and then bundle it all up, and make it readily available for others.
Of course eventually I hope it might be included in new versions of puppy.

Yes the option to save wether to savefile or savefolder should be included in new versions of puppy or in existing puppies make it readily available for others.

But one question ......(maybe naive ..) what could be advantage ( beside no need resizing savefile ) savefolder versus savefile ?

Cheers !

Posted: Wed 08 Oct 2014, 19:49
by mavrothal
backi wrote: Yes the option to save wether to savefile or savefolder should be included in new versions of puppy or in existing puppies make it readily available for others.
The option to save in a folder is included both in TahrPup and Slacko-6. They are currently in RC/Beta and hopefully will go final soon.
This here is a different implementation of the savefolder mechanism.

Regarding savefolder vs savefile, some people prefer savefolder because has no size limitations, while other the savefile because can be encrypted or can be used with a standard vfat USB stick of the windows file system.

savefolder vs savefolder

Posted: Thu 09 Oct 2014, 11:56
by gyro
This topic is not about savefolder vs savefile, it's about savefolder vs savefolder.
A while ago in http://murga-linux.com/puppy/viewtopic.php?t=93559 a savefolder facility was developed and added to woof-ce, and hence included in the current TahrPup and Slacko6. For more discussion about savefolder vs savefile, please refer to that topic.
This topic is about a different way of implementing savefolder, and whether it's "better" than the current one.
Currently under test is the portability of this alternate implementation of savefolder to puppies that do not use the latest woof-ce and do not have a savefolder facility. Hence mavrothal has ported it to precise 5.7. I have ported it to Dpup Wheezy 3.5.2.11.

gyro

port for raring 3.9.9.2

Posted: Thu 09 Oct 2014, 16:15
by gyro
Here's a port of this implementation of savefolder to raring 3.9.9.2.
Download http://www.fishprogs.software/puppy/raring/initrd.gz and http://www.fishprogs.software/puppy/rar ... .9.9.2.sfs.
Move them both into the directory containing a frugal install of raring 3.9.9.2. (Of course this will clobber your current 'initrd.gz'.)
Boot, and hopefully it will all work. (Did for me.)

Note1: 'freememapplet_tray' might be the wrong version. If it's needed, someone would need to patch the source of the correct version.
(I always disable 'freememapplet_tray' when I'm using savefolder, because I'm not save space paranoid any more.)

Note2: How can a zdrv patch the puppy sfs?
Because the 'init' script in this 'initrd.gz' also includes a patch to place zdrv in the aufs stack, just above the puppy sfs, not below it.
Edit: See http://murga-linux.com/puppy/viewtopic.php?t=95996 if you are interested.

gyro

Posted: Fri 10 Oct 2014, 10:55
by mavrothal
Peebee pointed into an issue with SFS_load and this implementation.
Other puppy scripts that depend on pup_rw are pmount, drive_all and frontend_funcs to mount /mnt/home to / when the entire partition is used for saving (pupmode 6), remasterpup2 and calcfreespace.sh.
Resizepfile.sh also needs the patch to drop out when using savefolder that was added in woof-CE for the other implementation.

Re: port for raring 3.9.9.2

Posted: Fri 10 Oct 2014, 15:49
by backi
gyro wrote:Here's a port of this implementation of savefolder to raring 3.9.9.2.
Download http://www.fishprogs.info/puppy/raring/initrd.gz and http://www.fishprogs.info/puppy/raring/ ... .9.9.2.sfs.
Move them both into the directory containing a frugal install of raring 3.9.9.2. (Of course this will clobber your current 'initrd.gz'.)
Boot, and hopefully it will all work. (Did for me.)


gyro
Let me tell you what i did
did as you mentioned above
made a backup of my raring-save.4sf to another place
Started Raring in ram////// shut down creating savefolder//
Started Raring again opened new savefolder //deleted its content ///openend//extracted my raring-save.4sf///copied all its content to the empty new savefolder //restarted again //

et voila after booting my old settings where rescued....except 2 or 3 simlink icons
Seems to work so far

Posted: Fri 10 Oct 2014, 15:55
by gyro
mavrothal wrote:Peebee pointed into an issue with SFS_load and this implementation.
I just tried this on raring 3.9.9.2. The problem is that sfs_load rejects any "savefile" that dosen't have a '.' in it's name. I renamed the savefolder to 'raringsave.d', and lo it worked.
Any version of savefolder would have the same problem with this old version of sfs_load. (I assume that shinobar fixed this in his savefolder patched sfs_load.)
mavrothal wrote:Other puppy scripts that depend on pup_rw are pmount, drive_all and frontend_funcs to mount /mnt/home to / when the entire partition is used for saving (pupmode 6), remasterpup2 and calcfreespace.sh.
I've had no problems with unpatched 'pmount' or 'drive_all' in raring.
It makes a difference as to exactly how they "depend on pup_rw".The only ones that should have a problem are ones that try to get information about 'pup_rw' by searching mount entries. The significant difference is that '/initrd/pup_rw' is no longer a mountpoint. But the files can still be accessed under '/initrd/pup_rw/'.
mavrothal wrote:Resizepfile.sh also needs the patch to drop out when using savefolder that was added in woof-CE for the other implementation.
Yes, 'rezizepfile.sh' is not relevant to any savefolder implementation.

gyro

calcfreespace.sh

Posted: Fri 10 Oct 2014, 16:52
by gyro
Here is a patch for 'calcfreespace.sh':

Code: Select all

--- calcfreespace.sh.orig	2013-08-14 01:07:11.000000000 +1000
+++ calcfreespace.sh	2014-10-11 02:18:36.713682298 +1000
@@ -16,7 +16,11 @@
 
 case $PUPMODE in
  3|7|13) #home partition/file mntd on pup_ro1, tmpfs on pup_rw
-  SIZEFREE=`df -k | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 4 -d ' '`
+  if [ -L /initrd/pup_ro1 ]; then
+   SIZEFREE=`df -k | grep ' /initrd/mnt/dev_save$' | tr -s ' ' | cut -f 4 -d ' '`
+  else
+   SIZEFREE=`df -k | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 4 -d ' '`
+  fi
   SIZETMP=`df -k | grep ' /initrd/pup_rw$' | tr -s ' ' | cut -f 4 -d ' '`
   #v2.21 now have true flushing for pet packages at least, so only use free space
   #in the pup_save file (pup_ro1), unless tmpfs gets too low...
@@ -24,7 +28,11 @@
   [ $SIZETMP -lt 4096 ] && SIZEFREE=$SIZETMP
   ;;
  6|12) #home partition/file mntd on pup_rw (no tmpfs)
-  SIZEFREE=`df -k | grep ' /initrd/pup_rw$' | tr -s ' ' | cut -f 4 -d ' '`
+  if [ -L /initrd/pup_rw ]; then
+   SIZEFREE=`df -k | grep ' /initrd/mnt/dev_save$' | tr -s ' ' | cut -f 4 -d ' '`
+  else
+   SIZEFREE=`df -k | grep ' /initrd/pup_rw$' | tr -s ' ' | cut -f 4 -d ' '`
+  fi
   ;;
  *)
   SIZEFREE=`df -k | grep ' /$' | tr -s ' ' | cut -f 4 -d ' '`
I did this in raring 3.9.9.2 but it will probably work on other puppies too.

In raring, I noticed a comment in the top of the code that said this script is not used anymore.

I've updated http://www.fishprogs.software/puppy/rar ... .9.9.2.sfs to include 'calcfreespace.sh'.

gyro

Re: port for raring 3.9.9.2

Posted: Fri 10 Oct 2014, 16:57
by gyro
backi wrote:Seems to work so far
I'm glad it works for you too.

Don't worry too much about my previous post, raring 3.9.9.2 might not actually use the 'calcfreespace.sh' script. But if you feel the need, just download the zdrv again and clobber the old one.

sfs_load: If you rename your savefolder by appending ".d", the old version of sfs_load in raring 3.9.9.2 will again find any sfs's in your psubdir.

gyro

Posted: Fri 10 Oct 2014, 17:17
by mavrothal
gyro wrote:
mavrothal wrote:Peebee pointed into an issue with SFS_load and this implementation.
I just tried this on raring 3.9.9.2. The problem is that sfs_load rejects any "savefile" that dosen't have a '.' in it's name. I renamed the savefolder to 'raringsave.d', and lo it worked.
Any version of savefolder would have the same problem with this old version of sfs_load. (I assume that shinobar fixed this in his savefolder patched sfs_load.)
Yes sfs_load-2.3 is working OK.

sfs_load

Posted: Fri 10 Oct 2014, 18:31
by gyro
If you don't want to rename your savefolder, or install the latest sfs_load, here is a patch:

Code: Select all

--- sfs_load.orig	2013-06-09 17:45:13.000000000 +1000
+++ sfs_load	2014-10-11 04:02:36.942885305 +1000
@@ -1851,7 +1851,11 @@
 DESTDIR=""
 if [ "$PUPSAVE" != "" ]; then
   SAVEPART=$(echo $PUPSAVE| cut -d',' -f1)
-  SAVEFILE=$(echo $PUPSAVE| cut -sd',' -f3| grep '\.') # PUPMODE=6 or 77 have not '.'
+  if [ $PUPMODE -eq 12 -o $PUPMODE -eq 13  ]; then
+    SAVEFILE=$(echo $PUPSAVE| cut -sd',' -f3)
+  else
+    SAVEFILE=$(echo $PUPSAVE| cut -sd',' -f3| grep '\.') # PUPMODE=6 or 77 have not '.'
+  fi
   [ "$PUP_HOME" != "" ] && PUPHOME=/initrd$PUP_HOME
   [ "$PUPHOME" = "/initrd$PUP_HOME" ] && PUPHOME=/mnt/home && DESTDIR=$PUPHOME
 else
I tested this this on raring 3.9.9.2.
http://www.fishprogs.software/puppy/rar ... .9.9.2.sfs has been updated to include a patch sfs_load

gyro

savefile2dir

Posted: Sat 11 Oct 2014, 18:02
by gyro
For those who have an existing savefile, I have uploaded http://www.fishprogs.software/puppy/savefile2dir.gz, a utility that converts a savefile to a savefolder. The savefile remains, but is renamed by prepending 'X' to it's name.

The file is a gziped script, download it to somewhere convenient, and gunzip it.

Ideally this utility should be run from another instance of puppy.

Then an upgrade consists of:
1) copy a patched 'initrd.gz' to frugal install directory
2) copy a ydrv (or zdrv) containing patched programs for the running system, to frugal install directory.
3) run 'savefile2dir' to convert current savefile to a savefolder.
4) Boot.

gyro

Posted: Sun 12 Oct 2014, 13:50
by mavrothal
For the latest/last update to savefolder function of precise-5.7.1 look here