Boot menu and grub.cfg. How to add boot choices to menu?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
User avatar
Governor
Posts: 998
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 266 times
Been thanked: 48 times

Boot menu and grub.cfg. How to add boot choices to menu?

Post by Governor »

I installed a couple of chess games and Bookworm stopped booting. So now I can only choose an alternate from the boot menu.
These are the possible boot folders I have:

5 boot folders in startup folder.png
5 boot folders in startup folder.png (109.93 KiB) Viewed 786 times

However, my boot menu gives me only 2 choices, and the first choice no longer works:

Only 2 boot choices.JPG
Only 2 boot choices.JPG (137.08 KiB) Viewed 786 times

How do I enable the other 3 possible folder choices either in the initial boot2config menu, or in the Puppy boot menu?
My grub.cfg looks like this:

Code: Select all

# grub.cfg produced by grub2config 2.0.2
set default=0
set timeout=13			
insmod all_video
insmod gfxterm
insmod png
insmod jpeg
terminal_output gfxterm
set menu_color_highlight=yellow/blue
set gfxmode=auto
set theme=/theme/puppy/theme.txt
# Setting the boot screen font via theme.txt
# will fail, so we use loadfont in grub.cfg.
loadfont /theme/puppy/DejaVuSansMono18.pf2

# Puppy Linux

menuentry 'Dpupbw64 10.0.6 (nvme0n1p2/Bookworm64_10.0.6)' --class puppylinux{
  search --no-floppy --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead
  linux /Bookworm64_10.0.6/vmlinuz    psubdir=/Bookworm64_10.0.6 pmedia=ataflash pfix=copy
  initrd /Bookworm64_10.0.6/initrd.gz
}

menuentry 'Dpupbw64 10.0.6 (nvme0n1p2/Bookworm64_10.0.6) RAM mode' --class puppylinux{
  search --no-floppy --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead
  linux /Bookworm64_10.0.6/vmlinuz    psubdir=/Bookworm64_10.0.6 pmedia=ataflash pfix=ram,copy
  initrd /Bookworm64_10.0.6/initrd.gz
}

menuentry 'Fossapup64 9.5 (nvme0n1p4/puppylivecdbuild)' --class puppylinux{
  search --no-floppy --set=root --fs-uuid 52d8efaf-bdf6-4281-aeea-871217161d5c
  linux /puppylivecdbuild/vmlinuz    psubdir=/puppylivecdbuild pmedia=ataflash pfix=copy
  initrd /puppylivecdbuild/initrd.gz
}

menuentry 'Windows uefi boot' --class puppylinux{
	search --no-floppy --set=root --file   /EFI/Microsoft/Boot/bootmgfw.efi
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

if [ $grub_platform = "efi" ] ; then
menuentry 'UEFI Firmware Settings' --class puppylinux{
	fwsetup
}
fi

	# custom menu
	if [ -f /custom.cfg ] ;then source /custom.cfg ;fi

I used to walk the earth thinking the news was real and adults knew what was going on.

williwaw
Posts: 2042
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 183 times
Been thanked: 391 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by williwaw »

psubdir= directs to the subdirectory, but you could get more specific by using
psave=the/complete/path/to/the/savefoldername

User avatar
Governor
Posts: 998
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 266 times
Been thanked: 48 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by Governor »

williwaw wrote: Sun Jul 14, 2024 6:56 am

psubdir= directs to the subdirectory, but you could get more specific by using
psave=the/complete/path/to/the/savefoldername

Your suggestion didn't work for me. I was unable to boot using it, and got a kernel error. The only entries I can boot from are 4 and 5.

Code: Select all

# grub.cfg produced by grub2config 2.0.2
set default=0
set timeout=13			
insmod all_video
insmod gfxterm
insmod png
insmod jpeg
terminal_output gfxterm
set menu_color_highlight=yellow/blue
set gfxmode=auto
set theme=/theme/puppy/theme.txt
# Setting the boot screen font via theme.txt
# will fail, so we use loadfont in grub.cfg.
loadfont /theme/puppy/DejaVuSansMono18.pf2

# Puppy Linux

menuentry 'Dpupbw64 10.0.6 (nvme0n1p2/Bookworm64_10.0.6)' --class puppylinux{
  search --no-floppy --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead
  linux /Bookworm64_10.0.6/vmlinuz     psubdir=/Bookworm64_10.0.6 psave=/mnt/nvme0n1p2/Bookworm64_10.0.6/dpupbw64save-2024-06-25-basic-02 pmedia=ataflash pfix=copy
  initrd /Bookworm64_10.0.6/initrd.gz
}

menuentry 'Dpupbw64 10.0.6 (nvme0n1p2/Bookworm64_10.0.6)' --class puppylinux{
  search --no-floppy --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead
  linux /Bookworm64_10.0.6/vmlinuz     psubdir=/Bookworm64_10.0.6 psave=/mnt/nvme0n1p2/Bookworm64_10.0.6/dpupbw64save-2024-07-14-basic pmedia=ataflash pfix=copy
  initrd /Bookworm64_10.0.6/initrd.gz
}

menuentry 'Dpupbw64 10.0.6 (nvme0n1p2/Bookworm64_10.0.6)' --class puppylinux{
  search --no-floppy --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead
  linux /Bookworm64_10.0.6/vmlinuz     psave=/mnt/nvme0n1p2/Bookworm64_10.0.6/dpupbw64save-2024-07-14-basic pmedia=ataflash pfix=copy
  initrd /Bookworm64_10.0.6/initrd.gz
}

menuentry 'Dpupbw64 10.0.6 (nvme0n1p2/Bookworm64_10.0.6)' --class puppylinux{
  search --no-floppy --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead
  linux /Bookworm64_10.0.6/vmlinuz    psubdir=/Bookworm64_10.0.6 pmedia=ataflash pfix=copy
  initrd /Bookworm64_10.0.6/initrd.gz
}

menuentry 'Fossapup64 9.5 (nvme0n1p4/puppylivecdbuild)' --class puppylinux{
  search --no-floppy --set=root --fs-uuid 52d8efaf-bdf6-4281-aeea-871217161d5c
  linux /puppylivecdbuild/vmlinuz    psubdir=/puppylivecdbuild pmedia=ataflash pfix=copy
  initrd /puppylivecdbuild/initrd.gz
}

menuentry 'Windows uefi boot' --class puppylinux{
	search --no-floppy --set=root --file   /EFI/Microsoft/Boot/bootmgfw.efi
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

if [ $grub_platform = "efi" ] ; then
menuentry 'UEFI Firmware Settings' --class puppylinux{
	fwsetup
}
fi

	# custom menu
	if [ -f /custom.cfg ] ;then source /custom.cfg ;fi

I used to walk the earth thinking the news was real and adults knew what was going on.

Clarity
Posts: 4072
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1718 times
Been thanked: 554 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by Clarity »

Hello @Governor

You are showing 3 different types of folders in your pic. 1 set is standard PUP naming w/icons, 1 set is standard PUP naming wo/icons, and 1 set whose naming is foreign to the PUP's standard.

I am guessing, here, but it seems one of the 3 (without save in their names) was either modified or created by a different use of a prior version of this distro. I say this in viewing the icons and what the distro lists when booting.

It seems the booting distro detechs this and only lists those it recognize.

Your question, though, is valid in looking for clues why it does not pick up 1 of those remaining 3 overlooked.

On the other 2, it appears that you have applied some utility service to create backups. Those backup names defy the naming convension that the distro is looking for. This is a reason, I think, those 2 are overlooked, as well.

As far as how to instruct the distro to use a session that does not match its naming requirements, I am not sure. You could, IIRC, make an SFS of either/both and issue a boot parm to post-process the new SFS you create. OR to add it to one of the xdrv where "x" is one of the accepted PUP 'drv' folders that the PUP will use in its booting pathway.

You'd have to test this idea as I dont remember seeing anyone do this, before.

User avatar
Governor
Posts: 998
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 266 times
Been thanked: 48 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by Governor »

Clarity wrote: Sun Jul 14, 2024 2:44 pm

Hello @Governor

You are showing 3 different types of folders in your pic. 1 set is standard PUP naming w/icons, 1 set is standard PUP naming wo/icons, and 1 set whose naming is foreign to the PUP's standard.

I am guessing, here, but it seems one of the 3 (without save in their names) was either modified or created by a different use of a prior version of this distro. I say this in viewing the icons and what the distro lists when booting.

It seems the booting distro detechs this and only lists those it recognize.

Your question, though, is valid in looking for clues why it does not pick up 1 of those remaining 3 overlooked.

On the other 2, it appears that you have applied some utility service to create backups. Those backup names defy the naming convension that the distro is looking for. This is a reason, I think, those 2 are overlooked, as well.

As far as how to instruct the distro to use a session that does not match its naming requirements, I am not sure. You could, IIRC, make an SFS of either/both and issue a boot parm to post-process the new SFS you create. OR to add it to one of the xdrv where "x" is one of the accepted PUP 'drv' folders that the PUP will use in its booting pathway.

You'd have to test this idea as I dont remember seeing anyone do this, before.

I have used only puppy, and no backup utility. I was informed that I could change the file names on save folders and backup folders. I have experienced before that if no boot files are specified, puppy searches available drives for the .sfs files in order to boot.

What exactly is the naming convention used by Puppy for save folders/files?
What exactly is the naming convention used by Puppy for backup folders/files?
Can I change the names of the folders so they will be recognized?
Thanks.

I used to walk the earth thinking the news was real and adults knew what was going on.

geo_c
Posts: 2948
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2271 times
Been thanked: 913 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by geo_c »

Governor wrote: Sun Jul 14, 2024 4:23 pm
Clarity wrote: Sun Jul 14, 2024 2:44 pm

Hello @Governor

You are showing 3 different types of folders in your pic. 1 set is standard PUP naming w/icons, 1 set is standard PUP naming wo/icons, and 1 set whose naming is foreign to the PUP's standard.

I am guessing, here, but it seems one of the 3 (without save in their names) was either modified or created by a different use of a prior version of this distro. I say this in viewing the icons and what the distro lists when booting.

It seems the booting distro detechs this and only lists those it recognize.

Your question, though, is valid in looking for clues why it does not pick up 1 of those remaining 3 overlooked.

On the other 2, it appears that you have applied some utility service to create backups. Those backup names defy the naming convension that the distro is looking for. This is a reason, I think, those 2 are overlooked, as well.

As far as how to instruct the distro to use a session that does not match its naming requirements, I am not sure. You could, IIRC, make an SFS of either/both and issue a boot parm to post-process the new SFS you create. OR to add it to one of the xdrv where "x" is one of the accepted PUP 'drv' folders that the PUP will use in its booting pathway.

You'd have to test this idea as I dont remember seeing anyone do this, before.

I have used only puppy, and no backup utility. I was informed that I could change the file names on save folders and backup folders. I have experienced before that if no boot files are specified, puppy searches available drives for the .sfs files in order to boot.

What exactly is the naming convention used by Puppy for save folders/files?
What exactly is the naming convention used by Puppy for backup folders/files?
Can I change the names of the folders so they will be recognized?
Thanks.

Some pups (usually older ones) don't give a pupsave.BKP-[your-filename] as a booting choice. Fossapup64_9.5 does allow you a boot choice from a backup folder. I think if you take out the '.BKP' from the names, so that they are dpupbw64save-[your-filename] like the other two, then they will be listed as a boot choice.

geo_c
Old School Hipster, and Such

williwaw
Posts: 2042
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 183 times
Been thanked: 391 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by williwaw »

Governor wrote: Sun Jul 14, 2024 2:09 pm

Your suggestion didn't work for me............

did you try various permutations of the parameters? using the edit function on grub2 makes this easy to do.

read a bit at viewtopic.php?t=5484

perhaps try substituting the psave parameter for the psubdir parameter
in you proposed stanza

maybe --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead already specifies the partition and the loader is now looking in partition nvme0n1p2 for a directory named nvme0n1p2/....?
or perhaps you are trying to use the path as it appears in the titlebar of the rox window instead of the explanation in the post linked above?

ah , here it is:

Where <path> is the sub-directory within the partition.
e.g. "pupsfs=sdb2:/path/to/" or "psave=:/path/to/"
Any specified <path> is relative to the root of the partition, the same as "psubdir=".

did you try copying the back up with a name like the ones above it?
each puppy has its own naming conventions for saves so that fossapup saves are not read by bookworm, best to ask about whatever spec are required for any particular pup in he dedicated subforum.

User avatar
bigpup
Moderator
Posts: 7301
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 952 times
Been thanked: 1616 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by bigpup »

Did you boot from a complete power off to power on condition?

The computer was powered off for at least 1 minute before powering it on?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

geo_c
Posts: 2948
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2271 times
Been thanked: 913 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by geo_c »

@Governor, barring any of the possibilities mentioned by @bigpup and @williwaw, I think the problem is very simple:

It's the fact that your backup files have the dash after the .BKP characters in the file name.

e.g. They should read: dpupbw64save-BKP.2024.06.21-13.42

In other words, if you want to boot it, a save folder should always have the exact save name dpupbw64save- as the beginning characters. It can have anything else after the dash, but the dash and characters before it have to say exactly what the pup gives it when you make an initial save.

geo_c
Old School Hipster, and Such

User avatar
jp734
Posts: 207
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by jp734 »

@geo_c . It appears the third savefile has that format you mentioned but it wasnt showing as an option as well.

@Governor , can you take a look in the folder where you have the vmlinuz and initrd.gz files are saved and check if there is a text configuration file called "save..". If there is, open it and check what's in it.

One day I noticed a "bookworm" folder was created in / on my laptop as my save folder when I originally created /puppylinux/bookworm for my boot files and where it normally created the save folder. Not sure what caused it but it happened when I tried installing the 535 nvidia and I kept getting boot error. Maybe a change in 10.0.7?

The Art of Magic and The Magic of Art

User avatar
Governor
Posts: 998
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 266 times
Been thanked: 48 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by Governor »

williwaw wrote: Sun Jul 14, 2024 7:08 pm
Governor wrote: Sun Jul 14, 2024 2:09 pm

Your suggestion didn't work for me............

did you try various permutations of the parameters? using the edit function on grub2 makes this easy to do.

read a bit at viewtopic.php?t=5484

perhaps try substituting the psave parameter for the psubdir parameter
in you proposed stanza

maybe --set=root --fs-uuid b4db67d6-077d-422e-8cac-99b8f8008ead already specifies the partition and the loader is now looking in partition nvme0n1p2 for a directory named nvme0n1p2/....?
or perhaps you are trying to use the path as it appears in the titlebar of the rox window instead of the explanation in the post linked above?

ah , here it is:

Where <path> is the sub-directory within the partition.
e.g. "pupsfs=sdb2:/path/to/" or "psave=:/path/to/"
Any specified <path> is relative to the root of the partition, the same as "psubdir=".

That was a problem. I tried to put the paths like they appear in the file manager.

But, this is working: psubdir=/Bookworm64_10.0.6 pmedia=ataflash pfix=copy (??)

did you try copying the back up with a name like the ones above it?
each puppy has its own naming conventions for saves so that fossapup saves are not read by bookworm, best to ask about whatever spec are required for any particular pup in he dedicated subforum.

I used to walk the earth thinking the news was real and adults knew what was going on.

User avatar
Governor
Posts: 998
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 266 times
Been thanked: 48 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by Governor »

jp734 wrote: Mon Jul 15, 2024 1:20 am

@geo_c . It appears the third savefile has that format you mentioned but it wasnt showing as an option as well.

@Governor , can you take a look in the folder where you have the vmlinuz and initrd.gz files are saved and check if there is a text configuration file called "save..". If there is, open it and check what's in it.

One day I noticed a "bookworm" folder was created in / on my laptop as my save folder when I originally created /puppylinux/bookworm for my boot files and where it normally created the save folder. Not sure what caused it but it happened when I tried installing the 535 nvidia and I kept getting boot error. Maybe a change in 10.0.7?

Yes, I have this file: /mnt/nvme0n1p2/Bookworm64_10.0.6/SAVESPEC
which contains:
SS_ID='nvme3_ext3'
SS_DIR='/Bookworm_save'

I think I should change that to the actual boot directory. Since I already have a boot stick with the same files as my nvme boot directory, I don't need a dedicated backup directory. Besides, if the nvme drive goes kaput, I can't use those backups anyway.

I used to walk the earth thinking the news was real and adults knew what was going on.

User avatar
jp734
Posts: 207
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by jp734 »

@Governor if youre to change it, just make sure you transfer all savefiles and update your grub.conf.

I wasnt used to having that SAVESPEC file as all of my puppy savefiles have always been in the same folder with the boot files so I deleted both the folder and savespec config and everything worked for me and got rid of the boot error message

It should have worked for you though since path is correct.

Good luck

[EDIT] Correction, i dont think its configured correctly. Your psubdir should have been: /Bookworm_save and not Bookworm64_10.0.6. It's either change psubdir entry and keep all savefiles where it is OR keep psubdir entry and move all savefiles.

The Art of Magic and The Magic of Art

User avatar
Governor
Posts: 998
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 266 times
Been thanked: 48 times

Re: Boot menu and grub.cfg. How to add boot choices to menu?

Post by Governor »

bigpup wrote: Sun Jul 14, 2024 9:51 pm

Did you boot from a complete power off to power on condition?

The computer was powered off for at least 1 minute before powering it on?

Is this a new thing? When my computer stops working, I usually turn my laptop off and on immediately with the power button, since there is no other way to do it.
Do you mean it is important to cut off all power so that capacitors can discharge? The battery on my laptop is not removable unless I open it up, and that is a major hassle.

I used to walk the earth thinking the news was real and adults knew what was going on.

Post Reply

Return to “Beginners Help”