The basic idea is to create a pup_save file and make a backup copy of it. Whenever Puppy is booted, the backup version is copied onto the current version. The user always starts with a pristine pup_save and any changes that are made during a session will disappear on the next boot.
Because this will involve modifying the Puppy initrd.gz file, you may want to make a backup copy in case of problems. Or, if necessary, you can boot off the Live CD and copy the original version from the CD.
The attachment below contains MU's editinit script. Unpack it and save the script in /mnt/home in the the same folder as the initrd.gz file.
Note: Your /mnt/home folder must be formatted as ext for this procedure to work. If it is a FAT or NTFS partition, copy the initrd.gz file into /root. Make the changes and copy it back to its original location.
While still in the Puppy folder, open a terminal and type the command:
Code: Select all
./editinit
Locate the line ##### FINDING PUPPY FILES ##### . In old Puppies, it will be somewhere between lines 300 and 500. In new Puppies it's closer to 700.
In the space ABOVE this line, add the following code. This example is designed for an install of Puppy 4.3.1 on partition sda1 in the folder puppy431. Its savefile is named pup_save.2fs. You will need to modify it for your particular setup.
Code: Select all
mount /dev/sda1 /mnt/data
cp /mnt/data/puppy431/pup_save.bak /mnt/data/puppy431/pup_save.2fs
umount /mnt/data
Code: Select all
mount /dev/sda2 /mnt/data
cp /mnt/data/slacko/slackosave.bak /mnt/data/slacko/slackosave.3fs
umount /mnt/data
Code: Select all
sleep 3
mount -t vfat /dev/sdb1 /mnt/data
cp /mnt/data/slackosave.bak /mnt/data/slackosave.3fs
umount /mnt/data
Reboot Puppy and verify that it still works. At the moment, nothing has changed because the pup_save.bak file does not exist yet.
Configure your Puppy install. When done, boot off the Live CD using the "puppy pfix=ram" option. Go to the Puppy folder and rename your pup_save.2fs as pup_save.bak.
Reboot normally. As a test, add or delete some files. Reboot. The original setup will be restored.
You may eventually need to modify your locked-down pup_save file. Run Puppy, make the changes and exit as usual. Boot from the Live CD with "puppy pfix=ram". Delete the old pup_save.bak. Rename the updated pup_save.2fs as pup_save.bak.
It's also easy to unlock the machine. Just delete the pup_save.bak.
This procedure should also solve the problem of unattended machines that experience a power failure and need a manual "xwin" restart.