grub /dev/sda and (hd0) partition naming question

Asked by dongiuseppe2684

I have Windows x64 and Ubuntu x64 currently on my hard drive. Everything is working fine but my /boot/grub/stage1 file is located on (hd0,4). Why is it there? Can someone explain the number that grub uses with (hd0,?)?

Some other info: I had installed Windows 32bit then ubuntu x64 on my computer. I then deleted my Windows partition and installed Windows 64bit. This wiped the MBR and I had to reconfigure grub so I can dual boot. So when I looked for the stage1 file it was on (hd0,4). Also in menu.lst Windows is on (hd0,0). So my question is where is (hd0,1-3)? And is there anything that I should check?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Dongiusè the hd0,4 mean your Ubuntu is installed on the:

hd0 → first hard disk
4 → partition 5 of that hard disk

The initial number computation start from 0 and not from 1.

So Windows (hd0,0) is on the 1.st partition of the first hard-disk

Hope this helps

Revision history for this message
dongiuseppe2684 (dongiuseppe2684) said :
#2

That's what I thought but I only have two partitions on my disk. One for windows and one for ubuntu. If I open GParted I can see that there are only two partitions. They are labeled as follows:
/dev/sda1 - NTFS
/dev/sda2 - Extended
/dev/sda5 - Ext3
/dev/sda6 - Linux-swap

Where /sda5 and /sda6 are part of the /sda2 partition.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

Please install gparted to indagate...

Open a Terminal from the menu Applications → Accessories → Terminal and type:
(if the system ask you a password give your user password, you will not see nothing when you type it, then press enter)

sudo apt-get install gparted

then you will find Partition editor under menu System→ Administration

Might be is useful to find if there are any other partitions on your hard-disk.

Hope this helps

Revision history for this message
dongiuseppe2684 (dongiuseppe2684) said :
#4

I already have Gparted installed that is what used to give my info in the previous post.

  Device Boot Start End Blocks Id System
/dev/sda1 * 63 260863469 130431703+ 7 HPFS/NTFS
/dev/sda2 260863470 586067264 162601897+ 5 Extended
/dev/sda5 260863533 572781509 155958988+ 83 Linux
/dev/sda6 572781573 586067264 6642846 82 Linux swap / Solaris

As you can see here thats all I have. So can you explain the (hd0,4)?

Revision history for this message
peter b (b1pete) said :
#5

grub in your case is/was installed on the / partition of the first volume of the extended partition which is always sda5.

it was NOT installed to (hd0) BUT to /dev/sda5 or (hd0,4)

peter b

Revision history for this message
peter b (b1pete) said :
#6

sorry,

....'of the first'....... should read

....'on the first'.....

peter b

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#7

So your system have not hidden or unrecognized partition and it use this naming convention to access in the right way to this /dev/sda partitions.

I think you can don't worry so much about it.

Hope this helps

Revision history for this message
dongiuseppe2684 (dongiuseppe2684) said :
#8

Thanks marcobra, that solved my question.