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 -
Hard disks are numbered from zero -
Primary partitions are numbered from zero to three -
Logical partitions are numbered from four -
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)).
Primary partitions are numbered sequentially from zero -
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 are numbered from (hd32) to (0xFF) -
(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).
Physical/real CD/DVD drives are numbered from zero -
Floppy disk drives are numbered from zero -
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).
Document date - 29th June 2019