How to tell grub which pupsave file to use? (SOLVED)

Using applications, configuring, problems
Message
Author
User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

How to tell grub which pupsave file to use? (SOLVED)

#1 Post by sullysat »

I've got several puplets loaded on a single partition and every time I load any of them, I have to tell the system which pup_save file to use.

Is there a way to set all that up in grub so that it just loads without the interruption? I searched the forum for 'grub' and 'edit grub' but didn't find anything and I can't be the only person with this question.

Thanks in advance!
Sully
Last edited by sullysat on Sat 05 Sep 2009, 05:59, edited 1 time in total.

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#2 Post by ICPUG »

I presume you have installed your puplets frugally. If you stick each puplet in a separate directory along with its associated pupsave file then all you have to do is specify the subdirectory in the menu.lst file with psubdir. Here is an example with Puppy 4.2.1 stored in the directory puppy421:

title Puppy Linux 4.2.1
kernel (hd0,0)/puppy421/vmlinuz PMEDIA=idehd PDEV1=sda1 psubdir=puppy421 psubOK=TRUE
initrd (hd0,0)/puppy421/initrd.gz
boot

The PMEDIA, PDEV1, psubOK are optional and relevant to my system. psubOK is only valid on Puppy 4.2.1 derivatives.

This method should work with any puplet based on series 3 or later. It will not work with Series 2 based puplets which usually cannot be stored in a directory.

One final point to note is that the diectory can only be at a depth of 1. That is, a directory such as /puppy/lighthouse is NOT allowed.

User avatar
Ray MK
Posts: 774
Joined: Tue 05 Feb 2008, 09:10
Location: UK

#3 Post by Ray MK »

Hi

Here is an example of a multiboot menu.lst

# Start GRUB global section
# hiddenmenu
#timeout 30
timeout 10
default 3 (412ch)
color light-gray/blue black/light-gray
# End GRUB global section



title Tiny Core Linux
root (hd0,0)
kernel /boot/bzImage quiet
initrd /boot/tinycore.gz



# Linux bootable partition config begins
title 430 2ram (on /dev/hda1)
root (hd0,0)
kernel /430/vmlinuz psubdir=430
initrd /430/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title 481 2ram (on /dev/hda1)
root (hd0,0)
kernel /481/vmlinuz psubdir=481
initrd /481/initrd.gz
# Linux bootable partition config ends



# Linux bootable partition config begins
title 412CH 2ram (on /dev/hda1)
root (hd0,0)
kernel /z412CH/vmlinuz psubdir=z412CH
initrd /z412CH/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title 412Brz 2ram (on /dev/hda1)
root (hd0,0)
kernel /z412Brz/vmlinuz psubdir=z412Brz
initrd /z412Brz/initrd.gz
# Linux bootable partition config ends


# Linux bootable partition config begins
title 413box 2ram (on /dev/hda1)
root (hd0,0)
kernel /z413box/vmlinuz psubdir=z413box
initrd /z413box/initrd.gz
# Linux bootable partition config ends





# Linux bootable partition config begins
title 215ce full hdd (on /dev/hda5)
root (hd0,4)
kernel /boot/vmlinuz root=/dev/hda5
# Linux bootable partition config ends
# Linux bootable partition config begins
title 216ce full hdd (on /dev/hda2)
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2
# Linux bootable partition config ends






# Linux bootable partition config begins
# title NewPup frugal (on /dev/hda1)
# root (hd0,0)
# kernel /zNewPup/vmlinuz psubdir=zNewPup acpi=force pfix=ram
# initrd /zNewPup/initrd.gz
# Linux bootable partition config ends

# Linux bootable partition config begins
# title MinPup - frugal (on /dev/hda1)
# root (hd0,0)
# kernel /zMinPup/vmlinuz root=/dev/ram0 PMEDIA=idehd pdev1=hda1 ro vga=normal acpi=force
# initrd /zMinPup/initrd.gz
# Linux bootable partition config ends


Hope that helps - regards - Ray

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#4 Post by sullysat »

Thanks guys, but let me clarify...

I am running 4 frugal installs and they are all set up properly as you've outlined and boot from their subdirectory.

What I'm really wondering is if there is a way to also identify the pup_save file rather than having to select it manually during the boot process. After looking at your grub files, I'm assuming the answer is no. :(

@ICPUG

I understand the other commands, but what does "psubOK" do?

Thanks,
Sully

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#5 Post by 8-bit »

What the others were getting at is that you should move or copy the corresponding pupsave files to their corresponding subdirectories.
When Puppy looks for a pupsave file and you have psubdir=[name of puppy subdirectory] set up in menu.lst, Puppy will find your pupsave file there and ignore the others.

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#6 Post by sullysat »

@8-bit

Okay, that makes sense, but the save files ARE in their respective subdirectories and grub is still asking me to choose.

Maybe I'm approaching it from the wrong direction. If the puplet should load the save file in it's own subdirectory, maybe the right question is what would cause it to ask instead of defaulting to the save file in the directory.

Thoughts?

Sully

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#7 Post by trapster »

I don't think anything earlier than puppy4 will work with psubdir=.
At least mine don't (1.09. 2.16, 3.0)
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

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

#8 Post by disciple »

psubdir also seems to be about completely separate installs, which make sense more for running several versions. It would be nice to specify just the save file, particularly for running several save files with the same version.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#9 Post by sullysat »

Well, they boot the distro just fine from the subdirectory. The issue I'm trying to understand better is that during boot ALL of my frugal installations ask which save file to use.

Its like something in the boot process looks at the entire drive and lists all the pup_save files on the drive, regardless of which subdirectory they are in.

Its not a huge issue, but it requires that I sit here and select the right one. Just seems like it shouldn't do that.

I'm not sure if its a Puppy issue or a grub issue, but it looks like a Puppy thing.

Sully

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#10 Post by 8-bit »

sullysat,

Can you post your menu.lst file for us to be able to better serve you?

Mine with Multiple frugal installs of Puppy looks like this:

# Linux bootable partition config begins
title U Puppy Linux 471 SCSI frugal
root (hd1,2)
kernel /upup/vmlinuz pmedia=atahd psubdir=upup nosmp
initrd /upup/initrd.gz
# Linux bootable partition config ends
# Other bootable partition config begins
title Windows Vista(on /dev/sda1)
rootnoverify (hd0,0)
makeactive
chainloader +1
# Other bootable partition config ends
# Other bootable partition config begins
title Windows recovery(on /dev/sda2)
map (hd0,0) (hd0,1)
map (hd0,1) (hd0,0)
rootnoverify (hd0,1)
makeactive
chainloader +1
# Other bootable partition config ends
# Linux bootable partition config begins
title Puppy Linux 421 frugal
root (hd1,2)
kernel /puppy421/vmlinuz pmedia=atahd psubdir=puppy421 nosmp
initrd /puppy421/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title Puppy Linux 421m frugal
root (hd1,2)
kernel /pup421m/vmlinuz pmedia=atahd psubdir=pup421m nosmp
initrd /pup421m/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title Puppy Linux 412 frugal
root (hd1,2)
kernel /puppy412/vmlinuz pmedia=atahd psubdir=puppy412 nosmp
initrd /puppy412/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title Jaunty Puppy Linux frugal
root (hd1,2)
kernel /upup/vmlinuz pmedia=atahd psubdir=upup nosmp
initrd /upup/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title Puppy Linux 43 scsi frugal
root (hd1,2)
kernel /pup414/vmlinuz pmedia=atahd psubdir=pup414 nosmp
initrd /pup414/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title Slacker Puppy frugal
root (hd1,2)
kernel /slacker/vmlinuz pmedia=atahd psubdir=slacker nosmp
initrd /slacker/initrd.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
title Puppy 214v6 frugal
root (hd1,2)
kernel /pup214/vmlinuz root=/dev/ram0 pmedia=atahd subdir=pup214 nosmp
initrd /pup214/initrd.gz
# Linux bootable partition config ends

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#11 Post by Jim1911 »

sullysat wrote: Its like something in the boot process looks at the entire drive and lists all the pup_save files on the drive, regardless of which subdirectory they are in.
You may have vmlinuz and initrd.gz in the root. If you find some extras, rename them and report the results.

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#12 Post by sullysat »

8-bit wrote:sullysat,

Can you post your menu.lst file for us to be able to better serve you?
Here you go:

# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Mon Aug 31 18:49:38 2009
#
# The backup copy of the MBR for drive '/dev/sda' is
# here '/boot/grub/mbr.sda.7371'. You can restore it like this.
# dd if=/boot/grub/mbr.sda.7371 of=/dev/sda bs=512 count=1
#
# Start GRUB global section
timeout 30
color light-gray/blue black/light-gray
gfxmenu /boot/grub/deep_stage1
# End GRUB global section

# Linux bootable partition config begins
title Puppy Linux 4.2.1 Full (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1 ro vga=normal
# Linux bootable partition config ends

# Linux bootable partition config begins
title Puppy 214R v8 by ttuuxxx Frugal (on /dev/hda2)
rootnoverify (hd0,1)
kernel /puppy214R/vmlinuz root=/dev/ram0 pmedia=idehd psubdir=puppy214R
initrd /puppy214R/initrd.gz
# Linux bootable partition config ends

# Linux bootable partition config begins
title Puppy 4.0 Frugal (on /dev/hda2)
rootnoverify (hd0,1)
kernel /puppy400/vmlinuz pmedia=idehd psubdir=puppy400
initrd /puppy400/initrd.gz
# Linux bootable partition config ends

# Linux bootable partition config begins
title HanSamBen (Puppy 4.12 for kids) Frugal (on /dev/hda2)
rootnoverify (hd0,1)
kernel /edupup_412/vmlinuz root=/dev/ram0 pmedia=idehd psubdir=edupup_412 nosmp
initrd /edupup_412/initrd.gz
# Linux bootable partition config ends



# Linux bootable partition config begins
# title Linux (on /dev/sda2)
# root (hd0,1)
# kernel /boot/vmlinuz root=/dev/sda2 ro vga=normal
# Linux bootable partition config ends
# Linux bootable partition config begins
# title Linux (on /dev/sda3)
# root (hd0,2)
# kernel /boot/vmlinuz root=/dev/sda3 ro vga=normal
# Linux bootable partition config ends

# title Install GRUB to floppy disk (on /dev/fd0)
# pause Insert a formatted floppy disk and press enter.
# root (hd0,0)
# setup (fd0)
# pause Press enter to continue.
# title Install GRUB to Linux partition (on /dev/sda1)
# root (hd0,0)
# setup (hd0,0)
# pause Press enter to continue.
title - For help press 'c', then type: 'help'
root (hd0)
title - For usage examples, type: 'cat /boot/grub/usage.txt'
root (hd0)

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#13 Post by sullysat »

Jim1911 wrote: You may have vmlinuz and initrd.gz in the root. If you find some extras, rename them and report the results.
The root is empty except for the subdirectories my little puplets are in.

Image

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#14 Post by 8-bit »

Try this:
Move your pupsave file out of your Puppy400 directory.
Reboot and on the boot options, add pfix=ram
Then select your Puppy 400 entry to boot from
Go through just enough to get you to the desktop of it.
Pick shutdown
Make sure of the path for the save file when it asks where to save it.
It should show Puppy400 in the save path.
Say you want to save and let it make a small pupsave file.
Again, make sure it shows Puppy400 in the path to create the save file in.
Now..
Reboot to any other puppy version
Copy your old pupsave file over the one you just created in the Puppy400 directory.
Cross your fingers and reboot.
Select your Puppy 400 to boot from
It should now find it's own pupsave file without asking.

I know it may sound strange, but I had to go through that once.

If your pupsave files were originally created by Puppy in the subdirectories. Ignore the above.

vg1
Posts: 142
Joined: Sun 02 Dec 2007, 18:56

#15 Post by vg1 »

Psubok= enables psubdir to work from two levels deep, say puppy4/pup421. It only works for p421, for other series 4 [or 3] you would need to edit the init.

In series 4, with a correct setup and only one pup_save in your 'psubdir' it should be used by default, and you should not get a choice of pup_saves. With more than one pup_save in a directory you get the choice. With p421 you can use 'psave=' and specify the pup_save to use in case of several pup_saves in the same dir. To enable this in other series 4 you would need to edit the init as above.

For p214R you need a different set of parameters to specify the pup_save to use. See my post in the p214x thread.

vg

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#16 Post by ICPUG »

vg1, sullysat

I'm not sure psubOK is used to solve the depth problem. Crash intially defined it in the init file as:
all puppy files in PSUBDIR

This means to say all puppy files, including the pupsave, are in the psubdir folder so don't bother searching anywhere else.

Later on in the thread it was used in conjunction with PSUBDIR to ensure the pupsave could be on a separate partition - still in a folder defined by psubdir.

Query to vg1 - have you tested 4.3beta yet? Do you know if Crash's beautiful code is in 4.3?

As far as sullysat's problem is concerned then psubOK is irrelevant. Just don't use it.

Sullysat

Comments on your menu.lst

I don't think psubdir works for 2.14R. I may be wrong cos I haven't tested it. It depends on whether the 3.x init file was backported to the 2.14 series. Contrary to what was said earlier psubdir should work in Puppies based on 3.01 as well as any in the 4 series.

You keep using root=/dev/xxx kernel parameter. This went out a long time OK and is not needed for recent puplets. Does not cause a problem if included though.

I wonder if not using a PDEV1 parameter is causing the difficulty. Suggest adding PDEV1=hda2 (sda2 with recent kernels) to the kernel line.

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#17 Post by sullysat »

Thanks for all the help folks! I had no idea this thread would get such interest, but I do love figuring this stuff out and I appreciate the inputs.

@8-bit

I'm teaching this morning but I'll try your suggestion when I get home. I have noticed that the whole pup_save function is a little less than intuitive and I just might be guilty of moving them after saving somewhere else. I'll try it and see what happens.

@vg1

Thanks for the explanation of psubOK. I figured from your other comments that it didn't apply to this problem but I hadn't ever seen it before.

@ICPUG

Thanks for the comments on the grub file. The syntax that you mentioned as being old is just what the system generated. I had assumed, because the system generated it, that grub needed to know the path to those files. Is there a better or more up-to-date and proper way to do that?

Puppy 2.14 does work from the subdirectory, or it was before I tried to update it. That may have something to do with the way ttuuxxx has tweaked it though. I don't know. What I did was install it, then move the files and edit grub. I also had to borrow the idehd file from the 3.01 subdirectory, but it was working just fine except that it was still asking me which save file to use.


Sully

vg1
Posts: 142
Joined: Sun 02 Dec 2007, 18:56

#18 Post by vg1 »

ICPUG - I tested p476i, Crash's code is not in.

Sully - re my 2nd para above, do you get the choice with only one pup_save per folder, or with several? Do you get it when booting all your puppies, or a specific one?

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#19 Post by davesurrey »

Hi sullysat,
Just seen this thread.
I have 9 puppies all frugal sitting in one partition and they never ask which pup_save file to use. So it is possible.

I see you have a full install of puppy 421 on sda1 and frugals of ttuuxxx's 214, Puppy 4.0 and HanSamBen on sda2. Correct?

I assume all of the frugal files are in their respective subdirectory. ie vmlinuz, initrd.gz, pupXXX.sfs and pup_save.3fs plus any zdrv.sfs that comes with the 214X version. No idea about HanSamBen by the way. I assume it's based on puppy 412.

The universal installer in puppy 214X is less than wonderful. I have seen it install initrd and vmlinuz in entirely separate partitions so you might want to do a through search of your drives (definitely check sda1) to check that you don't have any other copies of these files lying about.

Okay, then I think the 214 version grub stanza may be causing a problem, if you are getting this when booting into 214.

Not sure where the cross over was but think it was only in later 2-series puppies when use of a psubdir became possible. However ttuuxxx's 214X is based on puppy 214.1R which could use a psubdir. However I think to avoid it asking which save file to use it needs a different grub stanza.

Try

Code: Select all

title        Puppy 214X8 frugal on hda2
rootnoverify   (hd0,1)
kernel     /puppy214R/vmlinuz  root=/dev/ram0  PMEDIA=idehd  SFSFILE=ext3,hda2,/puppy214R/pup_214R.sfs   PUPSAVE=ext3,hda2,/puppy214R/pup-save.3fs
initrd   /puppy214R/initrd.gz  
This assumes your partition is formated ext3. If not then change accordingly. Note the use of capitals unlike that for puppy series 4.
I assume your pup-save file for 214x is called "pup-save.3fs.
Change it accordingly if it isn't.

HTH
Dave

EDIT:
1. I agree with ICPUG above that root=/dev/xxx is not really needed for 4 series frugal pups. In fact I'd take it right out. But it is needed for 214 though.

2. Note that for the grub stanza above, the kernel line is ONE line although in this forum it shows over 3 lines.
ie start of kernel line is "kernel". End of kernel line is "/pup_save.3fs"
Last edited by davesurrey on Fri 04 Sep 2009, 14:15, edited 2 times in total.

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#20 Post by sullysat »

Thanks davesurrey,

I've still got one appointment this evening, but I'm going to go over all of this when I get home and make those edits and the ideas that others have offered.

I really appreciate all the inputs here. There really is no better way to learn than to try stuff and I'm really enjoying the process.

I did a search but didn't come up with anything, so let me ask while I'm thinking about it. Is there a resource for puppy specific grub commands? Does the wiki have that info?

Sully

Post Reply