Home » Questions » Computers [ Ask a new question ]

What is my partition number?

What is my partition number?

I am using Linux and i need to restore my grub, so i go into commandline on live CD, and i enter 'grub', then 'root (hd0,6)', but it says that the disk does not exist. This is how everything looks like:

Asked by: Guest | Views: 57
Total answers/comments: 2
Guest [Entry]

"You may just have to experiment.

Using Grub's commandline tab-completion can help show you what Grub is seeing. By default Grub is probably numbering the partitions in order, starting from (hd0,0), like this:

(hd0,0) -- /dev/sda1
(hd0,1) -- /dev/sda2
not numbered -- /dev/sda3

(hd0,2) -- /dev/sda5
not numbered -- unallocated
(hd0,3) -- /dev/sda7
(hd0,4) -- /dev/sda8
(hd0,5) -- /dev/sda6

Based on this, (hd0,3) is your best bet.

This assumes your ordering in the question is how partitions are physically ordered on the disc. In particular, this is how your drive should appear under Grub v1; Grub v2's enumeration may differ."
Guest [Entry]

"If you're looking to locate the grub boot files, you can use the 'find command' to determine the partition type.

For example:

grub> find /grub/stage1
find /grub/stage1