HardDisk Order Swapped Causing the Next Update-grub to prevent Windows from booting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grub2
I first asked for help here: http://
First of all here is my setup:
=== BIOS HDD Boot Order ===
#1: SATA 160GB
#2: PATA 80GB
=== HDD DETECTION Order ===
Primary Master: DVD
Secondary Slave: PATA 80GB
Tertiary Master: SATA 160GB
=== Where are the OSs installed? ===
SATA 160GB
First: Windows XP Pro (drive C)
Second: data partition
Third: Karmic
=== How I installed Karmic ===
1) I first disconnected the PATA 80GB drive.
2) I installed Karmic, formatting the previous ext4 partition where Jaunty resides.
3) Boot Up [It detected WinXP fine and it loads]
4) Shut down
5) Re-connected the PATA 80GB drive.
=== The Problem ===
Once the PATA 80GB drive is connected - Karmic detects it as /dev/sda.
My SATA 160GB is moved by Karmic to /dev/sdb.
At this point, it is okay. But when the system runs update-grub (after an upgrade for example) it re-creates the grub.cfg. However, it based it's new settings on what Karmic provided it which is:
PATA 80GB as /dev/sda; and
SATA 160GB as /dev/sdb
Once I reboot, Grub2 will give this error when choosing WinXP OS "error: invalid signature". And grub2's menu is reporting that WinXP is on /dev/sdb. BUT, prior to this new grub.cfg update, WinXP was loading fine and reported on /dev/sda.
Pre-Karmic (ie Jaunty, Hardy, etc.) it follows the HDD boot order I setup on my BIOS. But with Karmic, it follows the "HDD DETECTION Order" (see above for reference).
Currently, to fix it, I have to disconnect my PATA 80GB drive, reboot the PC, edit the "Karmic" GRUB2 menu line to point it to /dev/sda (since it is now pointing to /dev/sdb), run update-grub again. Then reconnect the PATA 80GB drive and everything will work again as it should be.
I do not know why Win-XP will load on /dev/sda even though Karmic and Grub reports/moved my SATA 160GB to /dev/sdb.
Attaching additional files that may help.
ProblemType: Bug
Architecture: amd64
Date: Sun Oct 11 16:50:24 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelMo
Package: grub2 (not installed)
ProcEnviron:
LANG=en_PH.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: grub2
Uname: Linux 2.6.31-13-generic x86_64
With the updates today, I had a chance to save a copy of the grub.cfg that is produced after the update ran update-grub.
Attached below are:
grub2-working.cfg <-- based on a fresh Karmic install (I just changed the kernel to reflect the latest update)
grub2-new2.cfg <-- the result of update-grub after the kernel update today
What I noticed is, everytime update-grub runs it uses the format /dev/sd* - compare that to grub2-working.cfg it is using UUID.
If I replace the new /boot/grub/grub.cfg with the UUID version, everything works fine - Windows XP loads correctly. But if I don't and I leave the new grub.cfg (which is using /dev/sd* format), GRUB2 will give the error mentioned earlier - "error: invalid signature".
Isn't GRUB2 supposed to be using UUID by default?