Page 1 of 2

nicOS-Save2SFS - Saves system changes

Posted: Sun 03 Nov 2019, 15:26
by nic007

Posted: Sun 03 Nov 2019, 20:12
by nic007
Note that you should delete unnecessary stuff that may reside in your savefile (like contents of browser caches, normally in /root) before saving to ydrv/adrv because the ydrv/adrv is read-only and you can't just delete stuff from it. You will need to edit and repack it if you want to remove something from it later on.

Posted: Sun 03 Nov 2019, 20:14
by mikeslr
Thanks, nic.

Posted: Mon 04 Nov 2019, 14:55
by nic007
I've decided to also implement the ydrv in the process. See first post for details and attached zip file.

Posted: Wed 06 Nov 2019, 11:10
by nic007
Cleaned up some code and made a few adjustments. This should be the final product and replaces the previous. Added to first post.

Posted: Fri 08 Nov 2019, 06:14
by jplt3
Hello,
i tested the script under bionicpup64.8.0 and it work like a charm , great thanks.

Maybe the script should rename the savefile after it create the adrv/zdrv ?

Posted: Fri 08 Nov 2019, 07:38
by nic007
The new ydrv/adrv replaces the savefile which should be deleted. The suggestion to rename the old savefile is merely a temporarily and safety measure. Renaming it wil ensure that it is not loaded with the new ydrv/adrv and you delete it after you are happy with the new ydrv/adrv. Same method is suggested with regards to replacing old ydrv/adrv's.

Posted: Sat 09 Nov 2019, 03:23
by nic007
Changed the selection process. You choose from a dropdown box to make either a ydrv or adrv, instead of making a selection with the Yes or No buttons as previously. This makes more sense and is less confusing. There's also a Cancel button now. Uploaded to opening post, replacing the previous.

Posted: Sat 09 Nov 2019, 06:43
by jplt3
Maybe i'am out of the topic here , but i'am little lost with how sfs works !
Now with your script it's awesome to be able to create my adrv on the fly with all my modifications .
Now i want to load multiple sfs files at boot ? i really don't know how to do ?

Posted: Sat 09 Nov 2019, 07:59
by nic007
jplt3 wrote:Maybe i'am out of the topic here , but i'am little lost with how sfs works !
Now with your script it's awesome to be able to create my adrv on the fly with all my modifications .
Now i want to load multiple sfs files at boot ? i really don't know how to do ?
There are two "groups" of sfs files. The one group includes the adrv, ydrv, base sfs and zdrv which are all loaded automatically at bootup without user input (they must all be located in the same place as the base sfs).
Any other sfs files are called extra sfs files and they can be loaded as follows:
1. If you have a savefile you can specify which of them should be booted automatically at bootup: From Menu select > System > Boot Manager. They must all be located in the root directory or folder where your base sfs resides.
2. You can load them during a session using the SFS-load utility, just click on an extra sfs file for further options. In this case it does not matter where they are located.

Posted: Sat 09 Nov 2019, 15:06
by jplt3
There is an error at line 76 :

Code: Select all

 line 76: w: command not found
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

Posted: Sat 09 Nov 2019, 15:08
by jplt3
Fortunatetly i make backups !

I was playing with the script and bouuum it wipe all the partittion where to save the adrv/zdrv ????!!!!!!!!!

It's quiet strange !

Not able to duplciate this strange behaviour !

Posted: Sat 09 Nov 2019, 15:47
by nic007
jplt3 wrote:Fortunatetly i make backups !

I was playing with the script and bouuum it wipe all the partittion where to save the adrv/zdrv ????!!!!!!!!!

It's quiet strange !

Not able to duplciate this strange behaviour !
You probably selected a destination which does not have enough free space/your savefile did not have enough free space for the operation. Select a partition which does have enough space.

Posted: Sat 09 Nov 2019, 17:54
by bigpup
What affect on RAM usage does this setup have?
If everything is going to be in adrv, ydrv, zdrv, etc......
Those all get loaded into RAM.
A normal save file/folder just gets loaded into the working file system.
Becomes the location to read and write changes.

