site  contact  subhomenews

Flash: direct save to 'pup_save' file

March 10, 2009 — BarryK
The PETget package installer has a feature that saves RAM space when installing packages, when running Puppy on a USB Flash drive. The package gets installed direct to the 'pup_save' file rather than the working RAM -- the "working RAM" is a tmpfs filesystem in RAM and is the top layer of the Aufs or Unionfs layered filesystem. The 'pup_save' file is the next-layer-down.

This is an old problem, that we have been working on ever since Puppy was booting off Flash drives. The periodic save, every 30 minutes or whenever you click the "save" button on the desktop, or at shutdown, doesn't actually flush the RAM, it just copies the files down to the 'pup_save' file. We ran into problems with moving them down, as we could not reliably determine when a file was "busy".

However, one great thing that we did implement was in PETget. It installed a package direct to the 'pup_save' layer, then told the Unionfs system to flush its cache and re-evaluate the layers. Unfortunately, this works for Unionfs but not for Aufs -- the latter does not (as far as I know) have a mechanism to be told to re-evaluate everything on all the layers. Both Unionfs and Aufs have automatic mechanisms to detect file changes made directly on the layers, but they don't work reliably -- well, to qualify this, Aufs does have one extra-good mode to detect such direct changes but it imposes a heavy runtime overhead, and I have not checked the recent versions of Unionfs.

So anyway, what all of the above means is that in Puppy4 when we went over to Aufs, direct installing of packages to the 'pup_save' layer is disabled. It means the package gets installed in RAM, and you have to reboot for the RAM to get flushed.

Which is one reason why I keep an eye on the Unionfs project every now and again to see if they have fixed the problems -- like it crashing the system. Right now I'm running Intrepid Puppy with 2.6.29-rc7 kernel and Unionfs 2.5.1, and I just installed OpenOffice Writer 2.4.1, from the Ubuntu repository using the Puppy Package Manager. Lovely, it installed direct to the 'pup-save', and Writer works!

Comments

Excellent!


Download directory
Username: Leon
"In case of 'Download only' it would be fine to have an option to specify an output directory. I always create a pup_save file as small as possible and set download directory outside pup_save files whenever possible.

Another vote for a download directory option
Username: happypuppy
""I always create a pup_save file as small as possible and set download directory outside pup_save files whenever possible." I do that too,so I'd also like to have an 'output directory' option.

home everywhere
Username: Raffy
"-ditto- I favor calling that place "home". Sometimes when the user gets into the "home" drive then out, s/he lands in /initrd and could get lost. How about placing a "home" link in many places, such as in /initrd, in / as well as in /root whenever pup_save has been created/saved?


Tags: woof