Ask Your Question
1

Where is grub2 menu stored?

asked 2018-05-12 07:56:39 -0600

hsljo gravatar image

updated 2018-05-12 07:57:08 -0600

On my system /etc/defaults/grub contains only

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rd.luks.uuid=luks-........... rd.lvm.lv=fedora/swap quiet"
GRUB_DISABLE_RECOVERY="true"

Where can I find actual menu item definitions?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-05-12 08:12:41 -0600

villykruse gravatar image

updated 2018-05-12 13:16:47 -0600

The grub menu is defined in the configuration file

The file is either /boot/efi/EFI/fedora/grub.cfg or /boot/grub2/grub.cfg depending on if you are using UEFI boot or old fashioned BIOS boot.

/etc/defaults/grub is used by grub2-mkconfig to create this configuration file.

edit flag offensive delete link more

Comments

I recall having menu items outside of grub.cfg which gets regenerated. Is that not so?

hsljo gravatar imagehsljo ( 2018-05-12 08:27:44 -0600 )edit

grub2-mkconfig scans the boot directory for kernel images, and based on that builds the menu, It also scan other disk file systems for possible other operating systems so it can create menu entries for those.

You can also create customized files in the /etc/grub.d directory.

villykruse gravatar imagevillykruse ( 2018-05-12 13:16:31 -0600 )edit

So is there no way to exclude some kernels from Grub menu, or change their order and persist those changes across regeneration of grub.cfg?

hsljo gravatar imagehsljo ( 2018-05-12 20:40:40 -0600 )edit
0

answered 2018-05-12 08:41:17 -0600

lsatenstein gravatar image

If you mean the menu that is presented to you at boot time, it is stored within

/boot/grub2/grub.cfg

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-12 07:56:39 -0600

Seen: 238 times

Last updated: May 12 '18