Bug 908310

Summary: grubby fatal error: unable to find a suitable template
Product: [Fedora] Fedora Reporter: Joachim Backes <joachim.backes>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: balay, bcl, bit-byte, davej, mike, mikhail.v.gavrilov, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-20 19:10:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/boot/grub2/grub.cfg which will not be updated none

Description Joachim Backes 2013-02-06 11:53:16 UTC
Created attachment 693875 [details]
/boot/grub2/grub.cfg which will not be updated

Description of problem:

installing some kernel (in my case: kernel-3.7.5-201.fc18.x86_64)
generates a grubby error message:

*grubby fatal error: unable to find a suitable template*

The kernel will be correctly installed, but it does not appear in
/boot/grub2/grub.cfg.

Even  if remaking /boot/grub2/grub.cfg with "sudo grub2-mkconfig -o /boot/grub2/grub.cfg"  and then trying to install the kernel does not help.

Version-Release number of selected component (if applicable):
grubby-8.22-1.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1.sudo yum install <some kernel.rpm> or sudo rpm -i <some kernel.rpm>
2.
3.
  
Actual results:
Kernel is installed, but /boot/grub2/grub2.cfg is not updated

Expected results:
/boot/grub2/grub2.cfg is updated and contains an entry for the new installed kernel

Additional info:

Comment 1 Joachim Backes 2013-02-06 11:55:49 UTC
After the new kernel has been installed (whith the above grubby message) I can make a new /boot/grub2/grub.cfg with grub2-mkconfig, and this grub.cfg will then contain an entry for the added kernel (this is a workaround).

Comment 2 Satish Balay 2013-02-15 06:33:50 UTC
I started seeing this problem with the past few kernel updates. I'm using rawhide nodebug kernels with f18 though - so I have more frequent kernel updates.
[ And it started a few kernels ago]

A workarround that involves me not doing an extra thing after a kernel update would be good.

Comment 3 Michael Cronenworth 2013-02-17 02:58:22 UTC
I think this is related to the util-linux problems. See bug 902512 for details.

Downgrading to util-linux-2.22.1-2.1.fc18 fixes this issue for me.

Comment 4 Satish Balay 2013-02-17 08:10:45 UTC
Thanks!

I had packages installed from f18-updates-testing and had:

rpm -q util-linux --last
util-linux-2.22.2-4.fc18.x86_64               Fri 08 Feb 2013 04:02:00 PM CST


Downgraded util-linux with:

yum  --enablerepo=*-testing downgrade util-linux libuuid libuuid-devel libmount libblkid

Removed:
  libblkid.x86_64 0:2.22.2-4.fc18                 libmount.x86_64 0:2.22.2-4.fc18             
  libuuid.i686 0:2.22.2-4.fc18                    libuuid.x86_64 0:2.22.2-4.fc18              
  libuuid-devel.x86_64 0:2.22.2-4.fc18            util-linux.x86_64 0:2.22.2-4.fc18           

Installed:
  libblkid.x86_64 0:2.22.2-3.fc18                 libmount.x86_64 0:2.22.2-3.fc18             
  libuuid.i686 0:2.22.2-3.fc18                    libuuid.x86_64 0:2.22.2-3.fc18              
  libuuid-devel.x86_64 0:2.22.2-3.fc18            util-linux.x86_64 0:2.22.2-3.fc18           



And now I don't see the error with a kernel install. [and /etc/grub2.conf appears to be updated correctly]

Comment 5 Dave Jones 2013-02-20 05:13:48 UTC
*** Bug 912968 has been marked as a duplicate of this bug. ***

Comment 6 Brian Lane 2013-02-20 18:15:28 UTC
*** Bug 913227 has been marked as a duplicate of this bug. ***

Comment 7 Michael Cronenworth 2013-02-20 18:24:15 UTC
OK, then I'm 99% sure this is a duplicate of bug 902512. As you can see from the comments on that bug there is now an update that is being submitted to fix the issue.

Comment 8 Peter Jones 2013-02-20 19:10:38 UTC
This does appear to be that issue.  For future reference, you can re-run the invoked grubby command with "--debug" and it'll tell you what's gone wrong with each stanza of the config file in question.

As of grubby-8.22-2 , it'll also write the details of which stanza it chooses as the template (and why) to /var/log/grubby.

*** This bug has been marked as a duplicate of bug 902512 ***

Comment 9 Satish Balay 2013-02-20 22:41:12 UTC
util-linux-2.22.2-6 does fix the problem.

[kernel update after installing util-linux-2.22.2-6 goes through without error - and updates /etc/grub2.cfg correctly]

Comment 10 Kevin Kofler 2013-02-22 16:52:40 UTC
*** Bug 914735 has been marked as a duplicate of this bug. ***