METHOD:
1. With your savefile/folder loaded run the example script below. You need to edit the directory paths and filenames in the script according to your setup if necessary. You can also run the script if you do not have an existing savefile/folder (edit the paths)
2. Your new sfs containing the contents of your savefile/folder (minus a few things excluded by the script) should now be created, check if it's there.
3. Rename your existing savefile/folder to something like 1save.
4. Select reboot from menu. Do not create a new savefile/folder. Your newly created sfs with your saved data should be loaded automatically at startup.
5. After booting, edit the script so that it reflects the correct directory paths according to your setup. Whenever you want to save something in future just run the script again. You don't need a savefile/folder anymore.
6. Delete your old savefile/folder.
7. Note that this script is an example. You can change it to suit your needs.
Code: Select all
#!/bin/sh
WrkDir="/tmp/adrv"
rm -r $WrkDir
wait
mkdir $WrkDir
cp -a /initrd/pup_a/* /initrd/pup_ro1/* /initrd/pup_rw/* $WrkDir
cd $WrkDir
rm -r ./etc ./tmp ./dev ./mnt ./initrd ./lib/modules/* ./lib/firmware/* ./usr/share/doc/* ./sys ./root/.wine/* ./root/.thumbnails/* ./root/.cache/* ./root/.Trash/* ./root/.XLOADED ./root/.pmusic ./var/log
alsactl --file /etc/asound.state store
cp -a /etc $WrkDir
rox -d $WrkDir
Xdialog -center -msgbox "Click 'OK' when ready to proceed" 0 0
mksquashfs $WrkDir /mnt/sda3/puppy605/adrv_tahr_6.0.5.sfs -noappend
rox -D $WrkDir
rm -r $WrkDir
Xdialog -center -title "SUCCESS!!!" --no-buttons -infobox "New adrv_tahr_6.0.5.sfs created. Exiting" 0 0 2000
exit
ADDITIONAL INFORMATION /TIPS:
- This method works best if you keep your sfs file with changes small. It is recommended to only save your personal settings and other small system changes with this method. Instead of installing programs, rather use sfs-addons. These additional sfs's can easily be loaded at startup with a simple command, eg: include the command, sfs_load -c -q /PathofSFStoLoad/NameOfSFS.sfs, in /etc/rc.d/rc.local OR you can load it on the fly during a session.
- If you have a big, existing savefolder/file (perhaps with programs already installed), the best would be to do a complete remaster first and then proceed with the method described here. Alternatively (if you have a newer puppy which support the ydrv) you can run the script in this post and rename the resulting sfs to that of the ydrv, eg: ydrv_tahr_6.0.5.sfs. The ydrv will be loaded automatically at startup. Thereafter you can proceed with the method of creating an adrv for your personal settings as suggested.
- Omit the Xdialog check/edit prompt in the script if not required.
- The script can be run at anytime you want to save changes (I have an icon on the desktop). If you want to save automatically at reboot/shutdown do this: Rename the shutdownconfig script in /usr/sbin to something like shutdownconfig1 (keep as backup of the original) > copy the script in this post to /usr/sbin and rename it shutdownconfig.
- Your sfs file containing your changes is read-only (unlike a savefile/folder which is read and write). The result is that you can add new folders/files to the running filesystem and edit existing files during a session and this will automatically be recorded when you save to the sfs. If, however you want to delete folders/files you will need to delete them by editing the sfs (which option is available when running the script).
Also see this thread: http://www.murga-linux.com/puppy/viewtopic.php?t=117254