¿Cómo hacer que las opciones de arranque de kernels alternativos se muestren en el menú GRUB de nivel superior?

¿Cómo hacer que las opciones de arranque de kernels alternativos se muestren en el menú GRUB de nivel superior?

Utilizo Gentoo Linux como mi único sistema operativo, por lo que me gustaría mostrar las opciones de arranque de Gentoo ocultas en la entrada "Opciones avanzadas para Gentoo Linux" en mi nivel superior (es decir, en el que comienza GRUB, un menú de nivel inferior será el menú que se muestra cuando selecciono y presiono enter en la opción "Opciones avanzadas para Gentoo Linux") Menú GRUB, ¿es esto posible? Sé que podría editar manualmente /boot/grub/grub.cfgpara hacer esto, pero me gustaría una solución más permanente para no tener que seguir editando mi /boot/grub/grub.cfgarchivo manualmente cada vez que grub-mkconfig -o /boot/grub/grub.cfglo vuelva a ejecutar. Como me gustaría poder elegir un kernel alternativo tan pronto como se inicie GRUB, sin tener que buscar la opción dentro del menú "Opciones avanzadas para Gentoo Linux". Para que quede claro, estoy usando GRUB2, no GRUB Legacy.

Respuesta1

No estoy acostumbrado a Gentoo (solo Ubuntu). Pero ahí en /etc/grub.d/10_linuxla configuración se hace, usando variables definidas en /etc/default/grub(las rutas pueden diferir en Gentoo). Ver man grub-mkconfigo info -f grub -n 'Simple configuration'. Este último dice:

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'
lines...

'GRUB_DISABLE_SUBMENU'
     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'.

Entonces, busca /etc/default/grub(o donde sea que esté) y configura GRUB_DISABLE_SUBMENU=y. Luego vuelva a ejecutar grub-mkconfig.

información relacionada