Page 1 of 1

Multiple save files for frugal (solved)

Posted: Sun 09 Dec 2012, 19:47
by mini-jaguar
It seems to me that it would be possible to have several save files, then simply load different ones by putting appropriate arguments in each grub entry for each save file.

I am having a hard time finding info on this though, in particular as to what arguments I would need to put in the grub.

Posted: Tue 11 Dec 2012, 00:59
by sunburnt
Hi mini-jaguar; Grub has nothing to do with loading the save file.
It`s mounted in the boot script "init" ( I believe...).
You can`t see it in the running Puppy, you must extract initrd.gz to find it.

Posted: Tue 11 Dec 2012, 11:26
by CatDude
Hello mini-jaguar

What Puppy versions are we talking about ?

And are we talking about several savefiles for the same Puppy version in a single subdirectory ?

Just trying to get a clearer picture of what you are trying to do.

CatDude
.

Posted: Tue 11 Dec 2012, 12:10
by RSH
Hi.

As far as I know, it's not possible to put information on which save file to use at boot up into a grub boot menu entry.

If you running your puppy using a save file, open the directory wherein the save file is stored and create an empty file.

Example:

Let's assume your save file is named MyPuppysave-XXX.2fs then name the empty file to MyPuppysave-NoSave.2fs.

On next boot you can choose then which save file to use (puppy thinks then there are two of them). This action is executed far behind grub or grub4dos.

To create a new one, boot puppy into RAM and don't use a save file. At shutdown just create a new one ---> do it this way for each new save file you want to create and use.

That's my knowledge on save files.

RSH

Posted: Tue 11 Dec 2012, 13:25
by CatDude
Hi
RSH wrote:As far as I know, it's not possible to put information on which save file to use at boot up into a grub boot menu entry.
Oh yes it is ! (depending on what Puppy we are talking about)

Here is a snippet from this page: BootParametersPuppy
Psave
Psave allows a user to specify which PupSave files to use. This allows the pupsave selection menu to be skipped (shows if more than one savefile is found).
It would be helpful if there was a list of Puppies that support this parameter/argument,
but i am yet to find such a beast.

It would also be a good idea if ALL Puppies supported it. (IMHO)

Just for informational purposes,
here are a few links: CatDude
.

Posted: Tue 11 Dec 2012, 14:07
by RSH
Oh yes it is !
Thanks for the information.

Unfortunately it doesn't work on LazY Puppy, and so it might not work also on Lucid.

RSH

Posted: Tue 11 Dec 2012, 14:14
by RSH
I think I will try this How to get Grub to pick a pupsave file... in 4.3.1?SOLVED, to get this into LazY Puppy.

Thanks for the Links.

Posted: Wed 12 Dec 2012, 02:43
by RetroTechGuy
RSH wrote:Hi.

As far as I know, it's not possible to put information on which save file to use at boot up into a grub boot menu entry.
OK, this wouldn't be pretty, but think about this -- would it work? Yeah, very clunky, but disk space is cheap these days...

In your menu.lst (note the bold v1,2,3):

title Puppy Linux 528 frugal v1
rootnoverify (hd0,0)
kernel /puppy528v1/vmlinuz pmedia=atahd psubdir=puppy528v1 pfix=noram,fsck
initrd /puppy528v1/initrd.gz

title Puppy Linux 528 frugal v2
rootnoverify (hd0,0)
kernel /puppy528v2/vmlinuz pmedia=atahd psubdir=puppy528v2 pfix=noram,fsck
initrd /puppy528v2/initrd.gz

title Puppy Linux 528 frugal v3
rootnoverify (hd0,0)
kernel /puppy528v3/vmlinuz pmedia=atahd psubdir=puppy528v3 pfix=noram,fsck
initrd /puppy528v3/initrd.gz

So each subfolder would have a duplicate of everything, but would have only 1 save file. I suppose it might be possible to share some of the files, but without actually testing this or the alternative...I couldn't say.

Posted: Wed 12 Dec 2012, 05:58
by sunburnt
Boot codes are sporadic in different Puppies.

But the boot arguments are not used by grub...
They`re exported to Barry`s boot scripts.

Posted: Wed 12 Dec 2012, 12:58
by ICPUG
mini-jaguar has not come back in 3 days so not sure whether he is pleased with the responses or not. They do seem to be conflicting!

There are 2 possibilities here.

One has been identified by CatDude but relies on a Puppy that recognises the pupsave boot parameter. This probably does not apply to many puppies.

I would also like to say to Sunburn that, while technically correct, to say boot arguments are not used by grub may be confusing to a user.

The boot arguments will be added to the menu.lst file and this is a part of the grub operation. I know they are just passed through but you are adjusting the grub configuration file.

