You are not logged in.
After searching, I don't think this specific case has been addressed on the forum, but I could have missed it.
I am using a custom kernel based on the PKGBUILD in the abs (version 3.0.1-1). I used basically the same procedure to modify the PKGBUILD that I previously used when building a custom kernel26 package. The end result is a kernel with an additional version name installed along side the stock kernel, i.e. (note: I went ahead and removed the symlinks that were created for backward compatability)
$ ls /boot
grub/ initramfs-linux-mbp-fallback.img vmlinuz-linux
initramfs-linux-fallback.img initramfs-linux-mbp.img vmlinuz-linux-mbp
initramfs-linux.img syslinux/
The problem is that when I updated the grub2 menu, it missed the initramfs-linux-mbp.img file and therefore the custom kernel wouldn't boot. The solution I found was to edit the file /etc/grub.d/10_linux as follows:
Change
initrd=
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}" \
"${basename/vmlinuz/kernel}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
to
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" \
"initrd-${version}" "initramfs-${version}.img" "initramfs-linux-${version}.img" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
"initramfs-genkernel-${alt_version}" \
"${basename/vmlinuz/kernel}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
where the important bit is the "initramfs-linux-${version}.img" entry on the second line of the list.
I think this is an unintended side effect of the recent change in the naming convention for kernels >= 3.0. Since the previous configuration had the stock initramfs as "kernel26.img", adding a custom version "ver" to the kernel would result in a "kernel26-ver.img".
However, with the new convention, the stock initramfs is "initramfs-linux.img" and /etc/grub.d/10_linux script treats the -linux portion as the version. While for a custom version "ver" the initramfs would be "initramfs-linux-ver.img" which gets missed by the /etc/grub.d/10_linux script because it is searching for a file called "initramfs-ver.img".
Is this
a) a bug that should be reported upstream,
b) a bug in the grub2 Arch package,
c) an oversight in the new naming convention
d) a misunderstanding and/or misconfiguration on my part?
Offline
The problem was discovered and a proposed solution is on another thread.
https://bbs.archlinux.org/viewtopic.php?id=124083
Nevermind, your problem isn't with the initramfs creation but grub2.
Last edited by slytux (2011-08-11 16:28:14)
Offline
This is a known issue with grub2. Ronald has been contacted and knows about it.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
@mad - does your fix work with the stock packages as well as custom packages? If so, I would suggest you submit it as a patch for the official grub2 packages.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Better would be to change (last line in for...do)
"${basename/vmlinuz/kernel}.img"; do
to
"${basename/vmlinuz/initramfs}.img"; do
Or if you use only Arch, you can always maintain grub.cfg manually since the kernel and initramfs filenames do not change across package updates in Arch.
Last edited by skodabenz (2011-08-13 18:39:46)
My new forum user/nick name is "the.ridikulus.rat" .
Offline