[Bug 124246] grubby fatal error: unable to find a suitable template
bugzilla at redhat.com
bugzilla at redhat.com
Tue Apr 14 15:37:06 UTC 2009
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=124246
--- Comment #32 from Carl Roth <roth at ursus.net> 2009-04-14 11:37:01 EDT ---
I built grubby/mkinitrd on a F11 rawhide system and turned on the grubby
debugging to try to see what's the matter.
This system is using grubby from mkinitrd-6.0.81-1.fc11.
In my case, I'm trying to upgrade kernel-PAE-2.6.29.1-70.fc11.i686, where my
existing GRUB configuration entry is
default=0
timeout=0
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.29.1-68.fc11.i686.PAE)
root (hd0,0)
kernel /vmlinuz-2.6.29.1-68.fc11.i686.PAE ro
root=/dev/mapper/hitachi0-root rhgb quiet
initrd /initrd-2.6.29.1-68.fc11.i686.PAE.img
The failure appears to be in grubby.c:1087 (suitableImage)... The nash library
extracts the correct root device (/dev/mapper/hitachi0-root), but the stat
calls around line 1144 don't think that the root device corresponds to the
currently-mounted root filesystem.
dev = nashGetPathBySpec(_nash_context, dev);
if (!dev)
return 0;
i = stat(dev, &sb);
if (i)
return 0;
stat("/", &sb2);
if (sb.st_rdev != sb2.st_dev)
return 0;
On my system, the last statement triggers, and suitableImage() returns with
zero (i.e. not a suitable image)
The stat calls show sb (/dev/mapper/hitachi0-root) and sb2 (/) as
(gdb) p sb
$28 = {st_dev = 15, __pad1 = 0, st_ino = 705, st_mode = 25008, st_nlink = 1,
st_uid = 0, st_gid = 6, st_rdev = 64769, __pad2 = 0, st_size = 0,
st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1239649664,
tv_nsec = 304070388}, st_mtim = {tv_sec = 1239649664,
tv_nsec = 171003997}, st_ctim = {tv_sec = 1239649664,
tv_nsec = 171003997}, __unused4 = 0, __unused5 = 0}
(gdb) p sb2
$27 = {st_dev = 17, __pad1 = 0, st_ino = 256, st_mode = 16877, st_nlink = 1,
st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, st_size = 168,
st_blksize = 4096, st_blocks = 8, st_atim = {tv_sec = 1239704224,
tv_nsec = 37719940}, st_mtim = {tv_sec = 1239649715,
tv_nsec = 958735685}, st_ctim = {tv_sec = 1239649715,
tv_nsec = 958735685}, __unused4 = 0, __unused5 = 0}
The offending command-line is
grubby --add-kernel=/boot/vmlinuz-2.6.29.1-70.fc11.i686.PAE --initrd
/boot/initrd-2.6.29.1-70.fc11.i686.PAE.img --copy-default --make-default
--title 'Fedora (2.6.29.1-70.fc11.i686.PAE)'
'--args=root=/dev/mapper/hitachi0-root ' '--remove-kernel=TITLE=Fedora
(2.6.29.1-70.fc11.i686.PAE)'
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the triage
mailing list