Re: Grub hangs - two hard drives and a CD

From: imotgm (imotgm_REM_at_invalid-yahoo.com)
Date: 11/29/05


Date: Tue, 29 Nov 2005 05:23:08 GMT

On Mon, 28 Nov 2005 15:26:23 +0100, Enrique Perez-Terron wrote:

 
> Grub> root (hd3,0) # the partition having "stage2"
> Grub> setup (hd0) # the disk your Bios will access first.
>

> (hd0) /dev/hda
> (hd3) /dev/hdc
>
>
Enrique,

What you wrote is all based on a wrong assumption that grub numbers drives
based on their position on the IDE cables. It does not. Grub counts
physical hard drives only, counts from (hd0), with (hd0) being the drive
that the BIOS will call to boot an OS.

Here is grubs device map when the BIOS is set to boot from the first hard
drive, and when there is no hda, but drives are present on hdc, hde, and
hdg, all master positions on a system with four IDE controllers. (My hard
drives are in caddies, so this is an easy test)

(fd0) /dev/fd0
(hd0) /dev/hdc
(hd1) /dev/hde
(hd2) /dev/hdg

When hde and hdg are removed, a drive is added to hda, and a usb drive is
also plugged in, with grub in the MBR of hdc, the BIOS is set to boot from
hdc, the device map gets automatically rewritten as below.

(fd0) /dev/fd0
(hd0) /dev/hdc
(hd1) /dev/hda
(hd2) /dev/sda

When (hd0) is moved to /dev/hda and (hd1) is moved to /dev/hdc, and the
other drives are returned to hde, and hdg, the BIOS is again set for
normal booting, the device map is again rewritten.

(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdc
(hd2) /dev/hde
(hd3) /dev/hdg
(hd4) /dev/sda

All of which illustrates that there is no fixed relationshib between cable
position, and grub's (hdX). Grub counts from (hd0), does not count CD-Roms
or DVD-Roms, (My DVD-R/W is hdb, and hdd is my CD-R/W) only hard drives,
and does not skip numbers. You can't have an (hd3) without having (hd0),
(hd1), and (hd2) preceed it.

The OP's drive is indeed (hd1), if it is not (hd0), and there are only two
hard drives in the machine. To know the exact interaction between grub and
Fedora, we need to see the partition table for (hd1), know for sure that
it is jumpered properly for whatever position it occupies in the IDE
cabling, and the contents of /boot/grub/menu.conf.

-- 
imotgm   
       "Lost? Lost? I've never been lost... Been a tad confused for a
        month or two, but never lost."


Relevant Pages

  • Re: Another Ubuntu on external drive question
    ... the tab-completion shows only hd0 as an option - so grub doesn't see the ... what happens if you have two drives attached?" ... Note that hd0 refers ... USB, ...
    (Ubuntu)
  • Re: Alternative booting
    ... becomes hd0 and grub is not working. ... It can't find hd1 :-) ... On systems that have removable drives, it really helps if whatever's hd0 ...
    (Fedora)
  • Re: Grub and old hard drives
    ... But Grub is still using /dev/hda/. ... These are both Western Digital hard drives and I have had good luck ... partition is to be, and by inference the grub/ sub-directory. ...
    (Fedora)
  • Re: Problem booting OS on IDE PCI adaptor card with Grub in MBR of hda
    ... Running /sbin/grub I tried different drives to see if grub> root ... Yes the BIOS numbering compared to the /dev entries, caused the confusion, ... the IDE PCI adaptor card is obviously accessable, ...
    (Fedora)
  • RE: GRUB failure
    ... > Why would GRUB whose ENTIRE RESOURCES SHOULD BE STILL ... > happen if you add/delete a partition on 'HAD'. ... numbers in the MBR piece. ... and booting off the scsi controller drives, ...
    (RedHat)