That's the idea behind Factory Reset.
This script is for people who are running off a usb drive and have an existing save file in use. The save file is wiped clean without deleting it.
![Image](http://i44.tinypic.com/33dl8ax.png)
Nothing. But Factory Reset:L18L wrote:What is so difficult with
boot pfix=ram
which is Puppy's (factory) reset
Code: Select all
#!/bin/sh
######### Puppy Save file backup and restore.
savePF=`losetup /dev/loop1 |cut -d' ' -f3`
### Backup Save file.
if [ "$1" = 'backup' ];then
cp $savePF $savePF'_BU'
gzip -9 $savePF'_BU'
### Restore Save file.
elif [ "$1" = 'restore' ];then
rm $savePF
gunzip $savePF'_BU'
fi
well I have added this option to puppy for over 2 years... its solid and especially good for say a netbook using flash as the stick can be removed once booted and saves are optional. It also means the resident filesystem is not left with the dirty flag set which can be a nuisanse. Think in terms of multisession cd but from flash/harddrive.mikeb; I forget who ( SeaSide.? ), but someone here replaced the Save file with an SFS file.
I would be very keen to see a tutorial about doing this if anyone feels like making one. For some reason I have mostly stayed away from using an sfs but it sounds like your method creates a personalised sfs instead of a savefile. Is that how you use it?mikeb wrote:well I have added this option to puppy for over 2 years... its solid and especially good for say a netbook using flash as the stick can be removed once booted and saves are optional.
Yes.it sounds like your method creates a personalised sfs instead of a savefile. Is that how you use it?
If the intention is simple I did not see where this is done by the 'user'... an easy script though.I also added a link to an FR.sfs file, which will have to be created for different versions of Puppy. To do so, boot and then save right away, creating a save file. Then reboot using "puppy pfix=ram", click the savefile, and copy the files inside into a directory called FR. Delete the contents of the /root folder inside FR, then do:
Code:
dir2sfs FR FR.sfs
inside whatever folder you created the FR folder in. Put it into /mnt/home and you're done.
But would that improve the upgrade experience?greengeek wrote:This would be an interesting way to add a "service pack" to a puppy - apply the contents of a new FR.sfs file, click factory reset, and the new puppy is fresh and ready to go...
Have fun. The other 99.99% of us will continue to use savefiles while you save to your sfs. But it's a free country. (Used to be, anyway.)mikeb wrote:Actually my original 'persue the sfs approach' suggestion still stands...
The aim was not to hyjack but to provide hopefully beneficial discussion
Thanks.sunburnt wrote:"Wipe and restore" has some merit it seems.