Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236417

Re: grub2 boot menu

From Felix Miata <mrmazda@earthlink.net>
Newsgroups linux.debian.user
Subject Re: grub2 boot menu
Date 2021-06-24 16:40 +0200
Message-ID <CtyGm-4bP-5@gated-at.bofh.it> (permalink)
References <Ctydk-42p-17@gated-at.bofh.it> <Ctydk-42p-19@gated-at.bofh.it>
Organization less than infinite

Show all headers | View raw


mick crane composed on 2021-06-24 14:51 (UTC+0100):

> I was dual booting but got another PC so I can have windows and debain 
> at the same time. Just for tidiness of booting I'd have liked to comment 
> out the submenu entry in /boot/grub/grub.cfg for windows just in case I 
> wanted to put it back but not allowed.
> Physically removing the windows disk and "grub-mkconfig" and/or 
> "update-grub" sorts itself out but is there any way to do this manually 
> as used to be the case ?
											
You can use any of:
/etc/grub.d/40_custom 
/etc/grub.d/41_custom
/boot/grub/custom.cfg
or 40_custom and/or 41_custom copied e.g. to
/etc/grub.d/06_custom or /etc/grub.d/07_custom.
The actual names in /etc/grub.d/ do not seem to be carved in stone, but
/boot/grub/custom.cfg does seem to be. Within the /etc/grub.d/ hierarchy,
the names affect where the custom entries appear in the boot menu. Before
10 entries are first listed, the 4x entries are shown after the auto-generated
entries. I use custom.cfg, which I populate with the kernel & initrd symlinks
so that need to maintain custom.cfg is minimal.

The custom.cfg entries can be seriously simplified compared to the auto-generated
ones. e.g.:

menuentry "Debian 11 Bullseye defkernel" {
	search --no-floppy --set=root --hint-baremetal=ahci0,gpt9 --label tg1p09deb11
	linuxefi	/vmlinuz root=LABEL=tg1p09deb11 noresume ipv6.disable=1 net.ifnames=0 mitigations=auto consoleblank=0 
	initrdefi	/initrd.img
}

Note omission of UUIDs and inclusion of volume labels in their place.
-- 
Evolution as taught in public schools is, like religion,
	based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: grub2 boot menu Felix Miata <mrmazda@earthlink.net> - 2021-06-24 16:40 +0200
  Re: grub2 boot menu The Wanderer <wanderer@fastmail.fm> - 2021-06-24 16:50 +0200

csiph-web