grub-efi-amd64 2.02~beta2-7 fails to install on raid/lvm

Bug #1298399 reported by Valentijn Sessink on 2014-03-27
This bug affects 3 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Colin Watson

Bug Description

During installation of Trusty on a RAID6/LVM system, the installation fails during the "configure" phase of grub-efi-amd64. The installer message says "GRUB installation failed
The 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot."

The installer log message screen says (among other things):
grub-install: error: cannot open `/boot/grub/x86_64-efi/load.cfg': No such file or directory.

After issuing:
chroot /target
grub-install -v
... the installation of grub also ends with:
grub-install: info: copying `/boot/grub/x86_64-efi/load.cfg' -> `/boot/efi/EFI/ubuntu/grub.cfg'
grub-install: error: cannot open `/boot/grub/x86_64-efi/load.cfg': No such file or directory

Installation is on a raid6 (software-raid) device with lvm, /dev/mapper/volumegroup-root1404 is the root-fs (ext4 formatted), there is a separate EFI partition on /dev/sda. The disks are GPT-partitioned.

Valentijn Sessink (valentijn) wrote :

Further research shows:
- a simple install with sda1 = fat32 EFI, sda2 = 100Gb ext4 does work
- an install with /dev/md0 formatted as ext4 root-fs fails
- an install with /dev/sda2 as LVM pv, with root as a volume within, fails too.

Both md and lvm installs initially seem to complain that "grub-install dummy" failed. Trying to run grub-install from the command line will then show the error about the missing "load.cfg".

Rather weird is the fact that Bug #1236625 seems to describe the exact same issue - but was fixed in grub2 - 2.00-19ubuntu2. Is this a regression?

Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
Thomas (t.c) wrote :

I run into the same issue but reported to Bug #1229738

Thomas (t.c) wrote :

Oh no, I reported to Bug #1277865, but before I used Bug #1229738 (which solution don't work any more, because grub-install is now binary and cant be patched like before)

Thomas (t.c) wrote :

I created a verbose logfile of

grub-install -v --bootloader-id ubuntu-hdd1 /dev/sda

Thomas (t.c) wrote :

ok, I got it running, like written in Bug #1229738 , only that I did this:

create a file /tmp/load.cfg with
search.fs_uuid 2ff0dd02-5ef8-4166-b1b4-40cda0eb468d root
set prefix=($root)/boot/grub

(the uuid must match your / partition - use blkid to get it)

than on one console I run this:

while true; do cp /tmp/load.cfg /boot/grub/x86_64-efi/; done

on the other console was running grub-install ... and tada :)
When its not working the first time try it again... so developers have time to fix the problem.

Thomas (t.c) wrote :

At least it dont load the grub.cfg :(

I changed the call to: grub-install --modules=search_fs_uuid --target=x86_64-efi --bootloader-id ubuntu /dev/sda

Thats the output (with -v)

Valentijn Sessink (valentijn) wrote :

# create a file /boot/grub/x86_64-efi/load.cfg with
search.fs_uuid 2ff0dd02-use-"blkid"-to-get-the-number-40cda0eb468d root
set prefix=($root)/boot/grub
# then use
chattr +i /boot/grub/x86_64-efi/load.cfg
# to make load.cfg write-protected (on an ext4 filesystem)
I'm still getting an error after restart, "diskfilter writes are not supported" press-a-key, but after a few seconds (and, luckily, without the key!) booting continues.

Colin Watson (cjwatson) on 2014-03-31
Changed in grub2 (Ubuntu):
status: Confirmed → Fix Committed
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-8

grub2 (2.02~beta2-8) unstable; urgency=medium

  [ Colin Watson ]
  * Backport from upstream:
    - ieee1275: check for IBM pseries emulated machine.
    - Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig
      (closes: #735935).
    - btrfs: fix get_root key comparison failures due to endianness.
  * Build-depend on automake (>= 1.10.1) to ensure that it meets configure's
    requirements (LP: #1299041).
  * When installing an image for use with UEFI Secure Boot, generate a
    load.cfg even if there are no device abstractions in use (LP: #1298399).

  [ Jon Severinsson ]
  * Add Tanglu support, as in Debian except:
    - Enable splash screen by default (as Ubuntu)
    - Enable quiet and quick boot (as Ubuntu)
    - Enable the grub-common init script (as Ubuntu)
    - Enable dynamic gfxpayload (as Ubuntu)
    - Enable vt handover (as Ubuntu)
    - Use monochromatic theme by default (as Ubuntu)
    - Use Tanglu GRUB wallpaper by default.

 -- Colin Watson <email address hidden> Mon, 31 Mar 2014 16:30:37 +0100

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

Duplicates of this bug

Other bug subscribers