nicOS-Save2SFS - Saves system changes

Miscellaneous tools
Message
Author
User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

nicOS-Save2SFS - Saves system changes

#1 Post by nic007 »

Last edited by nic007 on Tue 31 Mar 2020, 11:53, edited 9 times in total.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#2 Post 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.
Last edited by nic007 on Thu 07 Nov 2019, 00:39, edited 2 times in total.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#3 Post by mikeslr »

Thanks, nic.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#4 Post by nic007 »

I've decided to also implement the ydrv in the process. See first post for details and attached zip file.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#5 Post 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.

User avatar
jplt3
Posts: 118
Joined: Mon 08 Apr 2019, 20:40
Location: Planet Earth

#6 Post 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 ?

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#7 Post 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.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#8 Post 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.

User avatar
jplt3
Posts: 118
Joined: Mon 08 Apr 2019, 20:40
Location: Planet Earth

#9 Post 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 ?

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#10 Post 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.

User avatar
jplt3
Posts: 118
Joined: Mon 08 Apr 2019, 20:40
Location: Planet Earth

#11 Post 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]

User avatar
jplt3
Posts: 118
Joined: Mon 08 Apr 2019, 20:40
Location: Planet Earth

#12 Post 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 !

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#13 Post 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.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#14 Post 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.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

zagreb999
Posts: 567
Joined: Fri 11 Apr 2014, 06:39
Location: Yugoslavija

#15 Post by zagreb999 »

regards to mr. nic

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

one word: the best...


thanks!

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#16 Post 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.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#17 Post 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.

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#18 Post 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!

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#19 Post 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.

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#20 Post 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:

Post Reply