Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1034591

Summary: grubby fatal error: unable to find a suitable template
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: chayang, herrold, juzhang, michen, pjones, qzhang, sluo, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1498169 (view as bug list) Environment:
Last Closed: 2014-01-10 16:07:17 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:
Bug Depends On:    
Bug Blocks: 1498169    

Description Sibiao Luo 2013-11-26 07:29:49 UTC
Description of problem:
/boot/grub2/grub.cfg which will not be updated after install/update a newer kernel RPM or downgrade a older kernel version.

Version-Release number of selected component (if applicable):
rhel7.0: kernel-3.10.0-50.el7.x86_64

How reproducible:
3/3

Steps to Reproduce:
1.My host kernel version is kernel-3.10.0-50.el7.x86_64.
2.Upgrade/install/downgrade a different kernel-3.10.0-55.el7.x86_64 version.

Actual results:
after step 2, /boot/grub2/grub.cfg which will not be updated after install/update/downgrade a kernel version, and there is a warning message prompt "grubby fatal error: unable to find a suitable template".

Expected results:
It should install/update/downgrade a kernel version successfully and the /boot/grub2/grub.cfg should be updated correctly.
# rpm -ivh kernel-3.10.0-55.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:kernel-3.10.0-55.el7             ################################# [100%]
grubby fatal error: unable to find a suitable template

Additional info:

Comment 1 Sibiao Luo 2013-11-26 07:31:46 UTC
Also tried the upgrade/downgrade it which also hit this issue.
# rpm -Uvh kernel-3.10.0-55.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:kernel-3.10.0-55.el7             ################################# [ 33%]
grubby fatal error: unable to find a suitable template
Cleaning up / removing...
   2:kernel-3.10.0-52.el7             warning: file /lib/modules/3.10.0-52.el7.x86_64/modules.softdep: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-52.el7.x86_64/modules.devname: remove failed: No such file or directory
################################# [ 67%]
   3:kernel-3.10.0-50.el7             warning: file /lib/modules/3.10.0-50.el7.x86_64/modules.softdep: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-50.el7.x86_64/modules.devname: remove failed: No such file or directory
################################# [100%]

Comment 2 Sibiao Luo 2013-11-26 07:42:19 UTC
# rpm -qa | grep grubby
grubby-8.28-2.el7.x86_64

Comment 3 Sibiao Luo 2013-12-16 02:27:53 UTC
Hi pjones,

   Could you help see this issue and make a package to fix it as we always hit it and cann't usable the kernel at all after update the kernel. I update it to high priority as it very harmful to our OS. Please correct me if any mistake.

Best Regards,
sluo

Comment 4 Peter Jones 2014-01-09 17:52:48 UTC
Please attach /var/log/grubby .

Comment 5 Sibiao Luo 2014-01-10 08:33:45 UTC
(In reply to Peter Jones from comment #4)
> Please attach /var/log/grubby .
I did not meet the "grubby fatal error: unable to find a suitable template" issue any more with the currently usable OS tree. So i provide the /var/log/grubby log maybe not helpful for you. Maybe this issue is related to the specifically OS tree.

# cat /var/log/grubby 
DBG: 27108: Mon Nov 18 23:24:51 2013: command line: --default-kernel
DBG: Image entry succeeded: 
DBG: menuentry 'Red Hat Enterprise Linux Server, with Linux 3.10.0-48.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-48.el7.x86_64-advanced-f2af5b35-a422-433c-9a2a-11747bc18c95' { 
DBG: 	load_video
DBG: 	set gfxpayload=keep
DBG: 	insmod gzio
DBG: 	insmod part_msdos
DBG: 	insmod xfs
DBG: 	set root='hd0,msdos1'
DBG: 	if [ x$feature_platform_search_hint = xy ]; then
DBG: 	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  837b659c-86c2-47d6-8875-29580736d2b5
DBG: 	else
DBG: 	  search --no-floppy --fs-uuid --set=root 837b659c-86c2-47d6-8875-29580736d2b5
DBG: 	fi
DBG: 	linux /vmlinuz-3.10.0-48.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap console=tty0 crashkernel=auto console=ttyS0,115200 vconsole.keymap=us vconsole.font=latarcyrheb-sun16 rhgb quiet LANG=en_US.UTF-8
DBG: 	initrd /initramfs-3.10.0-48.el7.x86_64.img
DBG: }
DBG: 2593: Fri Jan 10 03:24:55 2014: command line: --grub2 -c /boot/grub2/grub.cfg --add-kernel=/boot/vmlinuz-3.10.0-55.el7.x86_64 --copy-default --make-default --title Red Hat Enterprise Linux Server (3.10.0-55.el7.x86_64) 7.0 (Maipo) --args=root=/dev/mapper/rhel-root  --remove-kernel=TITLE=Red Hat Enterprise Linux Server (3.10.0-55.el7.x86_64) 7.0 (Maipo)
DBG: Image entry succeeded: 
DBG: menuentry 'Red Hat Enterprise Linux Server, with Linux 3.10.0-48.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-48.el7.x86_64-advanced-f2af5b35-a422-433c-9a2a-11747bc18c95' { 
DBG: 	load_video
DBG: 	set gfxpayload=keep
DBG: 	insmod gzio
DBG: 	insmod part_msdos
DBG: 	insmod xfs
DBG: 	set root='hd0,msdos1'
DBG: 	if [ x$feature_platform_search_hint = xy ]; then
DBG: 	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  837b659c-86c2-47d6-8875-29580736d2b5
DBG: 	else
DBG: 	  search --no-floppy --fs-uuid --set=root 837b659c-86c2-47d6-8875-29580736d2b5
DBG: 	fi
DBG: 	linux /vmlinuz-3.10.0-48.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap console=tty0 crashkernel=auto console=ttyS0,115200 vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8
DBG: 	initrd /initramfs-3.10.0-48.el7.x86_64.img
DBG: }
DBG: 19639: Fri Jan 10 03:25:50 2014: command line: --grub2 -c /boot/grub2/grub.cfg --add-kernel=/boot/vmlinuz-0-rescue-990ea1616b6747b2b80319fb01d30d30 --initrd /boot/initramfs-0-rescue-990ea1616b6747b2b80319fb01d30d30.img --copy-default --title Red Hat Enterprise Linux Server 7.0 Rescue 990ea1616b6747b2b80319fb01d30d30 (3.10.0-55.el7.x86_64) --args=root=/dev/mapper/rhel-root  --remove-kernel=TITLE=Red Hat Enterprise Linux Server 7.0 Rescue 990ea1616b6747b2b80319fb01d30d30 (3.10.0-55.el7.x86_64)
DBG: Image entry succeeded: 
DBG: menuentry 'Red Hat Enterprise Linux Server (3.10.0-55.el7.x86_64) 7.0 (Maipo)' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-48.el7.x86_64-advanced-f2af5b35-a422-433c-9a2a-11747bc18c95' { 
DBG: 	load_video
DBG: 	set gfxpayload=keep
DBG: 	insmod gzio
DBG: 	insmod part_msdos
DBG: 	insmod xfs
DBG: 	set root='hd0,msdos1'
DBG: 	if [ x$feature_platform_search_hint = xy ]; then
DBG: 	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  837b659c-86c2-47d6-8875-29580736d2b5
DBG: 	else
DBG: 	  search --no-floppy --fs-uuid --set=root 837b659c-86c2-47d6-8875-29580736d2b5
DBG: 	fi
DBG: 	linux /vmlinuz-3.10.0-55.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap console=tty0 crashkernel=auto console=ttyS0,115200 vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8
DBG: 	initrd /initramfs-3.10.0-55.el7.x86_64.img
DBG: }

Best Regards,
sluo

Comment 6 Peter Jones 2014-01-10 15:48:21 UTC
Alright, well if you can't reproduce it any more, and since all these log entries seem to be for successful usage, I'm going to close this.  Please re-open with fresh logs if you encounter the problem again.

Comment 7 RHEL Program Management 2014-01-10 16:07:17 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.