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

Jason Conti 1017678 at bugs.launchpad.net
Mon Jun 25 20:24:00 UTC 2012


Public bug reported:

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)

** Affects: os-prober (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug precise

-- 
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

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