Bug 217176 - error installing grub on raid devices
Summary: error installing grub on raid devices
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda   
(Show other bugs)
Version: 4.4
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Hans de Goede
QA Contact: Alexander Todorov
Depends On:
TreeView+ depends on / blocked
Reported: 2006-11-24 17:35 UTC by Paolo Penzo
Modified: 2018-10-20 00:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-18 20:16:22 UTC
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 16:44 UTC, Steve
no flags Details
sosreport of affected system (855.10 KB, application/x-bzip2)
2008-07-09 17:11 UTC, Steve
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0978 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2009-05-18 13:44:13 UTC

Description Paolo Penzo 2006-11-24 17:35:08 UTC
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-18 00:29:01 UTC
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 18:11:23 UTC
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 16:44:08 UTC
Created attachment 311385 [details]
Install time logs

Comment 5 Steve 2008-07-09 17:11:02 UTC
Created attachment 311386 [details]
sosreport of affected system

Comment 6 RHEL Product and Program Management 2008-09-25 07:23:34 UTC
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 16:07:14 UTC
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 14:51:53 UTC
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 20:16:22 UTC
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.