Genkernel unconditionally assumes the place to put grub configurations is called "grub.conf". That is only true if the grub in question is sys-boot/grub:1. If we are talking about sys-boot/grub:2, the correct filename is "grub.cfg". It probably W4U because you have a symlink /boot/grub/grub.conf -> /boot/grub/grub.cfg. However, if the user has (U)EFI and followed the handbook (and the best practice (standard(?)) for creating the EFI system partitions), their /boot is a fat32 partition, which does not support symlinks. Hence, again following the handbook, they end up with both files, /boot/grub/grub.c{onf,fg}, likely with different contents, one ancient and crusty from back when they followed the handbook, and one regenerated automatically by genkernel each time a kernel is built, but grub always uses the ancient and crusty /boot/grub/grub.cfg. Eventually this will lead to something unpleasant happening. Something like: has_version sys-boot/grub:2 && \ { sed -e 's/grub\.conf/grub.cfg/g' -i gen_bootloader.sh || die ; } in src_prepare, while not a full solution*, might be better than nothing. -- * All sorts of scenarios are possible, of course, which this wouldn't help with. But to give a concrete example: user migrates from grub:1 to grub:2, only to discover that, now, their genkernel is acting wierd, until they happen to re-emerge it. Point is, this behavior is less dumb for more people, even if it's still super dumb. Betcha genkernel-next already has this fixed, in which case, borrowing their solution would presumedly be another option to fix this in a less gross way.
genkernel already does use grub.cfg when you set BOOTLOADER=grub2
Huh, it seems you are right, i.e.: ./usr/share/genkernel/gen_bootloader.sh:34:set_bootloader_grub2() { ./usr/share/genkernel/gen_bootloader.sh-35- local GRUB_CONF ./usr/share/genkernel/gen_bootloader.sh-36- for candidate in \ ./usr/share/genkernel/gen_bootloader.sh-37- "${BOOTDIR}/grub/grub.cfg" \ ./usr/share/genkernel/gen_bootloader.sh:38: "${BOOTDIR}/grub2/grub.cfg" \ ./usr/share/genkernel/gen_bootloader.sh-39- ; do ./usr/share/genkernel/gen_bootloader.sh-40- if [[ -e "${candidate}" ]]; then ./usr/share/genkernel/gen_bootloader.sh-41- GRUB_CONF=${candidate} In that case the default /etc/genkernel.conf should really mention this. Right now it just says: # Add new kernel to grub? #BOOTLOADER="grub" And nothing else really seems to document this (it's sort-of casually mentioned in the Genkernel wiki page where they just changed the example to read: # Add new kernel to grub2? BOOTLOADER="grub2" without explicitly mentioning the grub{,2} thing. But nobody's going to notice that subtle clue--at least, I sure didn't.)
Already in git, https://gitweb.gentoo.org/proj/genkernel.git/commit/genkernel.conf?id=6454b9ed43325149f3ccb3bab35a42b745d0369b