Grub4dos Guide - Device Allocation/Numbering


Drives/devices are numbered using the following syntax in Grub4dos -

Hard Disks
Hard disks are numbered from zero -

Hard Disk - Partition Numbering
Primary partitions are numbered from zero to three -

Examples - Logical partitions are numbered from four - Examples -

Virtual CD/DVD Drives
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).

CD/DVD Drives
Physical/real CD/DVD drives are numbered from zero -

Floppy Disk Drives
Floppy disk drives are numbered from zero -

PXE Drive

RAM Disk Drive

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. -

grub> root (
  Possible disks are: fd0 hd0 hd1 rd cd

grub> root (_

The disk order is determined by the BIOS, however (hd0) would normally be the boot device, even if booting from a slave drive.

(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).

It is possible to use the find command to search for a (unique) tag file in order to search all available devices and return the allocated device number – see here and here.