Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 27 May 2020, 00:52
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Savefolder without 'mount -o bind' - works
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 9 [132 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Author Message
backi

Joined: 27 Feb 2011
Posts: 1998
Location: GERMANY

PostPosted: Wed 08 Oct 2014, 14:08    Post subject:  

Thank you mavrothal .........but sorry this is beyond my understanding i have to drop

*just beginner*
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Wed 08 Oct 2014, 14:12    Post subject:  

@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

Last edited by gyro on Thu 09 Oct 2014, 07:58; edited 1 time in total
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1998
Location: GERMANY

PostPosted: Wed 08 Oct 2014, 14:24    Post subject:  

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 !
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3107

PostPosted: Wed 08 Oct 2014, 15:49    Post subject:  

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.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Thu 09 Oct 2014, 07:56    Post subject: savefolder vs savefolder  

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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Thu 09 Oct 2014, 12:15    Post subject: port for raring 3.9.9.2  

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/raring/zdrv_raring_3.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

Last edited by gyro on Sat 21 May 2016, 21:48; edited 1 time in total
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3107

PostPosted: Fri 10 Oct 2014, 06:55    Post subject:  

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.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1998
Location: GERMANY

PostPosted: Fri 10 Oct 2014, 11:49    Post subject: Re: port for raring 3.9.9.2  

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/zdrv_raring_3.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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Fri 10 Oct 2014, 11:55    Post subject:  

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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Fri 10 Oct 2014, 12:52    Post subject: calcfreespace.sh  

Here is a patch for 'calcfreespace.sh':
Code:
--- 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/raring/zdrv_raring_3.9.9.2.sfs to include 'calcfreespace.sh'.

gyro

Last edited by gyro on Sat 21 May 2016, 21:49; edited 1 time in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Fri 10 Oct 2014, 12:57    Post subject: Re: port for raring 3.9.9.2  

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
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3107

PostPosted: Fri 10 Oct 2014, 13:17    Post subject:  

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.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Fri 10 Oct 2014, 14:31    Post subject: sfs_load  

If you don't want to rename your savefolder, or install the latest sfs_load, here is a patch:
Code:
--- 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/raring/zdrv_raring_3.9.9.2.sfs has been updated to include a patch sfs_load

gyro

Last edited by gyro on Sat 21 May 2016, 21:50; edited 1 time in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1747
Location: Brisbane, Australia

PostPosted: Sat 11 Oct 2014, 14:02    Post subject: savefile2dir  

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

Last edited by gyro on Sat 21 May 2016, 21:51; edited 1 time in total
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3107

PostPosted: Sun 12 Oct 2014, 09:50    Post subject:  

For the latest/last update to savefolder function of precise-5.7.1 look here
_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 of 9 [132 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0951s ][ Queries: 13 (0.0172s) ][ GZIP on ]