Easy selection of menu entry for grub-reboot
|Related pages:||#189: GRUB|
grub-reboot expects a menu entry taken out of grub.cfg.
From the man page:
grub-reboot [OPTION] MENU_ENTRY
MENU_ENTRY is a number, a menu item title or a menu item identifier. Please note that menu items in submenus or sub-submenus require specifying the submenu com‐
ponents and then the menu item component. The titles should be separated using the greater-than character (>) with no extra spaces. Depending on your shell some
characters including > may need escaping. More information about this is available in the GRUB Manual in the section about the 'default' command.
The problem is that this is error prone. Many wiki pages and tutorials already exist that explain how the menu entries and sub-menu entries are numbered. One has to manually parse grub.cfg, which looks more like a full-blown script rather than a configuration file, and try to understand which menu entry is which. This is particularly painful on a remote server when we are not there to see the actual boot menu when the server is restarted.
Why can grub-reboot and co. provide a listing that is easily understood, with all the grub boot entries listed with their full names and numbered using integers, so that the administrator only needs to pick the appropriate number?