Grub handles disks and partitions differently in its configuration files. Here, we go though each from basic to specific usage.
Grub uses the common convention for basic use, via this pattern:
(<storage_type><storage_number>[,<partition_type><partition_position>,<partition_slice_id>][,...])( ... )[ ... ]storage_type describes the type of storage:hd stands for hard diskfd stands for floppy diskcd stands for compact discusb stands for universal serial bus storage devicesmd stands for RAID. It uses mduuid/<uuid> formatieee1275 and nand stands for ofdisk. If the values has comma, it requires escapinglvm stands for logical volume manager. Uses lvmid/<volume-group-uuid>/<volume-uuid> formatcryptouuid stands for LUKS / encrypted partition. It uses cryptouuid/<uuid> formatstorage_number describes the identified storage ID. It is random and cater for multiple same storage_type devices, like multiple hard disks at a time. This number starts from 0.partition_type describes the partition scheme used by that partitionpartition_position describes the partition position in the storage device. This number starts from 1, no longer from 0.partition_slice_id describes the partition slice conventions. It is optional, made available just in case for specifying BSD slice convention.These are the some examples:
# first hard disk, 2nd partition with msdos scheme(hd0,msdos2)# first floppy disk(fd0)# first hard disk, 5th partition with msdos scheme(hd0,msdos5)# second hard disk, 1st partition with msdos scheme, use BSD 1st PC Slice number(hd1,msdos1,bsd1)# compact disc(cd)# hard disk(ahci0)(ata0)# USB(usb0)# LUKS(crypto0)(cryptouuid/123456789abcdef0123456789abcdef0)# RAID(mduuid/123456789abcdef0123456789abcdef0)(md/myraid)(md/0)# LVM(lvm/system-root)(lvmid/F1ikgD-2RES-306G-il9M-7iwa-4NKW-EbV1NV/eLGuCQ-L4Ka-XUgR-sjtJ-ffch-bajr-fCNfz5)# ofdisk(ieee1275/disk2)(ieee1275//pci@1f\,0/ide@d/disk@2)(nand)# others(memdisk)(host)(myloop)(hostdisk//dev/sda)To access the file inside that partition, you use the unix convention:
(...)/<file OR directory>Example, accessing the Linux kernel in 1st hard disk, 1st partition with msdos scheme:
(hd0,msdos1)/vmlinuzComing Soon.
Coming Soon.
That's all about Grub's disks and partition conventions.