Bug 217176 - error installing grub on raid devices
error installing grub on raid devices
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Hans de Goede
Alexander Todorov
Depends On:
  Show dependency treegraph
Reported: 2006-11-24 12:35 EST by Paolo Penzo
Modified: 2010-10-22 03:07 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-18 16:16:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Install time logs (35.27 KB, application/x-gzip)
2008-07-09 12:44 EDT, Steve
no flags Details
sosreport of affected system (855.10 KB, application/x-bzip2)
2008-07-09 13:11 EDT, Steve
no flags Details

  None (edit)
Description Paolo Penzo 2006-11-24 12:35:08 EST
I'm trying to install grub on a software raid1 device with the following ks setup

bootloader --location=mbr

clearpart --all --initlabel
part raid.01 --size=1 --grow --ondisk=sda
part raid.02 --size=1 --grow --ondisk=sdb
part swap --size=1024 --grow --maxsize=2048 --ondisk=sdb
part swap --size=1024 --grow --maxsize=2048 --ondisk=sda
raid / --fstype ext3 --level=raid1 raid.01 raid.02

The installations procedes fine but the systems won't reboot after the install
process has completed. So I have to restart with the rescue image and install
grub manually.

In the anaconda.log I got
MBR not suitable as boot device; installing to partition

and in the anaconda-ks.cfg
bootloader --location=partition --append="rhgb quiet"

It's clear that the installer was not able to write to the MBR...
Comment 1 Sarah Prelutsky 2007-05-17 20:29:01 EDT
I was able to reproduce this bug on RHEL4u3 and in part on RHEL4u4

On rhel4u3:
Installing from kickstart and specifying "bootloader --location=mbr" results in
the bootloader being installed to the partition and are unable to boot the os
after a reboot. You have to boot the rescue environment and re-setup grub.

On rhel4u4:
Installing from kickstart and specifying "bootloader --location=mbr" results in
the bootloader being installed to the partition. Everything is fine on reboot.
You can fail a drive with mdadm and boot from the 2nd drive (software raid1 2
drives) as expected. You can pull even pull out the 1st drive in Bay0 and reboot
and the os will boot from the 2nd drive just fine.

I can reproduce this reliably on both releases.

I have yet to try update 5.
Comment 2 Jack Neely 2007-06-19 14:11:23 EDT
Being that this rears its ugly head frequently its high time I at least dropped
in the kickstart magic needed to correct non-booting RAID setups.  I'm using a
%post script that installs grub to both sda and sdb so that the machine will
still boot if sda fails.  It attempts to correct the grub device map and
installs grub into the MBR rather than the partitioning.  This wipes whatever
vendor black magic is in the MBR and allows the thing to boot.


if ! grep "(hd1)" /boot/grub/device.map > /dev/null ; then
    echo "(hd1)     /dev/sdb" >> /boot/grub/device.map

/sbin/grub --batch << EOT
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)

device (hd1) /dev/sdb
root (hd1,0)
setup (hd1)
Comment 3 Steve 2008-07-09 12:44:08 EDT
Created attachment 311385 [details]
Install time logs
Comment 5 Steve 2008-07-09 13:11:02 EDT
Created attachment 311386 [details]
sosreport of affected system
Comment 6 RHEL Product and Program Management 2008-09-25 03:23:34 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
Comment 8 Hans de Goede 2008-12-15 11:07:14 EST
A patch fixing this has been committed to the RHEL-4 anaconda branch:

This fix will be included in anaconda- .
Comment 10 Alexander Todorov 2009-02-13 09:51:53 EST
Tested with reproducer from comment #0 anaconda- 

anaconda-ks.cfg has:
bootloader --location=mbr

the error message in anaconda.log from comment #0 is not present. Moving to VERIFIED.
Comment 12 errata-xmlrpc 2009-05-18 16:16:22 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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