Please note that GRUB4DOS does not use the same numbering system as Windows. Windows numbers disks from 0 and partitions from 1. GRUB4DOS numbers disks from 0 and paritions from 0. This page contains the following sections, covering GRUB4DOS drive/device syntax -
Primary partitions are numbered from zero to three -
(hd#,0) - first primary partition (on hard disk #)
(hd#,1) - second primary partition (on hard disk #)
(hd#,2) - third primary partition (on hard disk #)
(hd#,3) - fourth primary partition (on hard disk #)
Examples -
(hd0,0) - first primary partition on first hard disk
(hd0,1) - second primary partition on first hard disk
(hd2,3) - fourth primary partition on third hard disk
Logical partitions are numbered from four -
(hd#,4) - first logical partition (on hard disk #)
(hd#,5) - second logical partition (on hard disk #)
(hd#,6) - third logical partition (on hard disk #)
(hd#,7) - fourth logical partition (on hard disk #)
etc.
Examples -
(hd0,4) - first logical partition on first hard disk
(hd2,10) - seventh logical partition on third hard disk
(hd5,9) - sixth logical partition on sixth hard disk
The following screenshot has been taken from a virtual machine. Partition 0 is the first primary partition (device (hd0,0)), partition 1 is the second primary partition (device (hd0,1)), partition 4 is the first logical volume in the extended partition (device (hd0,4)), and partition 5 is the second logical volume in the extended partition (device (hd0,5)).
Hard Disk - Partition Numbering (GPT)
Primary partitions are numbered sequentially from zero -
(hd#,0) - first primary partition (on hard disk #)
(hd#,1) - second primary partition (on hard disk #)
(hd#,2) - third primary partition (on hard disk #)
(hd#,3) - fourth primary partition (on hard disk #)
(hd#,4) - fifth primary partition (on hard disk #)
The following screenshot has been taken from a virtual machine. Partition number 1 (hd0,1) is not displayed as a possible partition - this is a Microsoft Reserved (MSR) partition. Note that all partitions are displayed as type 0xEE - the 0xEE partition type is defined in the protective MBR in sector 0 of a GPT disk.
Virtual CD/DVD Drives
Virtual CD/DVD drives are numbered from (hd32) to (0xFF) -
(hd32) - first virtual CD/DVD drive
(hd33) - second virtual CD/DVD drive
(hd34) - third virtual CD/DVD drive
etc.
(0xFF) - last virtual CD/DVD drive (try this if mapping as (hd32) doesn't work)
(hd32) is a grub drive number equivalent to (0xA0). If a virtual drive is specified with a drive number greater than or equal to 0xA0, then it will be treated as a cdrom (i.e. - with 2048-byte sectors).
CD/DVD Drives
Physical/real CD/DVD drives are numbered from zero -
(cd0) - first CD/DVD drive
(cd1) - second CD/DVD drive
etc.
Floppy Disk Drives
Floppy disk drives are numbered from zero -
(fd0) - first floppy drive
(fd1) - second floppy drive
etc.
PXE Drives
(pd) - virtual device used to designate the root directory of a PXE boot server
RAM Disk Drive
(rd) - ramdisk
Miscellaneous
To check for available devices, press [c] to enter the command line mode and type root ( [tab]. This will list all devices accessible from grub4dos, e.g. -
The disk order is determined by the BIOS. (Bootable) External USB flash drives can be booted via Grub4dos if this feature is supported by the BIOS. If the BIOS supports USB devices as HDD type, then the syntax would be in the (hd#) format – e.g. if the system has one local hard disk drive and a USB drive, and the local disk is set to boot before the USB flash drive, then the USB flash drive will be device (hd1), whilst the local disk will be device (hd0).