Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386631 - sys-boot/grub-1.99-r2 mkconfig fails to find genkernel initramfs image on x86_64
Summary: sys-boot/grub-1.99-r2 mkconfig fails to find genkernel initramfs image on x86_64
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Tomáš Chvátal (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 10:15 UTC by Kai Dietrich
Modified: 2011-10-11 19:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Dietrich 2011-10-10 10:15:00 UTC
genkernel names it's initramfs like this:
initramfs-genkernel-x86_64-2.6.36-hardened-r9

(using =sys-kernel/genkernel-3.4.16)

while /etc/grub.d/10_linux only searches for:


  for i in "initrd.img-${version}" "initrd-${version}.img" \
           "initrd-${version}" "initramfs-${version}.img" \
           "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
           "initrd-${alt_version}" "initramfs-${alt_version}.img" \
           "initramfs-genkernel-${version}" \
           "initramfs-genkernel-${alt_version}" \
    if test -e "${dirname}/${i}" ; then
      initrd="$i"
      break
    fi
  done

where version and alt-version seems to not include the plaform (x86_64)

When executing grub2-mkconfig, it fails to find the initramfs.
I solved this problem with a simple additional x86_64 search pattern.




Reproducible: Always

Steps to Reproduce:
1. compile a kernel, name it kernel-2.6.36-hardened-r9
2. run "genkernel initramfs" to create a ramfs
3. run grub2-mkconfig
Actual Results:  
generated grub.cfg doesn't load the initramfs generated by genkernel

Expected Results:  
generated grub.cfg should load the initramfs generated by genkernel
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2011-10-11 09:18:27 UTC
Hmm, i use genkernel and it gets found.

grub.conf snip:
        set root='(arcarius-root)'
        search --no-floppy --fs-uuid --set=root 3613ddf1-642e-4899-a69d-b0529c3d8466
        echo    'Loading Linux x86_64-3.0.6-gentoo ...'
        linux   /boot/kernel-genkernel-x86_64-3.0.6-gentoo root=/dev/mapper/arcarius-root ro rootfslinux=ext4 dolvm 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-genkernel-x86_64-3.0.6-gentoo

I wonder why it gets found on my system, could you edit that /etc/grub.d/10_linux and echo content for the alt_version and version?

Just modify it to do something like this on line 156+

  echo "version: $version" >&2
  echo "alt-version: $alt_version" >&2

If I do so these are result for my system:

Found linux image: /boot/kernel-genkernel-x86_64-3.0.6-gentoo
version: x86_64-3.0.6-gentoo
alt-version: x86_64-3.0.6-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.0.6-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.0.4-gentoo
version: x86_64-3.0.4-gentoo
alt-version: x86_64-3.0.4-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.0.4-gentoo
Comment 2 Kai Dietrich 2011-10-11 19:02:08 UTC
duh,

I compiled the kernel by hand and just had a different naming scheme than genkernel.

Found linux image: /boot/kernel-2.6.36-hardened-r9
version: 2.6.36-hardened-r9
alt_version: 2.6.36-hardened-r9

which is of course right but doesn't include the platform.