| Author |
Message |
tunyawat
Joined: 02 Nov 2008 Posts: 103 Location: Bangkok, Thailand and London, UK
|
Posted: Wed 08 Apr 2009, 13:14 Post subject:
How to freeze the state of pup_save.2fs file? |
|
After setting Puppy under Frugal installation, all files and configurations are saved in pup_save.2fs. This file is modified each time when a session is ended.
Is there a way to freeze the state of the pup_save.2fs file? In other words, I don't want it to be modified when I restart of turn off the machine. I want Puppy to boot up and always be the same.
P.S. If I do the full installation in which pup_save.2fs doesn't exist. How to make Puppy be the same on each boot?
|
|
Back to top
|
|
 |
Colonel Panic

Joined: 16 Sep 2006 Posts: 1225
|
Posted: Thu 09 Apr 2009, 05:19 Post subject:
|
|
I don't know how you would do this with a full install, but it's doable with a frugal install (which uses a save file), and with recent versions of Puppy anyway.
If you've got Puppy 4, you just click on Puppy Event Manager in your menu and then "Save Session;" this brings up a dialog box called "Save Interval".
All you have to do then is enter 0, for "never."
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Fri 10 Apr 2009, 03:36 Post subject:
|
|
The save interval only applies to a frugal install on a USB flash drive, not a hard drive. On a hard drive the save file is mounted directly, so anything you do is saved straight away.
You may be able to trick Puppy into thinking he is on a USB drive. But will that actually mean he will ask if you want to save a session when you shut down - or will he save it automatically still?
It is probably easier to remaster Puppy with your new settings, and boot with pfix=ram... but you would only want to do this if you never want to save another session (otherwise you would need to remaster again).
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
Colonel Panic

Joined: 16 Sep 2006 Posts: 1225
|
Posted: Fri 10 Apr 2009, 04:01 Post subject:
|
|
In that case I stand corrected. Sorry if I misled anyone.
Just one thought; is it possible to start Puppy's bootup script with a command to copy a file? If so, what you could do is have a backup file, say pup_save.bak, and copy this to a file called pup_save.2fs every time you boot up. That way, Puppy would always load the same savefile and it would only change when you wanted it to (by reversing the process and copying the pup_save.2fs savefile back to pup_save.bak). I hope that's clear.
|
|
Back to top
|
|
 |
tunyawat
Joined: 02 Nov 2008 Posts: 103 Location: Bangkok, Thailand and London, UK
|
Posted: Fri 10 Apr 2009, 04:42 Post subject:
|
|
I could not access to this forum until today. I did set "interval saving = 0" but puppy still update the save file while it is shutting down. However, Discible has already answered my question about this.
The idea that Colonel Panic suggested seems to be the quick and easy way to do this. If there is no other suggestion, I will try to modify some script to do this task.
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Fri 10 Apr 2009, 06:09 Post subject:
|
|
If you do it that way I think you'll need to take apart initrd.gz and work on one of the scripts in it.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
Colonel Panic

Joined: 16 Sep 2006 Posts: 1225
|
Posted: Sat 11 Apr 2009, 04:30 Post subject:
|
|
Probably good advice there, but I've not a clue how you would do that; I ungzipped a copy of initrd.gz and found something quite uneditable, it looked like a binary file.
Last edited by Colonel Panic on Sat 11 Apr 2009, 14:02; edited 1 time in total
|
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 1534 Location: The Blue Marble
|
Posted: Sat 11 Apr 2009, 05:08 Post subject:
|
|
To expand, edit and re-pack initrd.gz, see last post by pizzasgood here http://www.murga-linux.com/puppy/viewtopic.php?t=25645
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13
|
|
Back to top
|
|
 |
tunyawat
Joined: 02 Nov 2008 Posts: 103 Location: Bangkok, Thailand and London, UK
|
Posted: Sat 11 Apr 2009, 06:29 Post subject:
|
|
Actually, what I'm going to do is very simple. I will create a backup of pup_save.2fs file as pup_save.bak. After I have a backup file, I will create a restoration script to convert the .bak file back to the .2fs. When this has been done, I will press reset button on the computer to reboot the machine. I just can't do a rocket science.
|
|
Back to top
|
|
 |
Colonel Panic

Joined: 16 Sep 2006 Posts: 1225
|
Posted: Sat 11 Apr 2009, 14:11 Post subject:
|
|
Sounds good, except that you'd have to keep making .bak files and doing that conversion every time you boot up (or else you'll stop having a .bak file to convert).
|
|
Back to top
|
|
 |
Colonel Panic

Joined: 16 Sep 2006 Posts: 1225
|
Posted: Sat 11 Apr 2009, 14:13 Post subject:
|
|
Thanks for this one. I'll have a look at it when I've got a bit more time.
|
|
Back to top
|
|
 |
|