[Bug 1017678] Re: Duplicate entries in grub2 menu for second ubuntu installed on another partition
axeoth
1017678 at bugs.launchpad.net
Wed Sep 26 20:24:27 UTC 2012
Sorry, I have to step back. In my particular case, the problem was that
I also have launched sudo update-grub on my Quantal installation. And
this created a /boot/grub/grub.cfg file on my Quantal partition.
For some reasons, existing grub.cfg files on other partitions seem to
completely fool the update-grub scripts on other partitions (more
precise, the linux-boot-order script).
In my case, the problem was solved by removing the grub.cfg file on the
Quantal partition (I still launch update-grub on my Precise partition).
I find abnormally that the mere existence of grub.cfg files on other
partitions completely fool the update-grub scripts (actually, the linux-
boot-prober scripts)
--
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:
Confirmed
Status in “ubiquity” package in Ubuntu:
Confirmed
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