[Bug 1065196] Re: update-grub sets wrong kernel root for linux dual boot systems
Daniel Lago
daniellago85 at gmail.com
Sun Sep 1 17:20:59 UTC 2013
It also affects me, using Ubuntu server with other 10 GNU/Linux OSes.
Its a very dark long shot, but I think that the problem can maybe be in
/etc/grub.d/10_linux file, the LINUX_ROOT_DEVICE var behavior is to
being set only on first time (the second time and forward it appears do
not change).
--
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