[Bug 1065196] Re: update-grub sets wrong kernel root for linux dual boot systems
brian mullan
1065196 at bugs.launchpad.net
Thu Jul 18 14:32:49 UTC 2013
I think this bug is what I have been seeing also. However, in my
system Ubuntu 13.04 is installed on SDA1 and an older Ubuntu 12.10 is
installed on SDB1 on which I hadn't installed new NVIDIA drivers for the
Nvidia GTX650 card I bought and installed AFTER I'd updated my system to
the 13.04 which is on SDA1
I use Grub2.
Every so often when my system boots I pick Ubuntu - which is the first
option and normally ubuntu 13.04 would boot.
However, every so often when I pick "Ubuntu" my first option ... for
some reason the Ubuntu 12.10 boots instead. I can always tell because
my graphics is screwed up and when I reboot... I see it shutting down
Ubuntu 12.10 ... not 13.04 as I would expect.
I've attached my grub.cfg.
The UUID of both the "Ubuntu" entry (1st grub entry) and the "Ubuntu
12.10" entry (near end of the file) are identical?
** Attachment added: "my grub.cfg showing duplicate UUID"
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1065196/+attachment/3741333/+files/mygrub.cfg
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1065196
Title:
update-grub sets wrong kernel root for linux dual boot systems
Status in “grub2” package in Ubuntu:
Confirmed
Bug description:
Installing two versions of linux to separate partitions confuses
"update-grub". It detects the two linux operating systems and creates
two menu entries , but it generates a grub.cfg file that makes both
kernels point their root directory to the same partition.
Steps to reproduce:
1. Create three partitions on your hard disk:
- /dev/sda1: boot partition (mount point: /boot in both linuxes)
- /dev/sda2: root partition of first linux OS (e.g., Ubuntu precise)
- /dev/sda3: root partition of alternative linux OS (e.g., for beta testing -- that's what I am trying to do)
2. Boot into your first linux OS
3. execute "sudo update-grub"
update grub detects both linuxes:
- linux on /dev/sda2 (e.g., precise)
- linux on /dev/sda3 (e.g., quantal beta)
it generates grub.cfg which is stored to the shared boot partition, /dev/sda1
4. open /boot/grub/grub.cfg. Observe that the UUIDs for the kernel
root partitions are identical on both entries! They both point to
/dev/sda2, i.e., the partition update-grub was called from.
To clarify things, this is how the generated grub.cfg looks in
principle:
[...]
menuentry '<name of first linux OS (on /dev/sda2)>' [...] {
[...]
set root='(hd0,msdos1)' # <- this is the boot partition, /dev/sda1
search --no-floppy --fs-uuid --set=root <UUID of /dev/sda1>
linux /vmlinuz-x.x.x root=UUID=<UUID of /dev/sda2> [...]
initrd [....]
}
menuentry '<name of second linux OS (on /dev/sda3)>' [...] {
[...]
set root='(hd0,msdos1)' # <- this is the boot partition, /dev/sda1
search --no-floppy --fs-uuid --set=root <UUID-of-/dev/sda1>
linux /vmlinuz-y.y.y root=UUID=<UUID of /dev/sda2 (!!!)> [...]
initrd [....]
}
[...]
Note that the "linux" line in the second entry is wrong: it points the
kernel's root directory to /dev/sda2, but it should point to
/dev/sda3.
Essentially this means that both entries will boot the same OS, i.e.,
the first linux on /dev/sda2. The only difference is that the two
entries will be running different kernels on the same OS.
Specifically, none of the entries will really boot the second OS on
/dev/sda3.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: grub (not installed)
ProcVersionSignature: Ubuntu 3.2.0-31.50-generic 3.2.28
Uname: Linux 3.2.0-31-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu13
Architecture: amd64
Date: Wed Oct 10 18:31:38 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
SourcePackage: grub
UpgradeStatus: Upgraded to precise on 2012-04-28 (165 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1065196/+subscriptions
More information about the foundations-bugs
mailing list