Next: , Up: Filesystem


11.1 How to specify devices

The device syntax is like this:

     (device[,part-num][,bsd-subpart-letter])

[]’ 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 number which is a BIOS drive number, so the following are equivalent:

     (hd0)
     (0x80)
     (128)

part-num represents the partition number of device, starting from one for primary partitions and from five for extended partitions, and bsd-subpart-letter represents the BSD disklabel subpartition, such as ‘a’ or ‘e’.

A shortcut for specifying BSD subpartitions is (device,bsd-subpart-letter), in this case, GRUB searches for the first PC partition containing a BSD disklabel, then finds the subpartition bsd-subpart-letter. Here is an example:

     (hd0,a)

The syntax ‘(hd0)’ represents using the entire disk (or the MBR when installing GRUB), while the syntax ‘(hd0,1)’ represents using the first partition of the disk (or the boot sector of the partition when installing GRUB).

If you enabled the network support, the special drive ‘(pxe)’ is also available. Before using the network drive, you must initialize the network. See Network, for more information.

If you boot GRUB from a CD-ROM, ‘(cd)’ is available. See Making a GRUB bootable CD-ROM, for details.