Red Hat ENTERPRISE LINUX 3 Reference Manual page 32

Hide thumbs Also See for ENTERPRISE LINUX 3:
Table of Contents

Advertisement

14
Tip
The numbering system for devices under GRUB always begins with
distinction is one of the most common mistakes made by new users.
To give an example, if a system has more than one hard drive, GRUB refers to the first hard drive
as
and the second as
(hd0)
and the third partition on the second hard drive as
(hd0,0)
In general the following rules apply when naming devices and partitions under GRUB:
It does not matter if system hard drives are IDE or SCSI, all hard drives begin with the letters
The letters
are used to specify 3.5 diskettes.
fd
To specify an entire device without respect to partitions, leave off the comma and the partition
number. This is important when telling GRUB to configure the MBR for a particular disk. For
example,
specifies the MBR on the first device and
(hd0)
device.
If a system has multiple drive devices, it is very important to know the drive boot order set in the
BIOS. This is a simple task if a system has only IDE or SCSI drives, but if there is a mix of devices,
it becomes critical that the type of drive with the boot partition be accessed first.
2.4.2. File Names and Blocklists
When typing commands to GRUB that reference a file, such as a menu list, it is necessary to specify
an absolute file path immediately after the device and partition numbers.
The following illustrates the structure of such a command:
( device-type
device-number , partition-number ) /path/to/file
In this example, replace
with the integer for the device. Replace
top-level of the device.
It is also possible to specify files to GRUB that do not actually appear in the file system, such as a
chain loader that appears in the first few blocks of a partition. To load such files, provide a blocklist
that specifies block by block where the file is located in the partition. Since a file is often comprised
of several different sets of blocks, blocklists use a special syntax. Each block containing the file is
specified by an offset number of blocks followed by the number of blocks from that offset point.
Block offsets are listed sequentially in a comma-delimited list.
The following is a sample blocklist:
0+50,100+25,200+1
This sample blocklist specifies a file that starts at the first block on the partition and uses blocks 0
through 49, 99 through 124, and 199.
Knowing how to write blocklists is useful when using GRUB to load operating systems which require
chain loading. It is possible to leave off the offset number of blocks if starting at block 0. As an
example, the chain loading file in the first partition of the first hard drive would have the following
name:
(hd0,0)+1
. Likewise, GRUB refers to the first partition on the first drive as
(hd1)
with
device-type
/path/to/file
0
.
(hd1,2)
specifies the MBR on the fourth
(hd3)
,
, or
. Replace
hd
fd
nd
with an absolute path relative to the
Chapter 2. Boot Loaders
, not
. Failing to make this
1
device-number
.
hd

Advertisement

Table of Contents
loading

Table of Contents