While studying LPIC 101, the problem of "how to specify the disk partition number when specifying the root partition in the GRUB configuration file" came up, but since the counting method was different between GRUB 1 and 2, it was confusing, so a personal memo I will leave it as.
GRUB1 In GRUB Legacy (GRUB1), both the disk number and partition number are counted from 0. To specify the root partition, specify as "root (hd disk number, partition number)". Example)
1st partition of 1st disk → root (hd0,0) The second partition of the first disk → root (hd0,1) The second partition of the second disk → root (hd1,1)
GRUB2 In GRUB2, the disk number starts from 0 and the partition number starts from 1. To specify the root partition, specify as "set root = (hd disk number, partition number)". Example) 1st partition of 1st disk → set root = (hd0,1) The second partition of the first disk → set root = (hd0,2) The second partition of the second disk → set root = (hd1,2)
reference ping-t https://ping-t.com/mondai3/kakumon_histories/view/59
Linux Textbook LPIC Level 1 Speed Master Questions https://www.amazon.co.jp/dp/B01701BLCC/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1