Page 1 of 1

Adding blank lines in GRUB2 menus [SOLVED]

Posted: Mon Feb 27, 2023 6:15 pm
by houndstooth

In GRUB4DOS you can add a blank line to your boot menu with this entry:

Code: Select all

title
root

Alas, this does not work in GRUB2. Anyone know the equivalent?


Re: Adding blank lines in GRUB2 menus

Posted: Tue Feb 28, 2023 6:11 am
by Geek3579

I just put in blank lines in GRUB2 without any problems...
But for readability I usually keep lines of code for one frugal OS together with comment lines as required to remind me of specific changes.

# 03 DPUP_Buster64

menuentry " DPUP_Buster64_Mate" {
search --no-floppy --fs-uuid --set 1c48a2d8-bdbb-4cf5-a620-e43c95e51a05
# Comment line as required
linux /DPUP_Buster64_Mate/vmlinuz pmedia=usbflash psubdir=/DPUP_Buster64_Mate nousbwait=5
initrd /DPUP_Buster64_Mate/initrd.gz

}


Re: Adding blank lines in GRUB2 menus

Posted: Tue Feb 28, 2023 7:07 am
by houndstooth
Geek3579 wrote: Tue Feb 28, 2023 6:11 am

I just put in blank lines in GRUB2 without any problems...

Ok


Re: Adding blank lines in GRUB2 menus

Posted: Tue Feb 28, 2023 12:39 pm
by mikewalsh

@houndstooth :-

I take my hat off to you, young sir. Thank you!

I've been trying to figure out if there was a way to do this for simply AGES. I've long wanted a way to "organise" my boot menu a bit better, so I could more clearly separate out 64-bit Pups from 32-bit ones. Never occurred to me to simply put a 'blank' root entry; I've been researching this on and off for years, but I've never found any reference to how it could be accomplished.

In my case, I've used 'lines' instead of just blanks. And so, thus:-

Image

That 'middle' entry is 32-bit Xenialpup.....but it's set-up with peebee's 64-bit compat libs SFS, so it's a kind of 'Frankenpup', midway betwixt the two. Posting this from it now, using 64-bit Brave browser.....

Thanks again. :thumbup: :D

Mike. ;)


Re: Adding blank lines in GRUB2 menus

Posted: Tue Feb 28, 2023 1:52 pm
by Fossil

@houndstooth. Thanks! Such an easy workaround but necessary - this machine has seventy-two (72) different forms of Puppy Linux on the hard drive; ranging from the present forms back to Starlight and several 431's. The menu is 'slightly' overstretched. :lol:
Don't ask me why: it was a project that went a bit OTT! :geek: :roll:


Re: Adding blank lines in GRUB2 menus

Posted: Tue Feb 28, 2023 10:42 pm
by oldaolgeezer

Adding blank lines in GRUB2 menus

I only have one UEFI GRUB2 PC, but I found I could insert
blank spacing lines in my grub.cfg file on my
bootable USB drive with this entry:

menuentry ' '{
true
}

On this one UEFI GRUB2 PC, I keep all my Puppy iso files on my C:\ hard drive
and my small bootable USB drive has only four files
(one of which is my grub.cfg file) and and the USB drive has boot flag:

my grub.cfg file (with the blank spacing lines) can be seen on the old forum
here: (scroll down)

This is from: https://oldforum.puppylinux.com/viewtopic.php?t=112224

(In 2017 I had only about six folders with Puppy Linux iso files on my
C:\ hard drive. Now I have eleven folders with Puppy Linux iso files on my
C:\ hard drive.)


Re: Adding blank lines in GRUB2 menus

Posted: Wed Mar 01, 2023 5:03 am
by Geek3579
oldaolgeezer wrote: Tue Feb 28, 2023 10:42 pm

Adding blank lines in GRUB2 menus

I only have one UEFI GRUB2 PC, but I found I could insert
blank spacing lines in my grub.cfg file on my
bootable USB drive with this entry:

menuentry ' '{
true
}

On this one UEFI GRUB2 PC, I keep all my Puppy iso files on my C:\ hard drive
and my small bootable USB drive has only four files
(one of which is my grub.cfg file) and and the USB drive has boot flag:

my grub.cfg file (with the blank spacing lines) can be seen on the old forum
here: (scroll down)

This is from: https://oldforum.puppylinux.com/viewtopic.php?t=112224

(In 2017 I had only about six folders with Puppy Linux iso files on my
C:\ hard drive. Now I have eleven folders with Puppy Linux iso files on my
C:\ hard drive.)

Sorry, I thought the question was about blank lines in the GRUB SCRIPT, not the GRUB MENU !!! Seniors moment ...again !!

The solution:

menuentry ' '{
true
}

is very elegant. Thanks. Now I will use it !!