Ask Your Question

Where is grub2 menu stored?

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

hsljo gravatar image

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

On my system /etc/defaults/grub contains only

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX=" rd.luks.uuid=luks-........... quiet"

Where can I find actual menu item definitions?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

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

villykruse gravatar image

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

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


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 -0500 )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 -0500 )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 -0500 )edit

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

lsatenstein gravatar image

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


edit flag offensive delete link more

Question Tools

1 follower


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

Seen: 250 times

Last updated: May 12 '18