How to freeze the state of pup_save.2fs file?

Booting, installing, newbie
Post Reply
Message
Author
tunyawat
Posts: 103
Joined: Sun 02 Nov 2008, 04:03
Location: Bangkok, Thailand and London, UK

How to freeze the state of pup_save.2fs file?

#1 Post by tunyawat »

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?

User avatar
Colonel Panic
Posts: 2171
Joined: Sat 16 Sep 2006, 11:09

#2 Post by Colonel Panic »

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."

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

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).
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Colonel Panic
Posts: 2171
Joined: Sat 16 Sep 2006, 11:09

#4 Post by Colonel Panic »

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.

tunyawat
Posts: 103
Joined: Sun 02 Nov 2008, 04:03
Location: Bangkok, Thailand and London, UK

#5 Post by tunyawat »

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.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#6 Post by disciple »

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.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Colonel Panic
Posts: 2171
Joined: Sat 16 Sep 2006, 11:09

#7 Post by Colonel Panic »

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, 18:02, edited 1 time in total.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#8 Post by jamesbond »

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 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

tunyawat
Posts: 103
Joined: Sun 02 Nov 2008, 04:03
Location: Bangkok, Thailand and London, UK

#9 Post by tunyawat »

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.

User avatar
Colonel Panic
Posts: 2171
Joined: Sat 16 Sep 2006, 11:09

#10 Post by Colonel Panic »

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).

User avatar
Colonel Panic
Posts: 2171
Joined: Sat 16 Sep 2006, 11:09

#11 Post by Colonel Panic »

jamesbond wrote:To expand, edit and re-pack initrd.gz, see last post by pizzasgood here http://www.murga-linux.com/puppy/viewtopic.php?t=25645
Thanks for this one. I'll have a look at it when I've got a bit more time.

Post Reply