grub-installer fails when /boot is bindmounted

Bug #181658 reported by Agostino Russo
2
Affects Status Importance Assigned to Milestone
Wubi
Fix Released
Medium
Unassigned
grub-installer (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: grub-installer

Grubinstaller fails when /boot is bindmounted as is the case in https://blueprints.launchpad.net/ubuntu/+spec/installer-for-windows. Patch provided:

=== modified file 'grub-installer'
--- grub-installer 2007-12-20 11:59:33 +0000
+++ grub-installer 2008-01-10 00:59:40 +0000
@@ -273,9 +273,12 @@

 rootfs=$(findfs /)
 bootfs=$(findfs /boot)
+bootfstype=$(findfstype /boot)
+if [ -d "$bootfs" ] && [ "$bootfstype" = "none" ]; then
+ bootfs=$rootfs
+ bootfstype=$(findfstype /)
+fi
 [ -n "$bootfs" ] || bootfs="$rootfs"
-
-bootfstype=$(findfstype /boot)
 [ -n "$bootfstype" ] || bootfstype="$(findfstype /)"

 case $ARCH in
@@ -292,18 +295,21 @@
   sed 's:\(/dev/\(cciss\|ida\)/c[0-9]d[0-9]\|/dev/[a-z]\+\).*:\1:')

 case $prefix in
- /dev/md)
- disc_offered_devfs="$bootfs"
- ;;
- /dev/mapper)
- disc_offered_devfs="$bootfs"
- ;;
- /dev/[hs]d[a-z]|/dev/cciss/c[0-9]d[0-9]|/dev/ida/c[0-9]d[0-9])
- disc_offered_devfs="$prefix"
- ;;
- *)
- disc_offered_devfs=$(echo "$bootfs_devfs" | sed "s:\(.*\)/.*:\1/disc:")
- ;;
+ /dev/loop)
+ disc_offered_devfs="$bootfs"
+ ;;
+ /dev/md)
+ disc_offered_devfs="$bootfs"
+ ;;
+ /dev/mapper)
+ disc_offered_devfs="$bootfs"
+ ;;
+ /dev/[hs]d[a-z]|/dev/cciss/c[0-9]d[0-9]|/dev/ida/c[0-9]d[0-9])
+ disc_offered_devfs="$prefix"
+ ;;
+ *)
+ disc_offered_devfs=$(echo "$bootfs_devfs" | sed "s:\(.*\)/.*:\1/disc:")
+ ;;
 esac
 disc_offered=$(mapdevfs "$disc_offered_devfs")

Tags: wubi
Revision history for this message
Agostino Russo (ago) wrote :

Fix submitted upstream

Changed in wubi:
importance: Undecided → Medium
status: New → In Progress
Agostino Russo (ago)
Changed in wubi:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub-installer - 1.27ubuntu2

---------------
grub-installer (1.27ubuntu2) hardy; urgency=low

  [ Colin Watson ]
  * udev 117 merged all udev tools into a single binary called udevadm.
    Check for this and use it instead of udevinfo if available.

  [ Evan Dandrea ]
  * Handle cases where /boot is bindmounted (LP: #181658).

 -- Evan Dandrea <email address hidden> Fri, 18 Jan 2008 15:41:36 -0500

Changed in grub-installer:
status: New → Fix Released
Agostino Russo (ago)
Changed in wubi:
status: Fix Committed → Fix Released
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.