When genkernel generates a new kernel/initrd, it updates grub configuration file with a new entry for the new kernel. Reproducible: Always Steps to Reproduce: 1. 2. 3. This patch creates a new file gen_bootloader.sh and uses a new variable in /etc/genkernel.conf : BOOTLOADER. If BOOTLOADER is defined and equal to "grub", genkernel updates grub.conf with a definition for the new kernel. If grub.conf has already kernel definitions, it just copies the first definition and updates the kernel and initrd version. If not, it generates a default kernel definition in grub.conf If BOOTLOADER is not set, nothing happens.
Created attachment 35739 [details, diff] patch to add automatic grub configuration update. The patch to add support for automatic grub configuration update.
Could we have a --bootloader=grub option as well please?
Created attachment 35831 [details, diff] Add --bootloader=grub option to first patch. Add --bootloader option.
Now in source CVS; I'll roll a new release with this patch and a few others soon. Thanks a lot!
The patch should be in Portage with genkernel-3.0.2e; please reopen this bug if you have any issues with it. Thanks!
Created attachment 37625 [details, diff] Patch : put the new kernel definition as the first entry in grub.conf Here is an updated version of the patch (against 3.0.2e) Now, the new kernel entry is added at the first position in grub.conf, so that the new kernel will be the default one on the next reboot. I've also included some comments at the begining of the grub.conf file to explain what structure genkernel expects to find.
New patch.
A few ideas... Firstly, I see no reason for having a date in the file; genkernel logs as well as the mtime of the file would serve that purpose. Also, the configuration file seems very bulky and I do not see why the format should be documented in the configuration file since the GRUB documentation deals with it. I think the best solution would be to simply keep the feature for the new entry to be at the start of the list, and maybe add a comment such as: "# Genkernel generated entry, see GRUB documentation for details" above the entries that are added? And instead of quoting that the topmost entry is used, maybe genkernel could just print the entry name from which the new one is generated when it configures the bootloader?
Created attachment 37691 [details, diff] update to patch 37625 to remove section comments This is a new version of the patch to put new kernel definition as the first entry in grub.conf. It removes all the comments and the date in the auto-generated grub.conf.
Closing. jhuebel assures me that your problem can be solved by doing "modprobe ide-disk" instead of the mknod stuff. Hopefully, this should be fixed for the 2004.3 release.
...? Um, wrong bug? Reopening.
Oh yeah, how strange! Sorry about that. Tim, grub-0.95.20040823 has a new "savedefault" option. Whether you can hook into this or not I don't know - it would be more reliable than manually editing the configuration file if you can, though, as this is guaranteed to follow any changes that the grub developers make to the configuration file.
Tim - actually, the thing in question is "/sbin/grub-set-default".
New patch (attachment #37691 [details, diff]) in genkernel-3.0.2g; please reopen this bug if you have any problems. Thanks!