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

Rick Stevens rstevens at vitalstream.com
Tue Jan 17 01:22:05 UTC 2006


On Mon, 2006-01-16 at 15:19 -0500, John Wirt wrote:
> Rick,
> 
> A clarification would be helpful.
> 
> In your instructions on 1/9/06 14:23:46, you "as long as Linux is 
> running." When I reconfigure Grub, it will be from Linux running on the
> 
> #1  install CD and not Linux in the boot partition where Grub is to be 
> installed.

Then you're fine.  /dev/sda will be the SCSI disk with the lowest SCSI
ID, /dev/sdb will be the one with the second lowest SCSI ID and so on.

> Q1:  In this case, would the command to install grub to the third 
> partition of the second scsi disk still be,
> 
>     grub-install /dev/sdb3

That's the one.

> or would it be these two commands:
> 
>     root (sdb,2)
> 
> and, if the /root partition is fourth partition on the second disk,

Whoa, mate!  "/root" is the home directory of the root user, NOT the
root of the filesystem.  The root of the filesystem is "/".

>    setup (sdb,5)
> 
> These two instructions (root and setup) for re-installing Grub from a 
> "boot install disk (not the installed copy of Linux) can be found here: 
> www.terabyteunlimited/cm/kb/article.php?id=232 .  These commands say 
> that the Linux boot directory is located in the third partition on the 
> second scsi drive and the root partition is in the fifth partition on 
> the second scsi drive.

Ok, when I say "root of the filesystem", I mean the partition that holds
the "/" directory, and that's where you want to install grub.

grub does not know about any device called "(sdx,y)".  It understands
"(fdx,y)" and "(hdx,y)".  The concept of "sd" is a Linux naming thing
ONLY.  grub knows disks as enumerated by your BIOS.  hd0 is the first
drive your BIOS sees (regardless whether it's SCSI or IDE), hd1 is the
second and so on.  If you had a mix of two IDE and two SCSI drives and
do NOT tell the SCSI controller that it's first in line, then:

	hd0	First IDE drive
	hd1	Second IDE drive
	hd2	First SCSI drive
	hd3	Second SCSI drive

If you did tell the SCSI controller it was first, then:

	hd0	First SCSI drive
	hd1	Second SCSI drive
	hd2	First IDE drive
	hd3	Second IDE drive

Under Linux, the third partition of second SCSI disk is called
"/dev/sdb3".  This is exactly the same thing as "(hd1,2)" in grub
parlance.  Similarly, the fifth partition of the second SCSI disk is
"/dev/sdb5" under Linux and "(hd1,4)" for grub. And just for giggles,
the sixth partition of the first SCSI is "/dev/sda6" under Linux and
"(hd0,5)" for grub.

Just keep in mind that grub does not differentiate between SCSI and IDE,
uses numbers exclusively and starts numbering at 0.  Linux DOES
differentiate between SCSI and IDE, uses letters for the drives and
numbers for the partitions, and starts counting partitions at 1.

If you boot off the CD in rescue mode, after the system finds and mounts
your installed system, do a "mount -l" command and look for the device
name associated with the "/mnt/sysimage".  THAT'S where you want to do
your "grub-install" to.

> The configuration of the second drive on my machine, where I am trying 
> to reinstall Grub is:
> 
> > MBR Entry 0____ Partition____ 16mb______  Dell Utility
> > NO-NAME________ Partition____ 2565mb____  FAT-32
> > MBR Entry 2____ Partition____ 102mb_____  Linux native
> > MBR Entry 3____ Partition__ 32020mb_____  Extended
> > UnNamed________ Volume_____ 30043mb_____   Linux native
> > UnNamed________ Volume______ 1997mb_____   Linux Swap/Solaris
> >
> 
>  From this list, I assume that the Linux /boot directory is  MBR entry 3 
> and the /root partition is the first "UnNamed" partition.

Sorta.  Assuming you set up a "/boot" of about 102MB, then
yes, /dev/sdb3 (or grub "(hd1,2)") is /boot.  It appears you put
everything else in a single 30G partition.  In that case, then the
root of the filesystem is /dev/sda5 (grub "(hd1,4)") and it's called
"/".

> 
> John Wirt
> 
>  - - - - - - - - - - - - - - -
> 
> 
>     * /From/: Rick Stevens <rstevens vitalstream com>
>     * /To/: Getting started with Red Hat Linux <redhat-install-list
>       redhat com>
>     * /Subject/: Re: no boot XP after FC4 (REPHRASING OF THE QUESTION)]
>     * /Date/: Mon, 09 Jan 2006 14:23:46 -0800
> 
> ------------------------------------------------------------------------
> 
> 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 vitalstream com -
> - VitalStream, Inc.                       http://www.vitalstream.com -
> -                                                                    -
> -            I'm afraid my karma just ran over your dogma            -
> ----------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request at redhat.com
> Subject: unsubscribe
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-      "Doctor!  My brain hurts!"  "It will have to come out!"       -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list