Re: Grub Manual ... Solved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gene Heskett wrote:


That is this line in a verse of grub.conf:
        root (hd0,0)
which defines that its the drive normally set for master on the IDE0 cable,

Not necessarily...

the one on the end of the cable, thats the hd0 portion, and its the first partition on that drive, which is the second 0 since all this crap runs on a base zero numbering system.

Any resemblance between a Linux hd? device and a grub hd? is purely coincidental. In Linux the hd?'s are strictly IDE (and they are going away). In grub, the hd?'s refer to the bios bootable devices. If, for example, you have scsi devices and have configured your motherboard bios to boot from them, grub's hd0 will be your booting scsi drive even if you also happen to have an IDE present that linux will see as /dev/hda.


It could just as easily say root (hd3,2) to indicate that it would be 3rd partition in, of the drive set as slave on the IDE1 cable, that is just as valid. I haven't tried it set for an 'extended' partition, and I'd assume it would take a smarter than the average bear bios to handle that.

Many (most?) motherboards only see 2 disks in the boot process, although they may let you select from a larger number of choices which order to try. So you may have trouble using anything higher than hd1 - which again refers to what bios is using, not a particular ide position. And you may have non-bootable disks that have no bios driver at all, but which linux will use normally.

This is the usage that I would have changed, were I the one who wrote grub, from root to boot, because it actually tells grub where its boot files are.

Grub has to know the bios notation, since that is all it can use to access the files until the kernel and driver modules are installed.

Its second usage, the argument in the kernel string, tells the kernel, in very similar drive & partition syntax, where the partition to be mounted as '/' is.

That is this line in a given grub verse:

        kernel /vmlinuz-2.6.23 ro root=/dev/VolGroup00/LogVol00 rhgb

And this could just as easily say root=/dev/hda7 since by this time, the kernel is initializing and knows about extended partitions by then. This to me is the correct usage of the word 'root' because it truly is the root of all the filesystems mounted.

But at this point the kernel is running, has loaded its device drivers, has access to all devices, even ones bios doesn't handle, and this reference must be in linux terms where, for example /dev/hda7 does in fact refer to a disk with a particular IDE controller and selection. Even if you booted from a scsi drive that bios saw as the 0x80 device and grub called hd0, the kernel can mount a partition on /hda (an IDE device) as the root filesystem.

But I didn't write grub, so we're stuck with the double usage of 'root' and the confusion factor it creates for newbies.

They are double because they are entirely different things.


AIUI, grub, if not dealing with a LVM system, can function without a /boot partition, in which case the above syntax must be modified, and the grub installer does this, to gave a full path like this:

        kernel /boot/vmlinuz-2.6.23 ro root=/dev/hda1

(a base 1 numbering scheme is used here, furthering the newbie confusion quotient, that is equ to (hd0,0) in the other syntax)

One is linux, one is a peculiar adaptation of a bios concept.

assuming the /boot directory is in fact available in the drive & partition specified by the first usage above, but its not an optional setup I've ever used and I go back to RH5.0.

On older machines (circa RH5 era...) PC bios was limited to accessing 1024 cylinders for some time after larger drives were available. If the kernel and initrd files were in the filesystem in a location beyond that limit, the boot loader would be unable to access them to complete the boot. Thus the installer always tries to make boot a small partition and first on the disk to avoid any problem. The bios addressing scheme has been modified to work around the limits in current machines.

Now, I suspect that you'll probably argue with me, but it will be a one sided argument since I tend not to argue about points I know about after having stated them once.

I'll argue because you've stated something wrong or at least misleading.


--
  Les Mikesell
   lesmikesell@xxxxxxxxx


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux