When running grubby on RHEL 6 with a "title" line commented out grubby segfaults.

Solution Verified - Updated -

Issue

  • When running grubby directly, or during yum update on a kernel, grubby segfaults if the grub.conf has a title entry that is commented out:
[root@localhost ~]# grubby --add-kernel=/boot/vmlinuz-2.6.32-754.el6.x86_64 --title=workaround-title --initrd=/boot/initramfs-2.6.32-754.el6.x86_64.img --args 'root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet' 
grubby recieved SIGSEGV!  Backtrace (6):
grubby[0x40815f]
/lib64/libc.so.6[0x3324832510]
grubby[0x4028ec]
grubby[0x407c58]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x332481ed1d]
grubby[0x401709]

[root@localhost ~]# 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/VolGroup-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
#title reproducer-title
    kernel /vmlinuz-2.6.32-754.el6.x86_64 root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
    initrd /initramfs-2.6.32-754.el6.x86_64.img
title Red Hat Enterprise Linux 6 (2.6.32-754.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-754.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
    initrd /initramfs-2.6.32-754.el6.x86_64.img

Environment

  • Red Hat Enterprise Linux 6
  • grubby-7.0.15-7.el6.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content