On Tue, Oct 18, 2016 at 1:20 PM, Joakim Tjernlund <joakim.tjernl...@infinera.com> wrote: > On Tue, 2016-10-18 at 12:45 -0400, Tom H wrote: >> On Tue, Oct 11, 2016 at 10:54 AM, M. J. Everitt <m.j.ever...@iee.org> wrote: >>> On 11/10/16 15:42, Tom H wrote: >>>> >>>> You can use exactly the same text in 40_grub that you'd use in >>>> grub.cfg and have the latter generated. >>> >>> That's a useful tit-bit .. thanks! >> >> You're welcome. >> >> I doubt that the grub developers intended 40_custom to be the only >> "/etc/grub.d/" file to be executed but it's practical for generating a >> simple grub.cfg. This is what I use in a Debian VM: > > We still use grub-1 and I really like the automatic generation of new > grub menu entries using genkernel --bootloader=grub, does this work > with grub2 as well?
It looks ike you can pass "--bootloader=grub2" but it's not documented in the man page because gen_bootloader.sh has: set_bootloader() { case "${BOOTLOADER}" in grub) set_bootloader_grub ;; grub2) set_bootloader_grub2 ;; *) print_warning "Bootloader ${BOOTLOADER} is not currently supported" ;; esac } but it looks like, unlike for grub-legacy, you need a grub config file ("/boot/grub{,2}/grub.cfg") to exist.