Red Hat Bugzilla – Bug 164864
grub segmentation faults during setup (hd0)
Last modified: 2008-07-25 11:57:59 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:
(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):
Steps to Reproduce:
1.build ES4.1 from Cd with default partitions, minimum packages 73GB SCSI disk
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.
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.
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
Created attachment 118250 [details]
strace of grub failure
x86 installation of RHEL 4 AS on an amd64 machine using fibre storage
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.
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.
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.