Whole document tree
11. Filesystem syntax and semantics
GRUB uses a special syntax for specifying disk drives which can be
accessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish
between IDE, ESDI, SCSI, or others. You must know yourself which BIOS
device is equivalent to which OS device. Normally, that will be clear if
you see the files in a device or use the command
11.1 How to specify devices
The device syntax is like this:
`' means the parameter is optional. device should be either `fd' or `hd' followed by a digit, like `fd0'. But you can also set device to a hexadecimal or a decimal, which is a BIOS drive number, so the following are equivalent:
part-num represents the partition number of device, starting from zero for primary partitions and from four for extended partitions, and bsd-subpart-letter represents the BSD disklabel subpartition, such as `a' or `e'.
A shortcut for specifying BSD subpartitions is
The syntax like `(hd0)' represents using the entire disk (or the MBR when installing GRUB), while the syntax like `(hd0,0)' represents using the partition of the disk (or the boot sector of the partition when installing GRUB).
If you enabled the network support, the special drive, `(nd)', is also available. Before using the network drive, you must initialize the network. See section 6. Downloading OS images from a network, for more information.
11.2 How to specify files
There are two ways to specify files, by absolute file name and by block list.
An absolute file name resembles a Unix absolute file name, using
`/' for the directory separator (not `\' as in DOS). One
example is `(hd0,0)/boot/grub/menu.lst'. This means the file
`/boot/grub/menu.lst' in the first partition of the first hard
disk. If you omit the device name in an absolute file name, GRUB uses
GRUB's root device implicitly. So if you set the root device to,
say, `(hd1,0)' by the command
11.3 How to specify block lists
A block list is used for specifying a file that doesn't appear in the
filesystem, like a chainloader. The syntax is
This represents that GRUB should read blocks 0 through 99, block 200, and blocks 300 through 599. If you omit an offset, then GRUB assumes the offset is zero.
Like the file name syntax (see section 11.2 How to specify files), if a blocklist
does not contain a device name, then GRUB uses GRUB's root
This document was generated by Jason Thomas on February, 4 2002 using texi2html