Setting save file to read only
Setting save file to read only
I would like to prevent changes made during a session from being saved for the next session. Since the saving does not prompt the user, will setting the file to read only help? I assume this will produce an error, atleast, so is there a more polite way to bypass this step during shutdown?
It might help if you told us how you're using Puppy (i.e., full install, frugal install, live CD with a save file on hd, etc.)
I would be remiss if I didn't point out that if you ran Puppy from a multisession DVD the answer to your question would be obvious.
I would be remiss if I didn't point out that if you ran Puppy from a multisession DVD the answer to your question would be obvious.
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69321][color=blue]Puppy Help 101 - an interactive tutorial for Lupu 5.25[/color][/url]
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
There's a thread going on now about something similar. The main idea is to load Puppy ENTIRELY into ram, and optionally save back to the harddrive on shutdown (Puppy currently only loads the original files into ram, not the changes the user makes). I posted some files in it that let you modify a 4.00 install to behave this way, though they're far from properly tested, and require that you either have a frugal install or are willing to modify the iso and burn a new cd. There has also been at least one other method posted in the thread besides mine.
I think a multisession install would let you do this, but you'd have to either have a cd burner on the machine you want to use, or go to the thread I mentioned above and try that alternate method, the one Hairy Will posted, which lets you use multisession on the harddrive.
Another method would be to do (or trick Puppy into thinking you did) an install on flash media, then disabling the daemon that auto-saves periodically along with putting a dialog into the save-on-reboot to make it optional. Then the existing files in pup_save.2fs would be read from the drive normally, but any new ones would be stored in ram until you save. If you don't save, they are discarded.
I think a multisession install would let you do this, but you'd have to either have a cd burner on the machine you want to use, or go to the thread I mentioned above and try that alternate method, the one Hairy Will posted, which lets you use multisession on the harddrive.
Another method would be to do (or trick Puppy into thinking you did) an install on flash media, then disabling the daemon that auto-saves periodically along with putting a dialog into the save-on-reboot to make it optional. Then the existing files in pup_save.2fs would be read from the drive normally, but any new ones would be stored in ram until you save. If you don't save, they are discarded.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
Re: Setting save file to read only
I can't answer beyond the information in your query, whichhtnakirs wrote:I would like to prevent changes made during a session from being saved for the next session. Since the saving does not prompt the user, will setting the file to read only help? I assume this will produce an error, atleast, so is there a more polite way to bypass this step during shutdown?
is limited at best.
If the host file system is a Microsoft file system, I don't
think it supports the Linux attributes necessary to make
the pup_save file Linux read only.
Not knowing what type of file system you put your
pup_save file on, I certainly don't know if you could get to
first base with the idea of making it read only.
IF your pup_save file were on a Linux file system, you could
make it read only. AND IF the pup_save were on a hard disk,
it would not even boot IF read only.
I assumed installing to and booting from Flash drives was the most popular method of using Puppy. I apologise.
I' booting from a Flash drive, formatted using the Combo format option ( 128 MB FAT 16 drive with Puppy files and rest of the space as ext2 parition).
Pizza : What is this autosave daemon that you refer to and where can I disable it?
I' booting from a Flash drive, formatted using the Combo format option ( 128 MB FAT 16 drive with Puppy files and rest of the space as ext2 parition).
Pizza : What is this autosave daemon that you refer to and where can I disable it?
I don't think an apology is in order unless you did somethinghtnakirs wrote:I assumed installing to and booting from Flash drives was the most popular method of using Puppy. I apologise.
wrong and I don't think you did.
Flash sticks are common places to put a pup_save file, but
when these devices are used, the most common file system
is FAT - thus throwing a wrench in the works, because who
knows how to set a file Linux read only on a FAT file system?
Thus specificity is required on your part to accomplish
testing your idea.
1) the feasibility of setting pup_save read only
2) the test run, will it work?
---------------------------------------
Anyway, I wanted to see the results of your question in my
environment: A Linux files system which is requisite and the
test.
Results of the proof of concept: Puppy bites hard, punishes
you with bloody red messages and 60 second delays. Then
finishes you off growls followed by a full kennel panic!
-
- Posts: 7
- Joined: Sat 09 May 2009, 06:16
How to prevent puppy to save any session changes
Hello everyone,
I been struggling to get any straight forward information on how to setup my puppy system to not write anything to the save files.
Here is the problem I am trying to solve:
My puppy system runs on a very small PC ebox that has flash IDE compact flash slot. Once the system is setup, there is no need for making and saving any changes to the flash drive.
The PC runs without a screen or keyboard and can be powered off any time. Hence, often it complains when rebooted that previous session was not properly saved.
I just want it to boot from a "read only" image, so it boot fresh every time even if the power was pulled without proper shutdown.
My application itself may need to save a running logfile every s often but I would rather choose the clean reboot every time over having to save a logfile if the system would have to be made completely read only.
Thanks so much for your help.
JY
I been struggling to get any straight forward information on how to setup my puppy system to not write anything to the save files.
Here is the problem I am trying to solve:
My puppy system runs on a very small PC ebox that has flash IDE compact flash slot. Once the system is setup, there is no need for making and saving any changes to the flash drive.
The PC runs without a screen or keyboard and can be powered off any time. Hence, often it complains when rebooted that previous session was not properly saved.
I just want it to boot from a "read only" image, so it boot fresh every time even if the power was pulled without proper shutdown.
My application itself may need to save a running logfile every s often but I would rather choose the clean reboot every time over having to save a logfile if the system would have to be made completely read only.
Thanks so much for your help.
JY
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
Just make a remaster that includes all the changes you need, and maybe disable the part that asks you to create a new savefile on shutdown. Then you don't need a savefile because your changes will be built in.
I can't help much with the actual usage of the remaster script as I never use it. I prefer Unleashed, but unless customizing it is a big long-term project Unleashed is going to be overkill for you. I can warn you that sometimes the remaster script won't include certain changes by default because it tries to make a hardware independent Puppy. So if that happens, there is a moment in the script where it lets you go into a directory in /tmp and manually add anything it missed in case you want to force it to work how you want.
The reason you might want to disable the prompt for creating a savefile is so it will shutdown faster and simpler, and so you don't accidentally creaete one. You can do that by modifying /etc/rc.d/rc.shutdown and changing the lines that look like this:
to be like this:
Puppy never sets $PUPMODE to 555, so that will never evaluate to true.
You have to make that change before remastering, of course, and make sure it's actually included.
If you want to have it save a log, you could tell it to mount the drive (if not already mounted) and save it to that, without a save file.
I can't help much with the actual usage of the remaster script as I never use it. I prefer Unleashed, but unless customizing it is a big long-term project Unleashed is going to be overkill for you. I can warn you that sometimes the remaster script won't include certain changes by default because it tries to make a hardware independent Puppy. So if that happens, there is a moment in the script where it lets you go into a directory in /tmp and manually add anything it missed in case you want to force it to work how you want.
The reason you might want to disable the prompt for creating a savefile is so it will shutdown faster and simpler, and so you don't accidentally creaete one. You can do that by modifying /etc/rc.d/rc.shutdown and changing the lines that look like this:
Code: Select all
#first time booted puppy, there may not have been any persistent storage.
if [ $PUPMODE -eq 5 ];then #ifpupmode5
Code: Select all
#first time booted puppy, there may not have been any persistent storage.
if [ $PUPMODE -eq 555 ];then #ifpupmode5
You have to make that change before remastering, of course, and make sure it's actually included.
If you want to have it save a log, you could tell it to mount the drive (if not already mounted) and save it to that, without a save file.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
If that's a question, multisession Puppy is the answer.
Burn Puppy onto a DVD, preferably with Menu -> Multimedia -> Burniso2cd, to create a multisession DVD. Other burning programs, such as Pburn, can also burn a multisession DVD, but Burniso2cd is the simplest way for a beginner to make sure you get what you expect. Rewritable DVDs work fine.
Burn Puppy onto a DVD, preferably with Menu -> Multimedia -> Burniso2cd, to create a multisession DVD. Other burning programs, such as Pburn, can also burn a multisession DVD, but Burniso2cd is the simplest way for a beginner to make sure you get what you expect. Rewritable DVDs work fine.
@ Flash
Not so much a question but thanks for the suggestion.
A multisession DVD can work for me but still needs similar tweaking.
A vanilla puppy multisession dvd saves each session unless you explicitly select not too. This provides opportunity to alter the state of the OS and leaves a saved sessions trail. In turn this compromises the security objective.
I do not ever want to save a session, or even load a saved session.
Only want to work from a virgin OS set up specifically for a purpose and with ability to save some user generated data (eg to a user mounted FAT32 partition).
I'll stick with a USB pen drive as it is quicker, more transportable and can be partitioned. Past experience with multisession CD's also has not been without issues.
There is more info in another thread "How to turn off autosave for USB flash install" that helps me with all of this.
Not so much a question but thanks for the suggestion.
A multisession DVD can work for me but still needs similar tweaking.
A vanilla puppy multisession dvd saves each session unless you explicitly select not too. This provides opportunity to alter the state of the OS and leaves a saved sessions trail. In turn this compromises the security objective.
I do not ever want to save a session, or even load a saved session.
Only want to work from a virgin OS set up specifically for a purpose and with ability to save some user generated data (eg to a user mounted FAT32 partition).
I'll stick with a USB pen drive as it is quicker, more transportable and can be partitioned. Past experience with multisession CD's also has not been without issues.
There is more info in another thread "How to turn off autosave for USB flash install" that helps me with all of this.