Posted: Sat 09 Nov 2019, 19:44
by zagreb999
regards to mr. nic

i used suite of mr. nic
with slacko, and it worked
perfectly....

one word: the best...


thanks!

Posted: Sat 09 Nov 2019, 21:14
by nic007
bigpup wrote:What affect on RAM usage does this setup have?
If everything is going to be in adrv, ydrv, zdrv, etc......
Those all get loaded into RAM.
A normal save file/folder just gets loaded into the working file system.
Becomes the location to read and write changes.
Puppy loads the base sfs, adrv, ydrv and zdtv into RAM by default, IF you have enough RAM. I bypass this behaviour (even though I have enough RAM) by specifying pfix=nocopy in menu.lst. In the latter case, the adrv and ydrv should have minimum effect on RAM because only the essential files (which are basically all in the original base sfs) will be needed to boot Puppy. Your adrv and ydrv created with this setup will generally contain things like installed pet packages (not essential for bootup) and some small configuration files.

Posted: Fri 15 Nov 2019, 12:44
by nic007
Another very easy and safe way to get rid of your big savefile: Boot in RAM (without your savefile) > click on your savefile to mount it > select all items in the savefile and right-click on any of the items > select Open With from the menu and then Packit (Packit should be a standard utility in all newer puppy's) > Choose to mksquashfs, the location where you want to save to (where your puppy files are), name output sfs as ydrv (the name your ydrv should be eg: ydrv_tahr_6.0.5) > your ydrv will then be created > unmount the savefile and rename it to something like 1savefile.. > reboot (choose not to create a savefile at shutdown screen).
If everything looks right after the reboot, you can delete the old savefile. At the end of your session you can then select to create a new savefile if you want to. This method could also be used as alternative to making a "remaster" for use on the same machine.

Posted: Tue 19 Nov 2019, 18:20
by belham2
Hi Nic,

Just wanted to give positive & appreciative feedback on your Save2SFS.

I've used it jrb's Precise 5.7.2 I set up on a USB stick today (I had to gave up on Racy-5.5, there's some bug with Racy and USB mounting that I am unable to overcome).

Anyhow, Save2SFS worked well in Precise 5.7.2 and allowed me to get rid of the savefile out of the frugal folder & delete it for good. Easiest way I've seen so far to literally be able to boot as RAM and have your previous savefile loaded since it is now a ydrv file.

Thanks much!

Posted: Tue 19 Nov 2019, 18:38
by nic007
belham2 wrote:Hi Nic,

Just wanted to give positive & appreciative feedback on your Save2SFS.

I've used it jrb's Precise 5.7.2 I set up on a USB stick today (I had to gave up on Racy-5.5, there's some bug with Racy and USB mounting that I am unable to overcome).

Anyhow, Save2SFS worked well in Precise 5.7.2 and allowed me to get rid of the savefile out of the frugal folder & delete it for good. Easiest way I've seen so far to literally be able to boot as RAM and have your previous savefile loaded since it is now a ydrv file.

Thanks much!
You're welcome. BTW - Did you consider to use Tahr's kernel with Racy? Anyways - Precise is a better base to work from, more scope for expansion.

Posted: Sat 23 Nov 2019, 07:38
by belham2
Hi Nic,

Sorry I didn't get back to you. No, I completely gave up on Racy, as I had forgotten the troubles I had with it long ago. As you said, Precise is a much better base to work off of, and besides, JRB has made a nifty up-to-date version of Precise (5.7.2).

I have one question about Save2SFS:

Is there any way (YAD perhaps?) a popup box can happen between when you first click the 'save2sfs.script' and until the time it finally pops up the box showing the the progress of making the new ydrv,squashfs file?

On some of my old, uber-slow computers/laptops, it can take 60-120 secs between the time of clicking the save2fs.script and the ydrv.squashfs progress popup.

Is there a popup that could say "hey, save2fs is checking the system, hold your horses before doing anything else"? or something along those lines? :wink: