Bug 625216 - grubby recieved SIGSEGV in kickstart
Summary: grubby recieved SIGSEGV in kickstart
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: grubby
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 647893
TreeView+ depends on / blocked
 
Reported: 2010-08-18 21:27 UTC by Jack Neely
Modified: 2011-08-31 19:08 UTC (History)
6 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-01-10 19:41:08 UTC


Attachments (Terms of Use)
grub configuration (873 bytes, text/plain)
2010-08-19 14:22 UTC, Jack Neely
no flags Details

Description Jack Neely 2010-08-18 21:27:39 UTC
Description of problem:

In my test Kickstart for the RHEL 6 beta, I setup a reinstall target in grub.  This includes running the following command in the %post

/sbin/grubby --add-kernel=/boot/install/vmlinuz    --title="Reinstall Workstation"    --copy-default    --args="ks=http://web-kickstart.linux.ncsu.edu/ks.py ramdisk_size=8192 noshell noipv6 ksdevice=$KSDEVICE"    --initrd=/boot/install/initrd.img

Grubby dies horribly:

grubby recieved SIGSEGV!  Backtrace (8):
/sbin/grubby[0x804f8b8]
[0x67c400]
/lib/libc.so.6(+0x773a8)[0x1873a8]
/sbin/grubby[0x804e1e4]
/sbin/grubby[0x804e33d]
/sbin/grubby[0x804f4f8]
/lib/libc.so.6(__libc_start_main+0xe6)[0x126cc6]
/sbin/grubby[0x80490a1]

When the system reboots after installation I'm able to log in as root and run the same grubby command without error.


Version-Release number of selected component (if applicable):
grubby-7.0.15-1.el6.i686

Comment 2 Bill Nottingham 2010-08-18 23:25:48 UTC
This looks similar to bug 592294.

Comment 3 Jack Neely 2010-08-19 14:22:59 UTC
Created attachment 439696 [details]
grub configuration

This is the grub.conf that anaconda generates, but grubby fails to alter.

Comment 4 RHEL Product and Program Management 2010-10-29 21:31:58 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 5 Jack Neely 2010-11-30 15:35:50 UTC
Now that RHEL 6 final is sitting on my test bench I've discovered that Grubby no longer segfaults in the kickstart %post script.  Instead I get an error message

   grubby fatal error: unable to find a suitable template

That the grub configuration is left unaltered.

I'm still using the below grubby incantation.  I've verified that all the files referenced and environment variables exist.

/sbin/grubby --add-kernel=/boot/install/vmlinuz    --title="Reinstall Workstation"    --copy-default    --args="ks=http://web-kickstart.linux.ncsu.edu/ks.py noshell noipv6 ksdevice=$KSDEVICE"    --initrd=/boot/install/initrd.img

Running the same command on the system after the install produces no error and correctly edits the grub.conf

Comment 6 Jack Neely 2011-01-10 18:09:23 UTC
From the rhel6-list the following in your kickstart before any yum or grubby commands does work around the bug:

ln -s `awk '{ if ($2 == "/") print $1; }' /etc/fstab` /dev/root

Comment 7 Peter Jones 2011-01-10 19:41:08 UTC
If you're going to run grubby from %post, you're going to need to set up the environment that's needed on a running system, which includes that symlink.


Note You need to log in before you can comment on or make changes to this bug.