The forum often has requests for a method to lock down Puppy so nothing can be changed. Many of the replies involve remastering the Live CD. Here is another procedure that may be simpler to manage.

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:

./editinit

This will unpack the initrd.gz and open it in leafpad.

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.

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.

On a default frugal install, would the lock-down procedure prevent users from saving browser bookmarks, word processing documents, etc., or are those things saved by default to /mnt/home or somewhere else outside of the pup_save file?_________________ComputerBob.com - Making Geek-Speak Chic™
News, Views, Information, Software, Help & Fun - Every Day
ComputerBob.com

That's what I suspected, but I wasn't sure. Thanks for confirming it!_________________ComputerBob.com - Making Geek-Speak Chic™
News, Views, Information, Software, Help & Fun - Every Day
ComputerBob.com

Any help please with editing the initrd.gz file? using the script fails as it relies on having leafpad which was not installed.
so I installed leafpad with no change! Leafpad is unable to read the file. (some kind of language encoding error..)

edited the file on a windows machine using notepad++ however more issues copying the script into the file where described, anyhow linux panic crashed when loading the file after repacking with 7zip.

or can the original script change to geany or has it to do with Leafpad being able to do things that Geany fail to do. Export in a particular format or something?_________________I use Google Search on Puppy Forum
not an ideal solution though

ok, watching the process I see the initrd.gz file unpacked, which creates a directory named "puppy-init" and a file named initrd the reason leaf or geany or any other text editor can not open the files is because neither file is a text file.

There are however text files buried within the directory "puppy-init" not of them are the correct file. I have previously seen the text entry we are looking for but so far have not been able to edit it..

It is my observation that the file "init" is not being unpacked correctly..

The only file which only remotely resembles the file described is one named "debug-init" ??

Both scripts unpack and repack (occasionally with some error..) however the file "init" can not be found..Last edited by Indy'spup on Sun 22 May 2011, 13:10; edited 1 time in total

As far as the local is concerned I am completely baffled and exhausted by the directory hierarchy structure despite much reading on the topic. I'm absolutely confused as to the need for so many hard links... While I fully understand symbolic linking am still trying to understand this structure.. but am going to save this for another day

Meanwhile when booted to a live cd I found the initrd.gz in /mnt/sda1/puppy520 within a fugal install, so I placed the scripts in this directory and ran them from there..Last edited by Indy'spup on Sun 22 May 2011, 13:51; edited 3 times in total

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum