Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492774 - sys-boot/grub-2.00_p5107-r2 fails to automatically pick up genkernel-generated initramfs files while using grub2-mkconfig
Summary: sys-boot/grub-2.00_p5107-r2 fails to automatically pick up genkernel-generate...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-11-28 10:02 UTC by Sergey Temerkhanov
Modified: 2013-12-09 23:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch adding the correct guessing option for genkernel-generated initramfs files (grub2.patch,545 bytes, patch)
2013-11-28 10:07 UTC, Sergey Temerkhanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Temerkhanov 2013-11-28 10:02:19 UTC
When using 'grub2-mkconfig -o /boot/grub/grub.cfg' command to create a grub-2 configuration file, the script fails to find the initramfs files if those are named like "initramfs-<kernel_name>-<architecture>-<version>" (like ) as the genkernel names them with the --kernname=kernel_name parameter. This leads to a number of problems varying from simple usage of device names instead of UUIDs to inability to boot without manual correction of grub configuration. 

Reproducible: Always

Steps to Reproduce:
1. emerge \>sys-boot/grub-2 sys-kernel/genkernel
2. grub2-mkconfig -o /boot/grub/grub.cfg
3. genkernel --kernname=<kernel_name> --install all
4. Get 3 files in the /boot: {System.map, initramfs,kernel}-<architecture>-<version>
5. grub2-mkconfig -o /boot/grub/grub.cfg



Actual Results:  
There are boot menu entries without "initrd" clauses and with device file names instead of uuids for the "root" parameter at the "linux" lines which one has to correct manually.

Expected Results:  
Boot menu entries with proper "initrd" clauses and with uuids for the "root" parameter at the "linux" lines without any need to manually correct the config.

That is caused by the list of possible initramfs file names in the /etc/grub.d/10_linux script being insufficient. The proposed patch adds the missing entry which is produced from the kernel file name by simple replacement of the word "kernel" by "initramfs".
Comment 1 Sergey Temerkhanov 2013-11-28 10:07:25 UTC
Created attachment 364128 [details, diff]
The patch adding the correct guessing option for genkernel-generated initramfs files
Comment 2 Mike Gilbert gentoo-dev 2013-12-09 23:39:51 UTC
Please submit your patch on the grub-devel mailing list for review.

https://lists.gnu.org/mailman/listinfo/grub-devel

You should also include an appropriate entry in the ChangeLog file.

GRUB is entering a feature-freeze on December 17, so please submit this before then to have it included in the next version of GRUB.

Feel free to reopen this bug once upstream has approved the patch.