Bug 164864 - grub segmentation faults during setup (hd0)
grub segmentation faults during setup (hd0)
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: grub (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-08-01 20:40 EDT by Jed Donnelley
Modified: 2008-07-25 11:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: rhel4u7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-25 11:57:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace of grub failure (69.88 KB, text/plain)
2005-08-30 09:26 EDT, Joshua Hager
no flags Details

  None (edit)
Description Jed Donnelley 2005-08-01 20:40:38 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5

Description of problem:
Under about the simplest of possible conditions, running the grub
shell to setup a disk fails with a segmentation fault.

This last test was on a 73 GB SCSI disk, sda.  Build the simplest RH ES 4.1 system from CD (default disk partitioning with replacement), minimum packages.

The run either:

#grub-install /dev/sda

(and look inside for the segmentation fault error) or more explicitly run

grub> device (hd0) /dev/sda

grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)Segmentation fault

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.build ES4.1 from Cd with default partitions, minimum packages 73GB SCSI disk
2.run #grub-install
3.Look for segmentation fault error - or use manual procedure above.

Actual Results:  grub gets a segmentation fault error

Expected Results:  grub should have written a master boot record on the disk and exited successfully.

Additional info:

I've been working on this bug for several days and have reproduced it under a wide variety of conditions - mostly kickstarts of various sorts on different systems.  In one instance with an Red Hat Enterprise Linux ES (v. 4 for AMD64/Intel EM64T)
system I noticed that grub did not seg fault.  However, with the simple build noted above and with most x86 builds it seg faults every time.

I need the functionality of grub installing the MBR to make software RAID booting.  Our standard Redhat build for our servers has a RAID-1 /boot partition on a system disk pair.  We depend on being able to boot off of either disk.  Using grub to install the MBR on the sdb disk or on a replacement for a failed disk worked fine for us under ES2.1 and ES3.  Now it no longer seems to work with ES4.1.  This is holding up our conversion at this time.
Comment 2 Joshua Hager 2005-08-30 09:23:45 EDT
I have seen this using RHEL AS 4 x86 and x86-64/amd64 cd's to install on 40Gb 
IDE Disk, 36Gb SCSI, 73Gb SCSI, and RAID-0 and RAID-1 FIBRE, so I do not see it 
being related to the drive size or dasd type. There have been some instances 
where initially grub will work, and then after 1 or more reboots it then begins 
to seg-fault. I'll include an strace - hopefully that will help
Comment 3 Joshua Hager 2005-08-30 09:26:33 EDT
Created attachment 118250 [details]
strace of grub failure

x86 installation of RHEL 4 AS on an amd64 machine using fibre storage
Comment 4 Sebastian Wilhelmi 2005-09-22 07:49:13 EDT
This can be worked around by booting with the parameter:


thus switching off the segmentation fault, when GRUB for whatever reason
executes code on the stack.
Comment 5 Bryn M. Reeves 2005-12-05 13:53:56 EST
100% reproducible on Dell Optiplex GX620s. Using BIOS 'combined' mode to access
SATA hard disks. Have some spare time with these systems this week, so I'll try
to get more information on where grub is falling over.
Comment 6 Andy Lindeberg 2008-07-25 11:57:59 EDT
This has been tested on rhel4u7 following the directions in the report and no
segfault was encountered. Please try rhel4u7 and reopen this bug if you
encounter the problem again.

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