Created attachment 290789 [details, diff] Patch for genkernel to support BOOTLOADER="grub2" Hi there, Here's a quick patch for adding grub2 support to genkernel. It's very simple because grub2-mkconfig does most of the hard work that we used to in the old gen_bootloader.sh. It currently fails if there is no existing grub2 config file present, but it could be made to always create grub.cfg if necessary. This applies to the current git HEAD and 3.4.18... This is activated by adding grub2 to the BOOTLOADER configuration variable. Please let me know if there's any additional features required, or bugs found, etc...
not to be picky, but a message in the style of "to customize bootparameters for grub2, please see /etc/defaults/grub" could be nice.
Created attachment 298597 [details, diff] Little modification of previous grub2 patch This patch add supports for different grub installation directories. I am using live (-9999) of grub on some of my machines built using customized ebuild so this patch can work badly for stock sys-boot/grub:2 installations...
Several new versions of genkernel have come out since this patch was posted. Has any progress been made on this? Is there a particular stopping point or problem with this, or anything we can do help this get included?
(In reply to comment #3) > Several new versions of genkernel have come out since this patch was posted. > Has any progress been made on this? Is there a particular stopping point or > problem with this, or anything we can do help this get included? You may not like this, but this an honest answer: I haven't dared touching this yet, not sure if I will. Afaik Grub 1 integration is broken, I use a handmade menu.lst here with Grub 1 here and I have no personal motivation to move to Grub 2, yet.
Fair enough. I worked on the grub1 integration a while ago, and as far as I'm aware it's very basic but should still work (it greps to find the previous copy of the kernel and then duplicates the necessary line for it). The nice thing about grub2 is it's even easier, because you don't make any changes to the configuration yourself, you just rerun grub2-mkconfig, and it'll generate it for you (with new kernels included). The patch is therefore just a convenience to running grub2-mkconfig afterwards, but given how simple it is, it seemed like it would be easy to add in (particularly since I think there's a push in the main tree to have people start testing/using grub2). Let me know if there's anything else I can do to help get it in the tree, otherwise I guess it'll languish here for a while longer... Thanks for the honest answer! 5:)
Hiya Sebastian, have you had a chance to investigate this yet? It's really just a ten line patch, but there have been several new genkernel versions since then, and every time it requires a local bump just to apply this one patch (which has no effect on any existing code). Please, when you get just 5 minutes, could you give this a look and let me know if it's ok to go in the next version?
Commited in [1] and refactored in [2]. Please give branch bug-388437 a try # git clone git://git.overlays.gentoo.org/proj/genkernel.git # cd genkernel # git checkout -t origin/bug-388437 # GK_SHARE="$PWD" ./genkernel initramfs --no-install --no-postclear and report back so I can merge it into master. [1] http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=fd1f01f299b6e4e5d6963d61a72ad09578cd4e77 [2] http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=4971b9540af101b62f0a9f102d3be3d876d1868f
There seems to have been a typo in Tomasz's version. Testing with grub-2.00_beta2-r1 in the main portage tree this fails because the program names are transformed from grub-mkconfig to grub2-mkconfig, whilst Tomasz's patch calls grub-mkconfig (which doesn't exist). Other than that typo, this appears to work fine, thanks for putting the time in Sebastian, it's much appreciated! 5:)
(In reply to comment #8) > There seems to have been a typo in Tomasz's version. Testing with > grub-2.00_beta2-r1 in the main portage tree this fails because the program > names are transformed from grub-mkconfig to grub2-mkconfig, whilst Tomasz's > patch calls grub-mkconfig (which doesn't exist). Good catch, fixed: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=89ec359dbc21be79f03067c9cfa54cdad9db416d > Other than that typo, this > appears to work fine, thanks for putting the time in Sebastian, it's much > appreciated! 5:) Thanks for the review. +*genkernel-3.4.29 (08 Apr 2012) + + 08 Apr 2012; Sebastian Pipping <sping@gentoo.org> +genkernel-3.4.29.ebuild: + Bump to 3.4.29 +