Page 1 of 1
Grub2config - switch default Puppy boot [SOLVED]
Posted: Sun Jan 19, 2025 6:35 am
by davids45
G'day,
A new MSI Cubi mini desktop (Mint-22 installed and running well)
I'm happy booting with FossaCE-4 off a 32GB usb stick - no problems with this; using the hard-drive for data storage and Puppy-links of apps. that would otherwise bloat the savefile (e.g. caches, /opt (for firefox), downloads, temps, etc. are all links from the Puppy usb to the boot-mounted hard-drive).
But I want to boot from the hard-drive with this Puppy as a dual-boot with Mint.
Like I could years ago with grub4dos but eufi is the only option (I've already disabled the 'Security' nuisance in BIOS to stop Mint taking over).
I thought grub2config was what I needed to add and boot Puppy from the hard-drive but no luck so far, so now I need advice, not luck .
GParted screenshot of the Fossa frugal system, running from the mounted usb's (invisible) sda; Mint is on the n...p2 partition (which is where I thought Puppy needs to be in some form and place?)
- 02-Gparted-drives-scan-harddrivebootflag.jpg (64.18 KiB) Viewed 1038 times
Trying grub2config with its default:
- 2-grub2test.png (124.24 KiB) Viewed 1038 times
Trying grub2config with the usb selected:
- 3-grub2test.png (132.14 KiB) Viewed 1038 times
What do I need to do to get booting from a frugal Puppy copied on the Mint partition - put where, in which partition, n...p1 or n...p2? (and in what format, if not the usual directory of the 6 Puppy files for Fossa)?
I'm now an 'old dog', clearly not very good with 'new tricks'
Thanks for any advice or questions.
David S.
Re: Grub2config - switch default Puppy boot
Posted: Sun Jan 19, 2025 11:10 am
by williwaw
But why not just add puppy to the existing mint bootloader?
What bootloader is mint currently using?
could you post the grub.cfg there already? (presuming your bootloader is grub2)
Re: Grub2config - switch default Puppy boot
Posted: Sun Jan 19, 2025 5:58 pm
by mikeslr
I will be following this thread for solutions, work-arounds. I've run into this problem when recent versions of Ubuntu, debian or their derivatives have been installed to the hard-drive, writing their own boot-managers.
To date my 'easy' work-around has been to deploy puppys to their own folder on the hard-drive and use a dedicated USB-Key to hold a boot-loader. Plug in the key, boot-Puppys. Unplug the Key, boot the other Linux.
The only other work-around I've been able to use is to re-install the Ubuntu or debian. Both still use the Ubiquity installer. Rather than call Ubiquity using the GUI, ubiquity can be started via a terminal using this command line:
ubiquity -b
After a warning, system files will be installed without a bootloader. Of course, you may loose everything which preceeded it. And sometimes not even that works because of some change the prior installation of debian/Ubuntu made. I haven't tried entirely reformating the hard-drive. And I don 't know which other Linuxes use ubiquity.
So as williwaw suggested, perhaps the easiest solution would be to customize the 'menu' used by Linux Mint's grub2. Instructions on how to do such customizations in general can be found on the web. But because of the unique way Puppys work, it would be helpful to have on the Forum specific instructions on how to customize grub2 under debian/ubuntu to create menu entries for Puppys.
Re: Grub2config - switch default Puppy boot
Posted: Sun Jan 19, 2025 10:39 pm
by davids45
Thanks for the quick replies.
Williwaw - I hope this is what you asked for first off:
I find (at least?) three grub.config (grub.cfg) files on my new system.
On the hard-drive, one in each partition (path to each is in heading of each screenshot):
- grubs-on-hardrive.png (252.96 KiB) Viewed 938 times
The usb of Fossa96-CE-4 running the computer has one:
- Screenshot(2).jpg (15.52 KiB) Viewed 938 times
Here is the text from the grub.cfg on the usb (but did you want to see one of the two I find off the two hard-drive (Mint) partitions? - see below for text of one of these:
#
set default=0
set timeout=5
set menu_color_normal='yellow/blue'
set menu_color_highlight='black/cyan'
if [ $grub_platform = 'efi' ]; then
loadfont /boot/grub/fonts/DejaVuSansMono18.pf2
set gfxmode=auto
terminal_output gfxterm
fi
menuentry "Puppy fossapup64 9.6" {
insmod f2fs
search --no-floppy --fs-uuid --set=root 3e2be9fc-3b25-4807-91ba-66d7dc784b1e
echo "Loading vmlinuz"
linux /pups/F96/vmlinuz net.ifnames=0 pmedia=usbhd pdrv=linc6f18154 psubdir=/pups/F96 pfix=fsck,fsckp TZ=AEST-10AEDT,M10.1.0,M4.1.0/3
if [ -e /pups/F96/local-initrd.gz ]; then
set local_rd=/pups/F96/local-initrd.gz
else
set local_rd=
fi
if [ -e /pups/F96/ucode.cpio ]; then
set ucode_rd=/pups/F96/ucode.cpio
echo "Loading ucode.cpio and initrd.gz"
else
set ucode_rd=
echo "Loading initrd.gz"
fi
initrd $ucode_rd /pups/F96/initrd.gz $local_rd
}
if [ $grub_platform = 'efi' ]; then
menuentry "System BIOS setup" {
fwsetup
}
fi
menuentry "Shutdown computer" {
halt
}
menuentry "Reboot computer" {
reboot
}
mikeslr:
I tried to understand some posts I found about editing a grub2 grub.cfg to allow Puppy to dual boot with Mint (or Ubuntu) but this seems an order of magnitude more complicated than it was for the old grub version.
But I suspect I may need to 'bite the bullet'.... if I can find the right 'bullet' .
Here is the grub.cfg of the Mint partition that seems likely to be the edit-necessay file (the 'DO NOT EDIT THIS FILE' is a bit 'off-putting' so I need to look elsewhere for the file to edit?)
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${initrdfail}" = 2 ]; then
set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
set next_entry="${prev_entry}"
set prev_entry=
save_env prev_entry
if [ "${next_entry}" ]; then
set initrdfail=2
fi
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function initrdfail {
if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
if [ -z "${initrdfail}" ]; then
set initrdfail=1
if [ -n "${boot_once}" ]; then
set prev_entry="${default}"
save_env prev_entry
fi
fi
save_env initrdfail
fi; fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_AU
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if [ ${grub_platform} != pc ]; then
set linux_gfx_mode=keep
elif hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 22 Xfce' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8fbaff08-a528-4ebc-b0c4-06b42c5ab94b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
linux /boot/vmlinuz-6.8.0-51-generic root=UUID=8fbaff08-a528-4ebc-b0c4-06b42c5ab94b ro quiet splash
initrd /boot/initrd.img-6.8.0-51-generic
}
submenu 'Advanced options for Linux Mint 22 Xfce' $menuentry_id_option 'gnulinux-advanced-8fbaff08-a528-4ebc-b0c4-06b42c5ab94b' {
menuentry 'Linux Mint 22 Xfce, with Linux 6.8.0-51-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.8.0-51-generic-advanced-8fbaff08-a528-4ebc-b0c4-06b42c5ab94b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
echo 'Loading Linux 6.8.0-51-generic ...'
linux /boot/vmlinuz-6.8.0-51-generic root=UUID=8fbaff08-a528-4ebc-b0c4-06b42c5ab94b ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.8.0-51-generic
}
menuentry 'Linux Mint 22 Xfce, with Linux 6.8.0-51-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.8.0-51-generic-recovery-8fbaff08-a528-4ebc-b0c4-06b42c5ab94b' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
echo 'Loading Linux 6.8.0-51-generic ...'
linux /boot/vmlinuz-6.8.0-51-generic root=UUID=8fbaff08-a528-4ebc-b0c4-06b42c5ab94b ro recovery nomodeset dis_ucode_ldr
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.8.0-51-generic
}
menuentry 'Linux Mint 22 Xfce, with Linux 6.8.0-38-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.8.0-38-generic-advanced-8fbaff08-a528-4ebc-b0c4-06b42c5ab94b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
echo 'Loading Linux 6.8.0-38-generic ...'
linux /boot/vmlinuz-6.8.0-38-generic root=UUID=8fbaff08-a528-4ebc-b0c4-06b42c5ab94b ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.8.0-38-generic
}
menuentry 'Linux Mint 22 Xfce, with Linux 6.8.0-38-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.8.0-38-generic-recovery-8fbaff08-a528-4ebc-b0c4-06b42c5ab94b' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
echo 'Loading Linux 6.8.0-38-generic ...'
linux /boot/vmlinuz-6.8.0-38-generic root=UUID=8fbaff08-a528-4ebc-b0c4-06b42c5ab94b ro recovery nomodeset dis_ucode_ldr
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.8.0-38-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
insmod bli
fi
### END /etc/grub.d/25_bli ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
fi
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
Thanks again both of you.
David S.
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 12:45 am
by Clarity
One solution that I think you're already apprised: reinstall Mint (non-destructive) and it will 'fix' the boot partition for you with a GRUB2 boot. Then add the grub.cfg change(s) for forum distro boots.
FYI
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 1:23 am
by williwaw
two of the three on the HD may just be pointers to the long offputting one you posted.
It is long and offputting partialy on account of the fact that mint has scripts that generate a new grub.config when you update mint.
1. you could write a simple additional stanza to add to the offputting config but it will be overwritten when mint updates, so you can
2. Write your puppy stanza in a "custom" file in your mint install and run a command in mint to rebuild grub.cfg. the new grub.cfg will then include any custom stanzas in the rebuild. https://help.ubuntu.com/community/Grub2/CustomMenus
there are other programs and grub options to generate stanzas for dualbooting, but your mileage might vary asking mint to generate a puppy stanza.
However you have the template for your needed stanza from your USB grub.cfg.
usb grub.cfg
Code: Select all
menuentry "Puppy fossapup64 9.6" {
insmod f2fs
search --no-floppy --fs-uuid --set=root 3e2be9fc-3b25-4807-91ba-66d7dc784b1e
echo "Loading vmlinuz"
linux /pups/F96/vmlinuz net.ifnames=0 pmedia=usbhd pdrv=linc6f18154 psubdir=/pups/F96 pfix=fsck,fsckp TZ=AEST-10AEDT,M10.1.0,M4.1.0/3
if [ -e /pups/F96/local-initrd.gz ]; then
set local_rd=/pups/F96/local-initrd.gz
else
set local_rd=
fi
if [ -e /pups/F96/ucode.cpio ]; then
set ucode_rd=/pups/F96/ucode.cpio
echo "Loading ucode.cpio and initrd.gz"
else
set ucode_rd=
echo "Loading initrd.gz"
fi
initrd $ucode_rd /pups/F96/initrd.gz $local_rd
}
from the ubuntu link:
Building a Custom Menu
A sample custom menu called 40_custom is provided in the /etc/grub.d/ folder. This file can be used or copied. The current 40_custom file contains only lines which are not actually imported into grub.cfg. In general, users should honor the comments and leave these lines alone, adding custom entries below the existing lines.
so if you were to boot into mint and
A. copy your /pups directory from your USB to / of a mint partition
B. run blkid at the terminal and identify the UUID of the mint partition you copied to
C. substitute the UUID of that mint partition into the line
search --no-floppy --fs-uuid --set=root [color=#4040FF]3e2be9fc-3b25-4807-91ba-66d7dc784b1e[/color]
after you paste the stanza into 40_custom
D. make a backup of your existing grub.cfg in mint to a new directory on your USB
E. read the ubunu doc to see if you wish to change anything else before procedeing to the last line.
all is not lost if something does not boot correctly
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 2:47 am
by davids45
G'day,
Thanks again for the quick responses.
I'll have a go using the custom 40 method at the end of the grub.cfg. There's no critical data on this new computer that I can't re-load from one of the several only-10+-years old computers on my home desk. And re-installs get quicker the more I do, even non-Puppy installs. So I hope there is nothing to lose but time.
I'd already put a couple of frugal pup directories into what I thought was the directory of the boot files for Mint, assuming grub2bootloader would look here to find the bootable Pups:
- Screenshot(3).jpg (38.46 KiB) Viewed 894 times
This is the folder contents for one of these Puppys:
- Screenshot(4).jpg (21.47 KiB) Viewed 894 times
These weren't found in my first tests with the grub2bootloader app., so these should/could be moved where else in the n...p2 Mint directories?
When I get my first Pup dual booting with Mint on this computer, I'd like to add another later (like I did in the 'good old days' pre-eufi).
And thanks again for your help.
David S.
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 4:18 am
by davids45
First try - adding an edited 40_custom section into Mint's grub.cfg in nvme0n1p2:
Fossa files for the frugal-to-be are in directory '64fossa96CE' in / of partition nvme0n1p2 on the Cube's hard-drive
- Screenshot(5).jpg (34.94 KiB) Viewed 880 times
The edits involved changing the UUID to the result found with blkid in terminal, and manual copying this in place of the value in the original post
then changing the Pups directory mentions in the example text to '64fossa96CE', the directory for this in nvme0n1p2 (see above screenshot).
The new bit reads:
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# first try for Mint Puppy on MSI Cube
menuentry "Puppy fossapup64 9.6" {
insmod f2fs
search --no-floppy --fs-uuid --set=root menuentry "Puppy fossapup64 9.6" {
insmod f2fs
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
echo "Loading vmlinuz"
linux /64fossa96CE/vmlinuz net.ifnames=0 pmedia=usbhd pdrv=linc6f18154 psubdir=/64fossa96CE pfix=fsck,fsckp TZ=AEST-10AEDT,M10.1.0,M4.1.0/3
if [ -e /64fossa96CE/local-initrd.gz ]; then
set local_rd=/64fossa96CE/local-initrd.gz
else
set local_rd=
fi
if [ -e /64fossa64CE/ucode.cpio ]; then
set ucode_rd=/64fossa96CE/ucode.cpio
echo "Loading ucode.cpio and initrd.gz"
else
set ucode_rd=
echo "Loading initrd.gz"
fi
initrd $ucode_rd /64fossa96CE/initrd.gz $local_rd
}
### END /etc/grub.d/40_custom ###
If no one sees an obvious typo or syntax error in the above, I'll copy (back-up) the original grub.cfg on the Mint partition and replace it with the edited version.
Then remove the Puppy USB I've been booting with, and start up Mint on the hard-drive with this edited grub.cfg.
David S.
an eternal optimist.
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 4:22 am
by williwaw
davids45 wrote: Mon Jan 20, 2025 2:47 am
G'day,
These weren't found in my first tests with the grub2bootloader app., so these should/could be moved where else in the n...p2 Mint directories?
When I get my first Pup dual booting with Mint on this computer, I'd like to add another later
David S.
you may end up being happier with the different pups living in a linux formatted partition. your different pup folders being subdirectories in /pups (or whatever you name it) along side the mint dirs if placed in n...2
each one will need a slightly different stanza in 40_custom reflecting the directory structure you arrange in /pups (or whatever you name it)
for that matter you could put them in your data dir or even create a ext4 partion for puppies out of the unallocated space so long as the uuid is correct for the partition you choose
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 4:27 am
by williwaw
an extraneous line?
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# first try for Mint Puppy on MSI Cube
menuentry "Puppy fossapup64 9.6" {
insmod f2fs
search --no-floppy --fs-uuid --set=root menuentry "Puppy fossapup64 9.6" {
insmod f2fs
search --no-floppy --fs-uuid --set=root 8fbaff08-a528-4ebc-b0c4-06b42c5ab94b
echo "Loading vmlinuz"
linux /64fossa96CE/vmlinuz net.ifnames=0 pmedia=usbhd pdrv=linc6f18154 psubdir=/64fossa96CE pfix=fsck,fsckp TZ=AEST-10AEDT,M10.1.0,M4.1.0/3
if [ -e /64fossa96CE/local-initrd.gz ]; then
set local_rd=/64fossa96CE/local-initrd.gz
else
set local_rd=
fi
if [ -e /64fossa64CE/ucode.cpio ]; then
set ucode_rd=/64fossa96CE/ucode.cpio
echo "Loading ucode.cpio and initrd.gz"
else
set ucode_rd=
echo "Loading initrd.gz"
fi
initrd $ucode_rd /64fossa96CE/initrd.gz $local_rd
}
### END /etc/grub.d/40_custom ###
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 5:03 am
by williwaw
your 40_custom looks a little different from the example in the link, but it does include the
#!/bin/sh
exec tail -n +3 $0
lines?
posting the code in quotes can be problematic, but using the code block function in the editor will work better if something need to be reviewed further the box at the top with </>
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 5:57 am
by Geek3579
To avoid the need to update-grub from the installed OS, create a text file called custom.cfg and put it in the same directory with the grub.cfg file , which should be in /boot/grub.
Add the required boot script to the text file just as it is, without any bash symbols, etc at the top.
So the file could contain JUST the following type of boot script (for a quickpup64 frugal install in a folder in the partition pointed to by the UUID,
OR several boot scripts in succession :
menuentry " QUICKPUP-64-210923" {
search --no-floppy --fs-uuid --set 5077dd62-647a-4f2a-92a4-4ea4751720f3
linux /QUICKPUP-64-210923/vmlinuz pmedia=ataflash psubdir=QUICKPUP-64-210923 nousbwait=5
initrd /QUICKPUP-64-210923/initrd.xz
}
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 9:46 am
by williwaw
Geek3579 wrote: Mon Jan 20, 2025 5:57 am
To avoid the need to update-grub from the installed OS, create a text file called custom.cfg and put it in the same directory with the grub.cfg file , which should be in /boot/grub.
Add the required boot script to the text file just as it is, without any bash symbols, etc at the top.
So the file could contain JUST the following type of boot script (for a quickpup64 frugal install in a folder in the partition pointed to by the UUID,
OR several boot scripts in succession :
menuentry " QUICKPUP-64-210923" {
search --no-floppy --fs-uuid --set 5077dd62-647a-4f2a-92a4-4ea4751720f3
linux /QUICKPUP-64-210923/vmlinuz pmedia=ataflash psubdir=QUICKPUP-64-210923 nousbwait=5
initrd /QUICKPUP-64-210923/initrd.xz
}
very nice alternative. much simpler actually. I see from https://docs.oracle.com/cd/E26502_01/ht ... glyem.html that grub.cfg must have
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
which already is supplied in davids mint grub.cfg, as supplied by 41_custom at the very last
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
@davids45, as Geek3579 shows above a grub.cfg for puppy can be quite simple
mine is as follows for three frugals
Code: Select all
set default=2
set timeout=10
menuentry "EasyOS Frugal" {
insmod ext2
insmod search_fs_uuid
search --no-floppy --set=root --fs-uuid c7a89fc5-6c50-4122-88f3-71f52a2992fb
linux /easyos/vmlinuz rw wkg_uuid=c7a89fc5-6c50-4122-88f3-71f52a2992fb wkg_dir=easyos
initrd /easyos/initrd
}
menuentry "busterdog " {
insmod ext2
search --no-floppy --fs-uuid --set f6c44663-d5cb-46d0-840b-1732beea1c40
linux /opencpn/BusterDog/live/vmlinuz1 noauto from=/opencpn/BusterDog changes=EXIT:/opencpn/BusterDog/live/
initrd /opencpn/BusterDog/live/initrd1.xz
}
menuentry 'vanilladpup-11 (frugal)'{
insmod ext2
search --no-floppy --set=root --fs-uuid feafecc8-8592-4052-adbb-4264819702e8
linux /v11/vmlinuz pfix=fsck psubdir=/v11 pmedia=ataflash pupsfs=feafecc8-8592-4052-adbb-4264819702e8
initrd /v11/initrd.gz
}
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 10:18 pm
by davids45
G'day,
Thanks williwaw and geek3578 for the continued inputs to this thread.
Having had separate Puppy frugal partitions in my old computers (e.g. one for 32-bitsers, the other for 64-bit Pups), I'm very happy to GParted some of the unallocated space of the Cube hard-drive for a small Puppies-only partition. Formatted in ext4?
And then create a text-file called custom.cfg, based on your examples but with my new details for the new partition and Pup(s) therein, to copy into the /boot/grub/ directory in /nvme0n1p2/, the partition with the Mint boot details (and basic Mint files).
Will then booting via the existing Mint grub.cfg set-up then use this custom.cfg without needing to re-configure the Mint grub.cfg in some way (it has the "41" section already)?
David S.
Re: Grub2config - switch default Puppy boot
Posted: Mon Jan 20, 2025 11:07 pm
by williwaw
yes, that seems how I would do it.
Re: Grub2config - switch default Puppy boot
Posted: Tue Jan 21, 2025 12:19 am
by davids45
G'day,
Rushing in where angels fear to tread........
new partition for Puppies to run from:
- Screenshot(6).jpg (13.55 KiB) Viewed 754 times
finding its UUID with blkid /dev/nvme0n1p4 on terminal gave:
- Screenshot(7).jpg (21.67 KiB) Viewed 754 times
replacing details from example script for a custom.cfg with details for two Pups on this new partition:
- Screenshot(8).jpg (89.11 KiB) Viewed 754 times
new script saved as 'custom.cfg' for test boot from hard-drive with Mint-installed grub2 when copied into its /boot/grub/ directory in /nvme0n1p2/ .
Would I need the 'nousbwait' parameter?
Any obvious error or typos before I actually do it?
Thanks once more for all your time and input.
David S.
Re: Grub2config - switch default Puppy boot
Posted: Tue Jan 21, 2025 4:55 am
by williwaw
some suggestions if it doesnt work
search --no-floppy --fs-uuid --set=root 1a6419xxxxxxxxxxxxxxxxxxxxxx
nousbwait=5 is a parameter I am not famlier with but it needs to be #nousbwait=5 on the 5th line
the edit function on the boot screen lets you make one time only adjustments to your configuration if you have to troubleshoot.
Re: Grub2config - switch default Puppy boot
Posted: Tue Jan 21, 2025 5:22 am
by Geek3579
I use the nousbwait=5 where there is a slower drive, say I am booting from an older USB. "5" represents 5 seconds while the system waits for the drive to settle/register, (or something similar ??)
It is not necessary to use this delay unless the boot process cannot find the linux / kernel files, in which case its worth trying as a fix.
One might argue that it is worth including as a matter of course just to alleviate a possible issue.
On another angle, I only started to become proficient at installing frugal Puppy OS's after I learnt about using the UUID in the forums. Its very effective, especially when booting the same drive on different computers, or cloning drives.
Re: Grub2config - switch default Puppy boot
Posted: Tue Jan 21, 2025 11:58 pm
by josejp2424
Hello everyone,
I noticed you’re discussing how to integrate Puppy Linux into the GRUB of systems like Linux Mint, Debian, or Arch. A while ago, I faced the same challenge and decided to create a script to simplify the process.
This script:
Automatically detects partitions and searches for .sfs and 07 ( kl ) files.
Generates custom entries in the GRUB 40_custom file, including specific configurations for Puppy Linux.
Works on both BIOS and UEFI systems.
Provides a user-friendly graphical interface using yad to install GRUB, update its configuration, or exit the tool.
Additionally, it handles temporarily mounted partitions and ensures that essential boot files like vmlinuz and initrd.gz are correctly located. This guarantees that the generated entries are fully functional.
To be taken into account:
The script is designed to be used specifically on systems like Linux Mint, Debian, or Arch. It does not rely on grub2config; instead, it works with the GRUB package provided by these distributions.
The script is included in a .tar.gz package, which contains all the necessary files organized into their respective folders. All you need to do is extract the package and copy its contents to your system.
Once installed, you can run the tool from the terminal using:
Re: Grub2config - switch default Puppy boot
Posted: Wed Jan 22, 2025 5:00 pm
by josejp2424
josejp2424 wrote: Tue Jan 21, 2025 11:58 pm
The script is designed to be used specifically on systems like Linux Mint, Debian, or Arch. It does not rely on grub2config; instead, it works with the GRUB package provided by these distributions.
The script is included in a .tar.gz package, which contains all the necessary files organized into their respective folders. All you need to do is extract the package and copy its contents to your system.
Once installed, you can run the tool from the terminal using:
I have been testing the script on Manjaro. It works well for me from the installed Manjaro. It didn't work for me in live mode
Re: Grub2config - switch default Puppy boot
Posted: Wed Jan 22, 2025 11:41 pm
by davids45
G'day josejp2424,
Thanks for your two posts. I'll look into your script if it is suitable for getting Puppy installed into a working Mint on my new MSI Cube.
I've been delayed with this Puppy-into-Mint project on the new computer due to Sydney suffering a severe thunderstorm last week which saw our house lose half its electrical power, and being an old house, the loss thought due to perished insulation somewhere under the house. A re-wiring of the dead area is nearly done.
For earlier suggestions of what to do in this thread, I'm still uncertain about where to add Puppy menu scripts into the grub.cfg in Mint, and which grub.cfg to edit as there are several.
So far, in an early try or two, editing the grub.cfg in /boot/grub/ in the Mint partition, I'm not seeing them in a new grub.cfg after I run 'update-grub' in a terminal for my edited grub.cfg, the new grub.cfg is the same as the old one (no Puppy mentioned).
I'll do some more tests with power restored.
David S.
Re: Grub2config - switch default Puppy boot
Posted: Thu Jan 23, 2025 4:13 am
by williwaw
davids45 wrote: Wed Jan 22, 2025 11:41 pm
I'm still uncertain about where to add Puppy menu scripts into the grub.cfg in Mint, and which grub.cfg to edit as there are several.
So far, in an early try or two, editing the grub.cfg in /boot/grub/ in the Mint partition, I'm not seeing them in a new grub.cfg after I run 'update-grub' in a terminal for my edited grub.cfg, the new grub.cfg is the same as the old one (no Puppy mentioned).
I'll do some more tests with power restored.
David S.
the first method mentioned was to edit 40_custom if you want update-grub to include puppy as a choice in the mints grub.cfg
if you edit grub.cfg directly and run grub-update your edit will be gone, as grub-update rewrites grub.cfg and the t rewrite will include anything you put in 40_custom.)
better I think is the suggestion made by Geek3579
create a new file named custom.cfg that contains your puppy stanza and put it in /boot/grub/
/boot/grub/grub.cfg is the longer grub.cfg of the three?
the other 2 grub.cfg files are simple pointers to /boot/grub/grub.cfg?
Re: Grub2config - switch default Puppy boot [SOLVED]
Posted: Fri Jan 24, 2025 11:52 pm
by davids45
Thanks to everyone who contributed to this thread.
The problem of frugal Puppy not being configured to dual-boot with Mint was finally found in my new MSI mini-desktop computer with its UEFI BIOS (UEFI is totally new to me).
With tapping the <Del> key during booting, I had managed to get into the BIOS to try different Boot Order settings (e.g. USB flash, USB hard drive, USB floppy, hard-drive, etc) as I thought the computer was going to Mint on the hard-drive because this boot order was wrong. My experience from all the old computers I have suggested this could be the problem. But nothing changed with changing this order.
Trying all the suggestions about where to put a suitable grub.cfg file, I just about gave up and as a last resort before deleting everything and starting over, I ran the grub2 frugal installer from a Bookworm live USB which did create a new custom.cfg in the sda1 partition (nvme01p1 in uefi-speak) . But the computer continued to boot straight to Mint without any grub menu appearing .
Booting into the BIOS, and reading everything for once, I found at the bottom of the Boot section a button/line I'd ignored - "UEFI Hard Disk BBS Priorities".
Clicking this button gave:
#1 Ubuntu (CT500... (the hard-disk id)
#2 Puppy Linux - Grub2
Switching the order and rebooting produced the anticipated grub menu with Pups and Mint and some other options.
Both Pups (Fossa and Bookworm) booted. Mint also booted but not from the obvious menu line so I will need to edit this menu to suit my expectations.
So apologies to those who contributed ideas in response to my poor description of what I thought was going wrong and that did not explain precisely where the problem was.
Forum-member bigpup is again 'on the money':
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
Right on both points, in my case.
David S.
Re: Grub2config - switch default Puppy boot [SOLVED]
Posted: Sat Jan 25, 2025 12:13 am
by bigpup
Thanks for this information:
Booting into the BIOS, and reading everything for once, I found at the bottom of the Boot section a button/line I'd ignored - "UEFI Hard Disk BBS Priorities".
Clicking this button gave:
#1 Ubuntu (CT500... (the hard-disk id)
#2 Puppy Linux - Grub2
Just when you think you know everything that could be in a computers bios setup.
They add something new.
Here is way more information about it:
UEFI (Unified Extensible Firmware Interface) Hard Disk BBS Priorities is a setting found in the UEFI/BIOS setup that determines the boot order for hard drives and other storage devices connected to the system. BBS stands for "Bootable Device Selection" and refers to the list of devices that the UEFI firmware will check in sequence to see if they are bootable.
When you enter the UEFI/BIOS setup, you may have the option to modify the boot order for various devices like hard drives, SSDs, optical drives, USB drives, and network boot options.
How It Works:
Boot Order: The priority list will allow you to specify which device the system should attempt to boot from first, second, and so on. This is useful if you want to prioritize booting from a specific drive or if you have multiple drives connected to the system.
Hard Disk BBS Priorities: In the "Boot" section of UEFI/BIOS, you will typically see options for "Hard Disk BBS Priorities," where you can configure the order of your hard drives or SSDs. You might see a list of devices like "Hard Drive 1" or "Samsung SSD," for example, and you can move them up or down in the list.
Purpose: This setting is especially useful when you're dual-booting or if you have multiple operating systems installed on separate drives. By configuring the correct priority, you can ensure the system boots into the OS or drive you prefer by default.
How to Modify:
Access UEFI/BIOS: Restart your system and press the appropriate key (commonly F2, DEL, or ESC) during boot to enter the UEFI/BIOS setup.
Navigate to Boot Options: Look for the "Boot" or "Boot Configuration" section in the UEFI/BIOS menu.
Modify Hard Disk BBS Priorities: In this section, you'll be able to set the order of hard disks. Use the designated keys (usually the arrow keys, + or -, or Enter) to modify the order.
Save and Exit: After making the desired changes, save your settings and exit the UEFI/BIOS.
Why Modify Hard Disk BBS Priorities?
Boot Device Selection: If you have multiple drives, you might want to prioritize one for booting (like an SSD for faster boot times) or give priority to a specific operating system.
Multi-OS Setup: If you're dual-booting or have different operating systems installed on different drives, adjusting this priority lets you control which one boots by default.
Re: Grub2config - switch default Puppy boot [SOLVED]
Posted: Sat Jan 25, 2025 12:50 am
by davids45
G'day bigpup,
Thanks for the extra information.
I first read the BBS button in the BIOS and wondered where a bulletin board was involved. I didn't explore this at-the-time strange item any further, but clearly, should have.
But where's the fun if everything just works?
David S.