Fails to install grub when (partitioned?) md array is present

Bug #528670 reported by Iain Lane
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: ubiquity

Hiya,

I'm trying to install Lucid A3 on my system, which has a (maybe) nonstandard partition layout.

  2x1T drives in a raid0 array, assembled in the live environment with mdadm --assemble --scan
  1x500G drive, split into NTFS, ext4 and swap partitions, like this:

  ubuntu@ubuntu:~/m$ blkid
  /dev/md0p1: UUID="a9c7370f-f9eb-4d31-bc7b-7fb3def0a4f8" TYPE="ext4"
  /dev/sdc1: UUID="4EF8EC4AF8EC323F" TYPE="ntfs"
  /dev/sdc2: UUID="c1d654eb-a3ba-42b7-a1b7-0a8a34b05863" TYPE="ext4"
  /dev/sdc5: UUID="7e0bab34-637c-42de-a1c9-165a348ae78d" TYPE="swap"

I installed as normal with Ubiquity, selecting /dev/md0p1 as / and /dev/sdc5 as swap. I did not format /dev/md0p1, as this contains my user data. The installer failed to install grub. I elected to continue without a boot loader and to try and fix this myself.

Installing grub2 in a chroot results in:

  root@ubuntu:/# dpkg-reconfigure grub-pc
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  Auto-detection of a filesystem module failed.
  Please specify the module with the option `--modules' explicitly.
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  Auto-detection of a filesystem module failed.
  Please specify the module with the option `--modules' explicitly.
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  Auto-detection of a filesystem module failed.
  Please specify the module with the option `--modules' explicitly.

Futher futile attempts resulted in various messages:

  root@ubuntu:/# grub-install --recheck /dev/md0 --modules="mdraid raid"
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  /usr/sbin/grub-setup: error: no mapping exists for `md0'.

  root@ubuntu:/# grub-install --recheck /dev/sdc --modules="mdraid raid"
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  /usr/sbin/grub-probe: error: no mapping exists for `md0'.
  You attempted a cross-disk install, but the filesystem containing /boot/grub does not support UUIDs.

I then attempted to fall back to grub, but switched to grub2 in order to obtain more logs for this bug report, at which point grub2 installed successfully. I presume this is due to the device.map that the postinst of grub caused to be created:

  root@ubuntu:/# cat boot/grub/device.map
  (hd0) /dev/sda
  (hd1) /dev/sdb
  (hd2) /dev/sdc

So I guess that md support with grub2 isn't quite there yet :)

Iain

ProblemType: Bug
Architecture: amd64
Date: Fri Feb 26 19:48:54 2010
DistroRelease: Ubuntu 10.04
LiveMediaBuild: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100215)
Package: ubiquity 2.1.19
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-13.18-generic
SourcePackage: ubiquity
Uname: Linux 2.6.32-13-generic x86_64

Revision history for this message
Iain Lane (laney) wrote :
affects: ubiquity (Ubuntu) → grub-installer (Ubuntu)
Iain Lane (laney)
summary: - Fails to install grub when md array is present
+ Fails to install grub when (partitioned?) md array is present
Revision history for this message
Thomas (t.c) wrote :

I come to the same error when I try to install a system with debootstrap. After debootstrap I mount /proc, /dev and /sys and chroot in the system (like there https://wiki.ubuntu.com/Grub2#Recover%20Grub%202%20via%20LiveCD).

than:

root@rescue:/# grub-install --recheck --no-floppy --modules="mdraid raid" /dev/sda1
/usr/sbin/grub-probe: error: no mapping exists for `md1'.
/usr/sbin/grub-probe: error: no mapping exists for `md1'.
/usr/sbin/grub-probe: error: no mapping exists for `md1'.
You attempted a cross-disk install, but the filesystem containing /boot/grub does not support UUIDs.

Any Help there?

Revision history for this message
Thomas (t.c) wrote :

root@rescue:/# blkid
/dev/loop0: UUID="b601a4fe-f75d-4d3c-a105-19f996fd06db" TYPE="ext2"
/dev/md0: UUID="79ddbf16-283c-429e-9115-3ac15a1860d8" TYPE="swap"
/dev/sda1: UUID="4dae1f16-a3e1-72ea-776c-2c25004bd7b2" TYPE="linux_raid_member"
/dev/sda2: UUID="5767efcf-bd75-9344-776c-2c25004bd7b2" TYPE="linux_raid_member"
/dev/sdb1: UUID="4dae1f16-a3e1-72ea-776c-2c25004bd7b2" TYPE="linux_raid_member"
/dev/sdb2: UUID="5767efcf-bd75-9344-776c-2c25004bd7b2" TYPE="linux_raid_member"
/dev/md1: UUID="d4a3304d-915b-4cdd-8050-f3bf43a3b457" TYPE="ext4"

Revision history for this message
Thomas (t.c) wrote :

and yes, create manually the /boot/grub/device.map fixed the problem...

Colin Watson (cjwatson)
affects: grub-installer (Ubuntu) → grub2 (Ubuntu)
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm going to tentatively declare that I don't think the partitioned nature of the RAID matters, and hence mark this as another instance of bug 527401.

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
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.