Mailinglist Archive: opensuse (1523 mails)

< Previous Next >
Re: [opensuse] Confused by hard drive naming/position /dev/sda vs hd0 etc,
  • From: David Haller <dnh@xxxxxxxxxxxx>
  • Date: Sat, 13 Mar 2010 01:19:09 +0100
  • Message-id: <20100313001909.GA4375@xxxxxxxxxxxxxxxxxx>

On Fri, 12 Mar 2010, C wrote:
The drives are all physically connected to the motherboard SATA
controller (no extra controller card etc):

SATA0 = 1TB (main drive with 4 partitions for various Linux
distributions, 1 swap and 1 /home)
SATA1 = 1TB (data drive1, single partition)
SATA2 = 500GB (data drive2, single partition)
SATA3 = 500GB (data drive3, single partition)
SATA4= 320GB (Windows drive)

How did you get to these names? Do they correspond to the labels on
the motherboard?

openSUSE 11.2 is mounting the drives by ID, and this always works
fine. The order openSUSE sees the drives (using fdisk -l) on /dev is
different than the physical connect order:

/dev/sda = SATA2
/dev/sdb = SATA3
/dev/sdc = SATA4
/dev/sdd = SATA0
/dev/sde = SATA1

Please show the output of lspci. Many motherboards with more than 4
SATA-Ports have 2 onboard-controllers!

And please also show the output of:
dmidecode | grep 'Product: '

openSUSE is installed on the 6th partition of SATA0 (/dev/sdd6). Grub
in openSUSE is set to boot (hd0,5)... which is correct (as I
understand Grub) and which boots fine.

Now here is where it gets weird.

I installed Gentoo on the 7th partition of SATA0 (dev/sdd7)... but
fdisk -l from the Gentoo install sees the drives differently than
openSUSE... it sees the drives like this:

/dev/sda = SATA2
/dev/sdb = SATA3
/dev/sdc = SATA4
/dev/hdc = SATA0
/dev/hdd = SATA1

And here you seem to use the one with SATA{0,1} with a PATA driver.

Please compare the outputs of lsmod on both distributions.

Next I installed Ubuntu 9.10 on the 5th partition of SATA0. Grub from
Ubuntu is set to boot (hd3,5). hd3? Where did that come from?

Grub's devices are mapped to devices of the system that you install
grub from. Please show the /boot/grub/ of both systems.
And tell us what grub you want where to boot what.

Ubuntu boots fine with this Grub line.... but... how? The SATA0 drive
is not hd3 in any way I understand it could be. As well, it picked up
openSUSE at (hd3,6), and Windows at (hd2,1)..... yet when I do an
fdisk -l it shows the exact same info as openSUSE.

It's all a matter of how devices are mapped to grub's devices.

So.. with all this conflicting information.. it's making it really
hard for me to figure out what Grub in openSUSE should be set to
(since I want to use the openSUSE boot menu for all of the installed

If you use just one grub in the MBR, e.g. openSUSEs, you need to use
the grub-devices from the of the openSUSE grub. As root=
kernel-parameter though, you have to use the one as seen from
e.g. Ubuntu to boot Ubuntu.

Each install thinks the drives are different in some way..
which is making life... difficult to say the least. Why is SATA0
attached to /dev/sdd?

It's on the first port of the second controller initialized. You can
adjust that by having only the driver for the controller on which the
boot-partition (the partition containing /boot) resides.

Why not /dev/sda? (minor issue since I'm using
mount by id, but still... doesn't make sense) Why is one Linux seeing
SATA0 as /dev/sdd and the other seeing it as /dev/hdc?

See above. It depends on which driver is used.

Why would Grub
in openSUSE see SATA0 as hd0 (which makes sense to me) and Grub in
Ubuntu see that same drive as hd3 (which makes no sense at all to me)?

Ubuntu doesn't see the drive as hd3. Its grub may seems to. And what
that maps to depends on it's

Does anyone have any hints or clues for me here?

info grub ;P


Information moves, or we move to it. Moving to it has rarely been
popular and is growing unfashionable; nowadays we demand that the
information come to us. -- Neal Stephenson
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >