Bug 164864 - grub segmentation faults during setup (hd0)
Summary: grub segmentation faults during setup (hd0)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: grub
Version: 4.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Peter Jones
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-02 00:40 UTC by Jed Donnelley
Modified: 2008-07-25 15:57 UTC (History)
3 users (show)

Fixed In Version: rhel4u7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-25 15:57:59 UTC
Target Upstream Version:
Embargoed:


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

Description Jed Donnelley 2005-08-02 00:40:38 UTC
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
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):
grub-0.95-3.1

How reproducible:
Always

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 13:23:45 UTC
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 13:26:33 UTC
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 11:49:13 UTC
This can be worked around by booting with the parameter:

noexec=off

thus switching off the segmentation fault, when GRUB for whatever reason
executes code on the stack.

Comment 5 Bryn M. Reeves 2005-12-05 18:53:56 UTC
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 15:57:59 UTC
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.