Grubby Fatal Error: Unable To Find A Suitable Template

Home » CentOS » Grubby Fatal Error: Unable To Find A Suitable Template
CentOS 3 Comments

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!

3 thoughts on - Grubby Fatal Error: Unable To Find A Suitable Template

  • Off topic for the question, but, briefly, changing *anything* in our environment involves extensive testing and validation due to very precise performance requirements (HFT, microsecond changes make or break us). For our particular application, we’ve seen significant performance changes with minor kernel revisions. We’ve been putting this testing and validation effort into CentOS 6.5, and will hopefully be moving to off 5.x completely before too long. But in the short-term, 5.7 it is for us.

LEAVE A COMMENT