[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:15:03 UTC 2012
I strongly believe that the root cause is in the linux-boot-prober as it
returns a strange result when launched (from my Xubuntu Precise) against
a Xubuntu Quantal partition:
(verbatim copy)
$ sudo linux-boot-prober /dev/sda7 2> /dev/null
/dev/sda7:/dev/sda7:Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7205122a-da09-4f1f-97ef-67d3f70df317:/boot/vmlinuz-3.5.0-15-generic:/boot/initrd.img-3.5.0-15-generic:root=UUID=7205122a-da09-4f1f-97ef-67d3f70df317 ro quiet splash $vt_handoff
/dev/sda7:/dev/sda7:Ubuntu, with Linux 3.5.0-15-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-15-generic-advanced-7205122a-da09-4f1f-97ef-67d3f70df317:/boot/vmlinuz-3.5.0-15-generic:/boot/initrd.img-3.5.0-15-generic:root=UUID=7205122a-da09-4f1f-97ef-67d3f70df317 ro quiet splash $vt_handoff
(/verbatim copy)
More, this strange result also likely causes the following code in
30_os-prober to misbehave (returning two entries with strange names)
LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
prepare_boot_cache=
for LINUX in ${LINUXPROBED} ; do
(etc)
done
I hope this helps
--
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