update-grub creates duplicate ubuntu entries

Bug #1462687 reported by Vasya Pupkin
0
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Undecided
Unassigned
os-prober (Ubuntu)
New
Undecided
Unassigned

Bug Description

On my laptop update-grub creates duplicate Ubuntu entries. First created by update-grub itself, second added by os-prober. It doesn't happen on other laptops, only on my ASUS Zenbook UX301LAA. Here's os-prober output:

$ sudo os-prober
/dev/mapper/isw_dahhdhgec_ASUS_OS1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/mapper/isw_dahhdhgec_ASUS_OS7:Ubuntu 15.04 (15.04):Ubuntu:linux

On my other (older) laptop os-prober only outputs Windows entry.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: grub (not installed)
ProcVersionSignature: Ubuntu 3.19.0-18.18-generic 3.19.6
Uname: Linux 3.19.0-18-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Jun 7 00:48:40 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-05-06 (31 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
SourcePackage: grub
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Vasya Pupkin (shadowlmd) wrote :
Revision history for this message
Vasya Pupkin (shadowlmd) wrote :

I found why it happens. The problem is how os-prober resolves UUID-mounted partitions. It uses `readlink -f`. And it works in most cases, but on my system it works like that:

$ readlink -f /dev/disk/by-uuid/b7c815db-eefe-4e08-8d62-0c68531fa8ca
/dev/dm-7

So UUID resolved to /dev/dm-7 instead of isw_dahhdhgec_ASUS_OS7, so os-prober didn't test if this partition is actually mounted as '/'.

Steve Langasek (vorlon)
affects: grub (Ubuntu) → grub2 (Ubuntu)
Revision history for this message
Vasya Pupkin (shadowlmd) wrote :

I wonder how many years will pass till someone takes a look at this kind of easy to fix bug.

Revision history for this message
Rune Philosof (olberd) wrote :

You could make an upstream (debian) bug report and link it here.

Also, you could of course attach a patch that fixes this. :)

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in grub2 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.