[Bug 629580] [NEW] Linux kernel in Ubuntu 10.04 has different disk order than grub2/BIOS

zzarko zzarko at gmail.com
Fri Sep 3 15:09:51 UTC 2010


Public bug reported:

Binary package hint: linux-image

I had a system with three SATA disks, let's call them Disk1, Disk2 and Disk3, each with several partitions. Ubuntu 9.10 was installed on Disk1 and I had old Grub installed on its MBR. On the same disk was a partition with WinXP (sorry, but I really like to play games :) ). A month ago, I bought a new disk (Disk4) and Installed clean Ubuntu 10.04 on one of its partitions, with separate boot partition (the first one). I also copied Ubuntu 9.10 installation to new disk and changed its fstab accordingly. I installed Grub2 stage1 to Disk1 MBR and tried to make it to read files from boot partition on Disk4, but without any success (I spent a few hours reading and trying).
Finally, I gave up and changed disk order in BIOS, so that my Disk4 will become first disk. I re-installed Grub2 to its MBR, and everything was fine until I tried to boot old Ubuntu 9, or XP. First resulted in kernel panic, and second coludn't find ntldr... After another several hours of trying to make it work (without making DIsk1 first in BIOS), I found the cause of my problem: the order of disks was different for grub2 and for Linux kernel. Here is what I have found:

BIOS: Disk1 - 4th, Disk2 - 2nd, Disk3 - 3rd, Disk4 - 1st
Grub2: Disk1 - hd3, Disk2 - hd1, Disk3 - hd2, Disk4 - hd0
Ubuntu: Disk1 - sda, Disk2 - sdc, Disk3 - sdd, Disk4 - sdb

Is this how it should be? If it isn't, then it's a serious bug, at least
for me. Also, this may be the cause of my first problem, I guess I was
simply pointing grub to wrong disk (I expected that grub and kernel
recognise disks in the same order).

update-grub constantly makes set root='(hd1,1)' for Ubuntu, and it
should be (hd0,1). Also, for XP, it puts (hd0,1), and it should be
(hd3,1).

The motherboard is ASUS P5B Deluxe. Ubuntu 9.10 has the same parititon
order as 10.04. Kernel on 10.04 is 2.6.32-24-generic #42-Ubuntu SMP.
When using UUIDs (grub2 search command), I can boot XP with generated
grub.cfg (search line is after set root, so it sets root variable to
correct disk), but for Ubuntu9, the wrong UUID is inserted for its root
partition (same UUID as for Ubuntu10), so I have to change it manually
to /dev/sdb3 every time update-grub is used. I still need Ubuntu9
because package pyqwt3d that I use is broken on 10.04 (it's also broken
on 9.10, I managed to compile it somehow, and still haven't done it for
10.04).

If this is expected behaviour, then could someone please explain me why
is disk order different and how should I determine it without using
empirical methods.

** Affects: linux-meta (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Linux kernel in Ubuntu 10.04 has different disk order than grub2/BIOS
https://bugs.launchpad.net/bugs/629580
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux-meta in ubuntu.




More information about the kernel-bugs mailing list