Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 625216 - grubby recieved SIGSEGV in kickstart
grubby recieved SIGSEGV in kickstart
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: grubby (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Brian Lane
Release Test Team
Depends On:
Blocks: 647893
  Show dependency treegraph
Reported: 2010-08-18 17:27 EDT by Jack Neely
Modified: 2011-08-31 15:08 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-01-10 14:41:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Jack Neely 2010-08-18 17:27:39 EDT
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):

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):
Comment 2 Bill Nottingham 2010-08-18 19:25:48 EDT
This looks similar to bug 592294.
Comment 3 Jack Neely 2010-08-19 10:22:59 EDT
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 17:31:58 EDT
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 10:35:50 EST
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 13:09:23 EST
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 14:41:08 EST
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.