[CentOS] grubby fatal error: unable to find a suitable template

Matt Garman

matthew.garman at gmail.com
Wed Jun 25 21:35:14 UTC 2014


I did a bulk "yum update -y" of several servers.  As a sanity check
after the upgrade, I ran a grep of /etc/grub.conf across all updated
servers looking to ensure the kernel I expected was installed.

Two servers came up saying /etc/grub.conf did not exist!

I logged into the servers, and /etc/grub.conf was a broken link.  (It
points to /boot/grub/grub.conf).  My systems are all setup with a
dedicated /boot partition.  Sure enough, /boot was not mounted.
Furthermore, I saw no /boot entry in /etc/fstab (which all my other
servers contain).

So I mounted /boot, and the the grub.conf file was not consistent: it
did not have a stanza for the kernel I wanted installed.  So I did a
"yum remove kernel ; yum install -y kernel".  Both the remove and the
install resulted in this message getting printed:

grubby fatal error: unable to find a suitable template

Just for kicks, I renamed both the /etc/grub.conf symlink as well as
the actual /boot/grub/grub.conf file, and repeated the kernel
remove/install.  This did NOT produce the above error; however, no
symlink or actual grub.conf file was created.

I did a little web searching on the above error, and one common cause
is that there is no valid "title..." stanza in the grub.conf file for
grubby to use as a template.  But my file does in fact contain a valid
stanza.

I even copied a valid grub.conf file from another server, and re-ran
the kernel remove/install: same error.

Clearly, something is broken, but I'm not sure what.  Anyone seen
anything like this?

By the way, these machines were all 5.something, being upgraded to 5.7.

Thanks!



More information about the CentOS mailing list