GRUB: how find partition number (hd0,x)?

Solution 1:

First off, you need to realize that in grub, it does not use normal linux hard drive identifiers. Instead, the letters correlate to numbers, starting with zero (i.e. hda = hd0, hdb = hd1, etc).

Secondly, in grub-legacy, the partition number starts at 0, not 1 like in Linux, so subtract 1 from the linux partition number. And in grub2, it starts at 1.

An example is: hda1 = (hd0, 0)

Finally, grub does not differentiate between hd and sd devices, so everything is labeled hd.

Thus, in your case, your grub entry for /dev/sda6 should read (hd0, 5)

Solution 2:

Easiest way to be sure is from grub cli and using tab completion.

start by typing... root (hd0,

then hit [tab]
The tab completion should then list the partitions available. pick the one you think makes most sense close off the parentheses and on the next line type kernel /

then hit [tab] again... if the files and directory structure look right you picked the right one... if not.. back up and redo the root line.