CentOS Bug Tracker
CentOS Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004972CentOS-6grubbypublic2011-07-14 12:392011-10-28 20:04
Reportercarbonator 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version6.0 
Target VersionFixed in Version 
Summary0004972: Fatal error in grubby when doing a kernel update in %post
DescriptionRunning "yum update" in the %post section of a kickstart produces the following error when a kernel update is installed (tested on x86_64):
grubby fatal error: unable to find a suitable template

As a result, the new kernel is not added to grub.conf and therefore not booted. It can be fixed by removing and reinstalling the kernel; see additional information.

The following ks.cfg was used:
---snip---
install
skipx
keyboard de-latin1-nodeadkeys
network --device eth0 --bootproto dhcp --hostname laboratory
rootpw test1234
firewall --enabled --ssh
authconfig --enableshadow --passalgo=sha512 --enablefingerprint
selinux --enforcing
timezone --utc Europe/Berlin
url --url ftp://yourmirror/images/centos/6/os/x86_64 [^]
lang en_US.UTF-8
zerombr
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto"
reboot

%packages --nobase
@german-support
%end

%post
/bin/echo "multilib_policy=best" >> /etc/yum.conf >> /root/postinstall.log 2>&1
/usr/bin/yum update -y -e 1 >> /root/postinstall.log 2>&1
%end
---snap---
Additional Information[root@laboratory ~]# uname -a
Linux laboratory 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux


[root@laboratory ~]# rpm -qa kernel\* | sort
kernel-2.6.32-71.29.1.el6.x86_64
kernel-2.6.32-71.el6.x86_64
kernel-firmware-2.6.32-71.29.1.el6.noarch


[root@laboratory ~]# grep grubby postinstall.log -B1
  Installing : kernel-2.6.32-71.29.1.el6.x86_64 47/95
grubby fatal error: unable to find a suitable template


[root@laboratory ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_laboratory-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-71.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vg_laboratory-lv_root rd_LVM_LV=vg_laboratory/lv_root rd_LVM_LV=vg_laboratory/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys crashkernel=auto
        initrd /initramfs-2.6.32-71.el6.x86_64.img


[root@laboratory ~]# yum remove kernel-2.6.32-71.29.1.el6.x86_64
Loaded plugins: fastestmirror, priorities
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-71.29.1.el6 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
 Package Arch Version Repository Size
==============================================================================================================================
Removing:
 kernel x86_64 2.6.32-71.29.1.el6 @updates 112 M

Transaction Summary
==============================================================================================================================
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing : kernel-2.6.32-71.29.1.el6.x86_64 1/1

Removed:
  kernel.x86_64 0:2.6.32-71.29.1.el6

Complete!


[root@laboratory ~]# yum update
Loaded plugins: fastestmirror, priorities
Determining fastest mirrors
 * base: mirror.de.leaseweb.net
 * extras: mirror.de.leaseweb.net
 * updates: mirror.de.leaseweb.net
base | 3.7 kB 00:00
base/primary_db | 4.2 MB 00:02
extras | 951 B 00:00
extras/primary | 203 B 00:00
updates | 3.5 kB 00:00
updates/primary_db | 3.3 MB 00:01
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-71.29.1.el6 set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
 Package Arch Version Repository Size
==============================================================================================================================
Installing:
 kernel x86_64 2.6.32-71.29.1.el6 updates 22 M

Transaction Summary
==============================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 22 M
Installed size: 112 M
Is this ok [y/N]: y
Downloading Packages:
kernel-2.6.32-71.29.1.el6.x86_64.rpm | 22 MB 00:13
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : kernel-2.6.32-71.29.1.el6.x86_64 1/1

Installed:
  kernel.x86_64 0:2.6.32-71.29.1.el6

Complete!


[root@laboratory ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_laboratory-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS Linux (2.6.32-71.29.1.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-71.29.1.el6.x86_64 ro root=/dev/mapper/vg_laboratory-lv_root rd_LVM_LV=vg_laboratory/lv_root rd_LVM_LV=vg_laboratory/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys crashkernel=auto
        initrd /initramfs-2.6.32-71.29.1.el6.x86_64.img
title CentOS (2.6.32-71.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vg_laboratory-lv_root rd_LVM_LV=vg_laboratory/lv_root rd_LVM_LV=vg_laboratory/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys crashkernel=auto
        initrd /initramfs-2.6.32-71.el6.x86_64.img


[root@laboratory ~]# reboot


[root@laboratory ~]# uname -a
Linux laboratory 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0013053)
worta (reporter)
2011-07-26 15:23

Upstream bug:

https://bugzilla.redhat.com/show_bug.cgi?id=657257 [^]

Fixed within 6.1

Source:
http://rhn.redhat.com/errata/RHBA-2011-0530.html [^]
(0013658)
tru (administrator)
2011-10-28 20:03

thanks for looking at this issue.

why running yum update in %post? you can achieve the very same result (without
the bug reported here by addding the updates repository during the installation process)...

url --url ftp://yourmirror/images/centos/6/os/x86_64 [^]
...
repo --name=updates --baseurl=ftp://yourmirror/images/centos/6/updates/x86_64 [^]
repo --name=cr --baseurl=ftp://yourmirror/images/centos/6/cr/x86_64 [^]
...
(0013659)
tru (administrator)
2011-10-28 20:04

upstream issue. will be fixed for release 6.1

- Issue History
Date Modified Username Field Change
2011-07-14 12:39 carbonator New Issue
2011-07-26 15:23 worta Note Added: 0013053
2011-10-28 20:03 tru Note Added: 0013658
2011-10-28 20:04 tru Note Added: 0013659
2011-10-28 20:04 tru Status new => confirmed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker