Bug 52356 - anaconda's grub device.map wrong for two drives
Summary: anaconda's grub device.map wrong for two drives
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: grub   
(Show other bugs)
Version: roswell
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-08-23 00:33 UTC by Jay Berkenbilt
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-23 19:58:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Jay Berkenbilt 2001-08-23 00:33:42 UTC
Description of Problem:

I have two hard drives: /dev/hda (primary IDE master) and /dev/hdc
(secondary IDE master).  I installed Roswell (2) on /dev/hdc2 and selected
grub as my boot loader.  The device.map file that anaconda made was wrong. 
Details below.

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

Roswell 2 installer

How Reproducible:

only did it once but presumably always.....

Steps to Reproduce:
1. have system two two hard drives as primary and secondary master
2. install roswell on second hard drive (secondary master)
3. install grub on first disk's master boot record

Actual Results:

device.map contains the following:

# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda
(hd2)     /dev/hdc

Expected Results:

It should have looked like this:
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda
(hd1)     /dev/hdc

This would be consistent with the grub documentation's description of how
it numbers drives.  They are numbered sequentially without regard to IDE,
SCSI, which controller, etc.

Additional Information:
I was able to boot using grub by changing all occurrences of (hd2) to (hd1)
in both device.map and grub.conf and then running grub-install /dev/hda.

This is similar to bug 50800, but I believe it is not a duplicate of that
bug.  The difference is that in my case I have my second drive as secondary
master rather than primary slave.  I'm taking a wild and unsubstantiated
guess that if my second drive were a primary master the device.map would
have been created properly, but who knows....

In any case, I'm now a happy grub convert.

Comment 1 Jeremy Katz 2001-08-23 19:40:33 UTC
Do you have a hard drive which is the slave on the primary controller (hdb) ?

Comment 2 Jay Berkenbilt 2001-08-23 19:58:43 UTC
No -- the two drives I mentioned in my original post are the only IDE devices on
my system.  I have a SCSI zip drive and a SCSI CD-ROM drive, and my BIOS looks
at IDE before SCSI.

If I had an IDE drive as a primary slave (/dev/hdb), then I think /dev/hdb would
be (hd1) and /dev/hdc would be (hd2), but as hda and hdc are my only IDE
devices, (hd1) corresponds to /dev/hdc.

(hd2) in fact corresponds to my SCSI zip disk.  I just tested it.  I did not
have a disk in the drive during my Roswell install.  The device.map file that
anaconda created did not mention /dev/sda at all.

Comment 3 Jeremy Katz 2001-08-23 22:08:55 UTC
Aha, I see what's happening.  Fixed in CVS

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