Now to the second possibility. Haven't tried it for a long time but I thought that if, during boot up, Puppy found 2 save files with DIFFERENT names it is supposed to list them and you identify which one to use. This used to work for any Puppy. As I say, I haven't tried it recently but in the mean time nothing I have read has suggested that this option has fallen by the wayside. It is all part of the init coding of course. The problem is creating the save files in the first place. The first one is easy enough but the next time you boot Puppy will use it and not offer the chance to create a second save file. What I would do is:

Run Puppy the first time and create savefile1. When given the option add some characters to make its name unique.

Before running Puppy again rename the savefile1.2fs to savefile1.xxx so it does not get recognised

Run Puppy a second time and create savefile2. Add some different characters this time to make its name different from savefile1.

Before running Puppy again rename savefile1.xxx back to savefile1.2fs

Now when you boot Puppy in future you should get a menu showing savefile1 and savefile2 and you select the one you want.

Edited to correct the extension of the save file

Posted: Wed 12 Dec 2012, 14:48
by mini-jaguar
Yes, I am pleased with the responses, however, I will not have much time soon to test the modded initrd.gz file.

Or it can be done simply with the modded menu.lst and saving under different names?

In any case I probably won't try this very soon.

Posted: Wed 12 Dec 2012, 23:59
by ICPUG
If you create a couple of save files under different names you shouldn't have to mod anything, not even menu.lst. Puppy should see two save files there and give you a menu to choose.

If RSH mods the initrd.gz of Lazy Puppy like he says then you would have to specify the psave boot parameter in the menu.lst.

RetroTechGuy's non-pretty method should work too.

Thanks for letting us know you're reading, mini-jaguar.

Posted: Thu 13 Dec 2012, 00:17
by RetroTechGuy
ICPUG wrote:If you create a couple of save files under different names you shouldn't have to mod anything, not even menu.lst. Puppy should see two save files there and give you a menu to choose.

If RSH mods the initrd.gz of Lazy Puppy like he says then you would have to specify the psave boot parameter in the menu.lst.

RetroTechGuy's non-pretty method should work too.

Thanks for letting us know you're reading, mini-jaguar.
I actually run multiple save files (a general one, a testing one, a secure one only for banking, etc.), but it doesn't default boot one, if left.

My system does default boot to Puppy 5.28, if left alone -- but then requires user intervention to choose a file. I may try the not-pretty for my system...

Posted: Sat 29 Dec 2012, 18:03
by mini-jaguar
ICPUG wrote:If you create a couple of save files under different names you shouldn't have to mod anything, not even menu.lst. Puppy should see two save files there and give you a menu to choose.
This is the simplest solution, even though you go through two screens: the one from the menu.lst then the one which asks which file you want to load, provided there is more than one.

Just one more question, once there is already one pupsave file, is there any other way to boot Puppy without loading the save file, other than putting a menu entry for that purpose?

Posted: Sat 29 Dec 2012, 18:18
by RetroTechGuy
mini-jaguar wrote:
ICPUG wrote:If you create a couple of save files under different names you shouldn't have to mod anything, not even menu.lst. Puppy should see two save files there and give you a menu to choose.
This is the simplest solution, even though you go through two screens: the one from the menu.lst then the one which asks which file you want to load, provided there is more than one.

Just one more question, once there is already one pupsave file, is there any other way to boot Puppy without loading the save file, other than putting a menu entry for that purpose?
Create 2 save files, and you will be prompted for a savefile.

Select "0" for load no savefile...

Posted: Sat 29 Dec 2012, 20:29
by mini-jaguar
If you create only one save file, the menu will not show up, so there's no way to pick the 0 option.

Unless you mean create one save file and copy then rename it, which is an interesting idea. I could try that...

Posted: Sat 29 Dec 2012, 21:17
by RetroTechGuy
mini-jaguar wrote:If you create only one save file, the menu will not show up, so there's no way to pick the 0 option.

Unless you mean create one save file and copy then rename it, which is an interesting idea. I could try that...
Use your boot disk, and load it:

"puppy pfix=ram"

This will boot to RAM. Exit and create a second save file. Or boot a different system, and copy your file to a new name (for example, if you have Windows and your safe files are on the Windows partition, you can use that to copy the file). Or while you're booted to RAM, navigate to your save folder and copy the file (just change the second part of the name)

As I mentioned, I have 2+ save files, in the same subfolder. I have a "secure" file that I use only for accessing banking accounts. I have a general one that I use for everyday use. I have a "test" save file that I use when I'm apt to break things...

And when I want to back up my savefile, I boot one of the others and copy the main one to a new name, then reboot.

Posted: Thu 03 Jan 2013, 08:51
by rhadon
RetroTechGuy wrote: My system does default boot to Puppy 5.28, if left alone -- but then requires user intervention to choose a file.
If you are keen to change the initrd script, there is a way to boot a selected save file automatically after a given time. After adding some lines in the script, you create a text file named boot-save with content

Code: Select all

time=n 
default=n
Replace n with your desired values.

You can find the code here.

I don't think that playdayz changed the init script between 525 and 528 in a way that this code doesn't work, but no guaranty.

HTH
Rolf