The failure is due to grub_probe() returning more than one line when
using btrfs. In the case of a 4-device raid1 created with:

make.btrfs  -m raid1 -d raid1 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sds1

grub_probe() returns and assigns to $rootfs:

/dev/sda1
/dev/sdb1
/dev/sdc1
/dev/sdd1

which causes calls to mapdevfs to fail since it receives 4 arguments
with error code 1 and message "Wrong number of args: mapdevfs <path>".

The fix is to amend the grub-installer script's grub_probe() function:

 diff -u grub-installer.orig grub-installer
--- grub-installer.orig 2014-08-10 04:22:23.009006148 +0100
+++ grub-installer      2014-08-10 04:22:38.249815612 +0100
@@ -113,7 +113,7 @@
                apt-install grub-common
                is_grub_common_installed=true
        fi
-       $chroot $ROOT grub-probe $@
+       $chroot $ROOT grub-probe $@ | head -1
 }


** Changed in: grub-installer (Ubuntu)
       Status: In Progress => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1354730

Title:
  14.04 grub-install failed: Wrong number of args: mapdevfs <path>

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1354730/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to