[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The device syntax used in GRUB is a wee bit different from what you may have seen before in your operating system(s), and you need to know it so that you can specify a drive/partition.
Look at the following examples and explanations:
(fd0) |
First of all, GRUB requires that the device name be enclosed with ‘(’ and ‘)’. The ‘fd’ part means that it is a floppy disk. The number ‘0’ is the drive number, which is counted from zero. This expression means that GRUB will use the whole floppy disk.
(hd0,1) |
Here, ‘hd’ means it is a hard disk drive. The first integer ‘0’ indicates the drive number, that is, the first hard disk, while the second integer, ‘1’, indicates the partition number (or the PC slice number in the BSD terminology). Once again, please note that the partition numbers are counted from zero, not from one. This expression means the second partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk.
(hd0,4) |
This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from ‘4’, regardless of the actual number of primary partitions on your hard disk.
(hd1,a) |
This means the BSD ‘a’ partition of the second hard disk. If you need to specify which PC slice number should be used, use something like this: ‘(hd1,0,a)’. If the PC slice number is omitted, GRUB searches for the first PC slice which has a BSD ‘a’ partition.
Of course, to actually access the disks or partitions with GRUB, you need to use the device specification in a command, like ‘root (fd0)’ or ‘unhide (hd0,2)’. To help you find out which number specifies a partition you want, the GRUB command-line (see section The flexible command-line interface) options have argument completion. This means that, for example, you only need to type
root ( |
followed by a <TAB>, and GRUB will display the list of drives, partitions, or file names. So it should be quite easy to determine the name of your target partition, even with minimal knowledge of the syntax.
Note that GRUB does not distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally, any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.
Now the question is, how to specify a file? Again, consider an example:
(hd0,0)/vmlinuz |
This specifies the file named ‘vmlinuz’, found on the first partition of the first hard disk drive. Note that the argument completion works with file names, too.
That was easy, admit it. Now read the next chapter, to find out how to actually install GRUB on your drive.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 3, 2022 using texi2html 1.82.