I use Gentoo Linux as my sole OS, so I would like to show the Gentoo boot options hiding in the "Advanced Options for Gentoo Linux" entry in my top-level (i.e., the one GRUB starts at, a lower-level menu would be the menu shown when I select and press enter on the "Advanced Options for Gentoo Linux" option) GRUB menu, is this possible? I know I could manually edit /boot/grub/grub.cfg to get this done, but I would like a more permanent solution so I don't have to keep editing my /boot/grub/grub.cfg file manually whenever grub-mkconfig -o /boot/grub/grub.cfg is re-run. As I would like to be able to choose an alternate kernel as soon as GRUB starts, without having to find the option within the "Advanced Options for Gentoo Linux" menu. To be clear I am using GRUB2 not GRUB Legacy.

1 Answer 1


I am not used to Gentoo (only Ubuntu). But there in /etc/grub.d/10_linux the configuration is done, using variables defined in /etc/default/grub (paths may differ in Gentoo). See man grub-mkconfig or info -f grub -n 'Simple configuration'. The latter says:

The file '/etc/default/grub' controls the operation of
'grub-mkconfig'.  It is sourced by a shell script, and so must be valid
POSIX shell input; normally, it will just be a sequence of 'KEY=value'

     Normally, 'grub-mkconfig' will generate top level menu entry for
     the kernel with highest version number and put all other found
     kernels or alternative menu entries for recovery mode in submenu.
     For entries returned by 'os-prober' first entry will be put on top
     level and all others in submenu.  If this option is set to 'y',
     flat menu with all entries on top level will be generated instead.
     Changing this option will require changing existing values of
     'GRUB_DEFAULT', 'fallback' (*note fallback::) and 'default' (*note
     default::) environment variables as well as saved default entry
     using 'grub-set-default' and value used with 'grub-reboot'.

So, look for /etc/default/grub (or whereever it is) and setGRUB_DISABLE_SUBMENU=y. Then rerun grub-mkconfig.

  • Surprised it was this easy, but thanks.
    – Josh Pinto
    Apr 22, 2017 at 11:20
  • That's linux - most things are easy, when you know how to do.
    – ridgy
    Apr 22, 2017 at 12:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .