no boot XP after FC4 (REPHRASING OF THE QUESTION)]

Rick Stevens rstevens at vitalstream.com
Mon Jan 9 22:23:46 UTC 2006


On Mon, 2006-01-09 at 07:58 -0600, Bob McClure Jr wrote:
> On Mon, Jan 09, 2006 at 02:17:13AM -0500, John Wirt wrote:
> > 
> > 
> > Bob (and Ian),
> > 
> > I checked further and the,
> > 
> >  grub-install /dev/sdXY
> > 
> > command installs Grub to the "boot directory" of the "root partition." 
> > See http://www.terabyteunlimited.com/kb/article.php?id=232 .  (note only 
> > one "r" in terabyte). My understanding is that the root partition is the 
> > one where Linux is installed.
> 
> Methinks TBU knows more about Windoze than Linux.  And Rick Stevens
> knows a good deal more than I about Linux and SCSI.  I'll let him
> weigh in.

Oh, gawd!  Ok, here we go with the "Reader's Digest" version...

Let's define some things:

	/dev/sd		refers to a SCSI disk device
	/dev/hd		refers to an IDE disk device

Following the "sd" or "hd" is a letter, "a" through "p", which will
refer to a specific drive in that class.  In the SCSI world, these drive
identifiers are allocated sequentially, depending on what drives are
found EVEN IF the SCSI IDs are not.  The scan starts at SCSI ID 0, then
2, then 3 on up to 15 (SCSI controllers are ignored).  So, the drive
with the lowest ID will be "/dev/sda", the second lowest "/dev/sdb" and
so on.

The naming assignments for IDE drives are more predictable:

	Master drive on primary controller:	/dev/hda
	Slave drive on primary controller:	/dev/hdb
	Master drive on secondary controller:	/dev/hdc
	Slave drive on secondary controller:	/dev/hdd

Using that data, "/dev/hda" is the first IDE drive, "/dev/sdg" would be
the seventh SCSI disk.

After the drive designator comes a number, 1 through 16, which defines
the partition number of the given drive.

"grub-install" expects a drive OR partition specification as its
argument.  Using the data above,

	grub-install /dev/sda3

would install grub into the third partition of the first SCSI disk.
Conversely,

	grub-install /dev/sdc2

would install it into the second partition of the third SCSI disk.  If
you do NOT specify a partition, then grub will be installed into the MBR
(master boot record) of the DRIVE.  So,

	grub-install /dev/sdb

would install grub into the MBR of the second SCSI disk.

That's all well and good as long as Linux is running.  However, at boot
time "/dev/sdXY" and "/dev/hdXY" don't exist as far as your BIOS is
concerned.  All it knows is "hard drive IDs", and these are single-byte
hexadecimal numbers.  Drive ID 0x80 is the "first" drive, 0x81 is the
second and so on.  In the IDE world, they follow the conventions:

	Master drive on primary controller:    0x80
	Slave drive on primary controller:     0x81
	Master drive on secondary controller:  0x82
	Slave drive on secondary controller:   0x83

In the SCSI world, it works more or less the same--the drive with the
lowest SCSI ID is 0x80.

Installing grub into an appropriate partition (as opposed to the MBR)
isn't hard--you want to install it into the partition that contains the
"/boot" filesystem.  If you have Linux running, check the mount table
by entering "mount" as the root user.  Each line will contain data
to the effect:

	(partition) on (mountpoint) type (fs-type) (access)

You want to look at the "on (mountpoint)" parts.  If you see "/boot"
listed, then the boot partition is a separate filesystem on its own
partition.  If you do NOT see "/boot" listed, then the boot data is in
the root of the filesystem, and that's where you want to install grub.
Examples:

	/dev/hda1 on / type ext3 (rw)
	/dev/hda2 on /boot type ext3 (rw)

That indicates that /boot is on a separate partition/filesystem and you
want to do "grub-install /dev/hda2"

	/dev/hda1 on / type ext3 (rw)
	/dev/hda2 on /images type ext3 (rw)
	/dev/hda7 on /usr type ext3 (rw)
	/dev/hda5 on /var type ext3 (rw)
	/dev/hda3 on /work type ext3 (rw)

This indicates that /boot is part of the root filesystem and you want
to do a "grub-install /dev/hda1".  Note that no matter WHAT you do,
the partition must be between 1 and 4 (the primary partitions). 
Partitions 5-16 are EXTENDED partitions and actually live inside
partition 4.

I hope that clears some of it up.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-            I'm afraid my karma just ran over your dogma            -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list