Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 909582

Summary: rhel6 installer fails to detect correct bios boot disk order and misconfigures grub
Product: Red Hat Enterprise Linux 6 Reporter: Pasi Karkkainen <pasik>
Component: anacondaAssignee: Peter Jones <pjones>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: aaron.knister, lfarkas, locane, pasteur
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-02 19:06:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
anaconda.log none

Description Pasi Karkkainen 2013-02-09 16:49:18 UTC
Description of problem:

I have a Dell R510 server with a PERC H700 (LSI megaraid_sas) HWRAID where RHEL5 installs and boots OK, but rhel6 fails to boot and just drops to a grub prompt after the first reboot after the installation. No grub-menu available or anything. 

I tested installing RHEL 5.7, 5.8 and 5.9, and they all work OK and boot OK on the server in question.

I tested installing RHEL 6.1 and 6.3, and they both install OK but fail to boot into the OS and just drop to a "empty" grub prompt after installation.

HWRAID card has 2 virtual disks defined:

ID0: 1.9TB disk which has two partitions: part1 is /boot and part2 is LVM PV for root-vg.
ID1: 5TB disk which doesn't have any partitions: the whole disk is used as LVM PV for data-vg.

When installing rhel5 on the server I noticed the OS gets installed to sda (ID0, 1.9TB disk), but anaconda wants to install grub to the MBR of *sdb* (ID1, 5TB disk) !

Before rebooting and exiting the rhel5 installer I switched to ctrl+alt+f2 console and ran "modprobe edd" and checked the contents of "/sys/firmware/edd/int13_dev80/interface" and noticed ID1 (the 5TB disk) actually is the 0x80 bios boot disk according to the EDD info. so rhel5 installer actually installed grub into the MBR of correct disk.

That disk configuration / boot order is a bit weird, and I don't how/why it is like that, but rhel5 installer seems to be able to cope with that perfectly OK, and the system works and boots OK after rhel5 installation.

I started rhel 6.3 installer again and checked the EDD info from "/sys/firmware/edd/int13_dev80" and the info matches rhel5 kernel. ID1 (the 5TB disk) is the 0x80 bios boot disk.

rhel6.3 installer seems to detect iDRAC6 virtual USB devices as sda and sdb, so the megaraid disks are sdc (ID0 1.9TB) and sdd (ID1 5TB).

The problem is rhel6 installer insists on installing grub on sdc, which is the same disk where the OS is installed, but sdc isn't the 0x80 bios boot disk! 

rhel6 installer doesn't let me change the disk where grub is installed, only options given are the MBR of sdc or sdc1 (/boot). The "change disk" menu has only "sdc" as an option. To get a working system grub should be installed to sdd which is the bios 0x80 boot disk. 

The end result with rhel6 installer is grub is installed to a wrong disk and the system won't boot after installation. 


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

How reproducible:
Always.

Steps to Reproduce:
1. Install rhel6
 
Actual results:
rhel6 boots into an "empty" grub prompt and fails to start after installation.

Expected results:
rhel6 boots OK after installation.


Additional info:

This is the /mnt/sysimage/boot/grub/device.map as generated by rhel5 installer:

# this device map was generated by anaconda
(hd1)     /dev/sda
(hd0)     /dev/sdb


This is the /mnt/sysimage/boot/grub/device.map as generated by rhel6 installer:

# this device map was generated by anaconda
(hd0)     /dev/sdc


To fix the problem I have to boot into rhel6 installer rescue mode, and fix the /mnt/sysimage/boot/grub/device.map to be like this:

# this device map was generated by anaconda
(hd0)     /dev/sdd
(hd1)     /dev/sdc

Also I have to fix /mnt/sysimage/boot/grub/grub.conf and replace all the (hd0,0) with (hd1,0). 

After this I can manually re-install grub into the hd0 (sdd) MBR, and the system boots OK after these tweaks.


So in this case rhel6 installer generates broken contents for the following files:

- /boot/grub/device.map
- /boot/grub/grub.conf

And grub is installed to the MBR of wrong disk. rhel5 installer is capable of handling this OK, but rhel6 installer fails.

Comment 2 Václav Pavlín 2013-02-12 13:44:33 UTC
Could you please provide anaconda.log (/var/log/anaconda.log)?

Comment 3 Pasi Karkkainen 2013-02-12 20:10:43 UTC
Yep, I'll upload the log, but it'll take a couple of days before I'm able to do that. Thanks!

Comment 4 Pasi Karkkainen 2013-02-18 12:42:41 UTC
I boot RHEL 6.3 x86_64 dvd and do a normal GUI install on the server. I choose "Basic storage devices", "Fresh installation" (there was already another linux installation on the sdc disk), "Create custom layout" which automatically chooses the "Review and modify partitioning layout". I partition the sdc disk with an usual boot+LVM layout and continue. sdd stays unused:

sdc1 /boot (ext3).
sdc2 LVM PV for VG.

VG:
/ (ext4).
swap (swap).

Now in the next step anaconda suggests me to install bootloader to /dev/sdc, which is a WRONG disk. I click "Change device" and the options are either sdc or sdc1 - both are wrong. "BIOS drive order" menu has the drives in a wrong order:

First BIOS drive: sdc.
Second BIOS drive: sdd.

Those are wrong. I need to manually swap sdc/sdd, and after that grub will be installed to sdd, which is the correct BIOS 0x80 boot drive.

Earlier for some reason I couldn't swap the disks in the "BIOS drive order" -menu, it was only showing sdc there, but now when I tried installing again both sdc and sdd were available in the menus so I could swap them.. weird. Anyway the problem is that the default suggested boot order is wrong, and I need to manually swap sdc/sdd.

Comment 5 Pasi Karkkainen 2013-02-18 12:51:12 UTC
Created attachment 698870 [details]
anaconda.log

Comment 6 Václav Pavlín 2013-02-18 13:04:47 UTC
I am not sure how anaconda resolves which disks are suitable for installing grub, but I think grub is't much involved in it. I will change this bug to anaconda now, so they can look at log and hopefully find the source of the problem.

Comment 7 Dave Cantrell 2013-04-02 19:06:24 UTC
Pasi,

There's a lot of detail here and those of us who read Bugzilla are not skilled at providing end user support.  Bugzilla is not a support tool or means of accessing support.  Please contact Red Hat technical support (access.redhat.com) and any bugs identified will be escalated to engineering appropriately.

Thanks.

Comment 8 Pasi Karkkainen 2013-04-02 20:08:17 UTC
This is not a support request. This is a bug report. Like written above RHEL5 installer behaves correctly, RHEL6 installer doesn't.

Comment 9 Levente Farkas 2013-08-26 13:54:59 UTC
why are you close this bug? this is a real problem for many user!

Comment 10 Aaron Knister 2013-11-04 21:26:37 UTC
I have to agree, this is most definitely a bug and not a support request. I'm experiencing this too.

Comment 11 Michael 2015-01-17 01:36:47 UTC
Also experiencing this problem, but in CentOS.  This is an enormous headache for me at work because we install it to a wide variety of computer hardware environments, many times a day.  The time this bug costs us is in the hundreds of hours.