[Bug 1017678] Re: Duplicate entries in grub2 menu for second ubuntu installed on another partition

Jason Conti 1017678 at bugs.launchpad.net
Wed Jun 27 17:47:37 UTC 2012


With the update to 3.5.0-2-generic in quantal, /boot/grub/grub.cfg was
generated. When running update-grub from the precise partition, the
grub2 menu is now correct without duplicates (plus additional recovery
mode entries).

So I guess this is only an issue after an initial install using:
ubiquity -b; to skip installing the boot loader. Once grub.cfg is
generated, os-prober doesn't have to guess with 90fallback and we don't
get duplicates.

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

Title:
  Duplicate entries in grub2 menu for second ubuntu installed on another
  partition

Status in “os-prober” package in Ubuntu:
  New
Status in “os-prober” package in Debian:
  New

Bug description:
  When running update-grub in Precise to add entries for a freshly
  installed Quantal system on another partition, linux-boot-prober
  outputs five entries:

  /dev/sda5:/dev/sda5::/vmlinuz:/initrd.img:root=/dev/sda5·
  /dev/sda5:/dev/sda5::/vmlinuz:/initrd.img:root=/dev/sda5
  /dev/sda5:/dev/sda5::/boot/vmlinuz-3.5.0-1-generic:/boot/initrd.img-3.5.0-1-generic:root=/dev/sda5
  /dev/sda5:/dev/sda5::/vmlinuz:/initrd.img:root=/dev/sda5
  /dev/sda5:/dev/sda5::/vmlinuz:/initrd.img:root=/dev/sda5

  which results in at least three unnecessary entries in the menu. I
  believe this is caused by /usr/lib/linux-boot-
  probes/mounted/90fallback, the first for loop explains it at least
  partially, since both /vmlinuz and /vmlinuz* match. I am not sure why
  we get two results for each though.

  As a workaround, in /etc/grub.d/30_os-prober, updating the LINUXPROBED
  line to include 'sort | uniq |':

  LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | sort | uniq |
  tr ' ' '^' | paste -s -d ' '`"

  at least gets rid of the duplicates. Checking that /vmlinuz is just a
  symbolic link to /boot/vmlinuz-3.5.0-1-generic would get rid of the
  other one, but I'm not sure of a nice way to implement that with the
  existing code.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: os-prober 1.51ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-25.40-generic 3.2.18
  Uname: Linux 3.2.0-25-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.0.1-0ubuntu8
  Architecture: amd64
  Date: Mon Jun 25 15:53:59 2012
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120411.1)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: os-prober
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/1017678/+subscriptions




More information about the foundations-bugs mailing list