grub-mkrelpath produce incorrect paths if /boot is a bind mount

Bug #959790 reported by Kasper Dupont
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

grub-mkconfig uses grub-mkrelpath to find out which paths to put in grub.cfg, but in some cases grub-mkrelpath produce an incorrect output.

If / and /boot are both mountpoints of different directories from the same physical file system, grub-mkrelpath will use the wrong entry from /proc/self/mountinfo. It should use the entry for /boot to produce the correct path, but it picks the entry for / when given a path under /boot.

For example if /proc/self/mountinfo contains:
20 1 8:1 /lucid / rw,relatime - ext4 ....
26 20 8:1 /boot /boot rw,relatime - ext4 ....

Then running "grub-mkrelpath /boot/grub" outputs /lucid/boot/grub, but it should have output /boot/grub.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: grub-common 1.99~rc1-13ubuntu3 [modified: usr/bin/grub-mkrelpath]
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Tue Mar 20 00:00:30 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Kasper Dupont (ubuntu-launchpad-feb) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
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: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
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.