User:Goverp/ReusableGRUBMenu

This article contains Article description::a manual grub configuration file for an unthemed grub menu, suitable for simple Gentoo (and similar) linux installations. Once installed, it's no longer necessary to run grub-mkconfig after installing a new kernel. The menu code is a lot simpler than that generated by grub-mkconfig. It should work with both BIOS and GPT partition setups. It probably only works for x86/IA64 architectures

The article assumes familiarity with GRUB and Gentoo Linux Kernel configuration.

It may be worthwhile to use "grub-mkconfig" on your system first, and compare the resulting configuration with the one here, especially for machines with different operating systems installed, or configured to use advanced features such as root file systems on RAID arrays or encrypted file systems.

See some  below.


 * Remember that a broken grub.cfg means you may have to use the GRUB command line to boot your system.
 * Always run before installing a manually-edited grub configuration.
 * Install or reinstall including the "emu" platform to provide a grub test environment:


 * Create your new grub configuration in a test directory, say and then run  to test it.  Use grub's "e" key to edit (or in reality see) the resulting menu entries.  (Terminate the emulator by entering command mode and typing "exit".)  Only move the configuration into  when you are completely happy it's correct.
 * If all else fails, it should be possible to enter the grub command line, and enter something like

The configuration provides:
 * entries to boot kernels identified by links such as vmlinuz, vmlinuz.old and for consistency, vmlinuz.new;
 * a submenu of all vmlinux-v.r.m-xxxx entries so you can boot a chosen kernel by version/release/modification level; and
 * a submenu of kernels booted with a recovery option.

Example menus
The following menu and submenu are screen images captured from "grub-emu" in a terminal window, and do not show the graphics background.

The main menu:

The Kernels by version submenu: