[Bug 1065196] Re: update-grub sets wrong kernel root for linux dual boot systems

Thomas Ward teward at trekweb.org
Wed Oct 10 19:15:25 UTC 2012


Which "grub" are you using?  It's not common to see 'grub' as your
bootloader in 12.04.  The line "Package: grub (not installed)" also
suggests you're using grub2.  Can you confirm that you are actually
using grub2 and not grub, or vice versa?  (I think this should be filed
against grub2, not grub, hence the question)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub in Ubuntu.
https://bugs.launchpad.net/bugs/1065196

Title:
  update-grub sets wrong kernel root for linux dual boot systems

Status in “grub” package in Ubuntu:
  New

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/grub/+bug/1065196/+subscriptions




More information about the foundations-bugs mailing list