element grub2 worked with centos7, but not ubuntu.

Bug #1470400 reported by Naohiro Tamura on 2015-07-01
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

$ pip list | grep diskimage
diskimage-builder (0.1.47)

grub2 element works with centos7
$ disk-image-create centos7 baremetal dhcp-all-interfaces grub2 -o my-image
$ ls
my-image.d my-image.initrd my-image.qcow2 my-image.vmlinuz

However, grug2 element doesn't work with ubuntu
$ disk-image-create ubuntu baremetal dhcp-all-interfaces grub2 -o my-image
Building elements: base ubuntu baremetal dhcp-all-interfaces grub2
Expanded element dependencies to: install-types dib-run-parts dib-init-system baremetal grub2 cache-url pkg-map base ubuntu cloud-init-datasources manifests dhcp-all-interf
aces package-installs dpkg dkms
Building in /tmp/image.T51Jjqdi
dib-run-parts Wed Jul 1 17:20:09 JST 2015 Running /tmp/image.T51Jjqdi/hooks/root.d/01-ccache
dib-run-parts Wed Jul 1 17:20:09 JST 2015 01-ccache completed
dib-run-parts Wed Jul 1 17:20:09 JST 2015 Running /tmp/image.T51Jjqdi/hooks/root.d/10-cache-ubuntu-tarball
+ set -eu
+ set -o pipefail
+ '[' -n amd64 ']'
+ '[' -n /tmp/image.T51Jjqdi/mnt ']'
+ shopt -s extglob
+ DIB_CLOUD_IMAGES=http://cloud-images.ubuntu.com
+ DIB_RELEASE=trusty
+ BASE_IMAGE_FILE=trusty-server-cloudimg-amd64-root.tar.gz
+ SHA256SUMS=https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS
+ CACHED_FILE=/home/naohirot/.cache/image-create/trusty-server-cloudimg-amd64-root.tar.gz
--- snipped
Setting up ccache (3.1.9-1) ...
Updating symlinks in /usr/lib/ccache ...
Setting up wireless-regdb (2013.02.13-1ubuntu1) ...
Setting up crda (1.1.2-1ubuntu2) ...
Setting up efibootmgr (0.5.4-7ubuntu1.1) ...
Setting up grub-common (2.02~beta2-9ubuntu1.2) ...
Setting up linux-firmware (1.127.12) ...
Setting up linux-image-extra-3.13.0-55-generic (3.13.0-55.94) ...
Setting up linux-image-generic ( ...
Setting up shim (0.4-0ubuntu4) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up grub-efi-amd64-bin (2.02~beta2-9ubuntu1.2) ...
Setting up grub-pc-bin (2.02~beta2-9ubuntu1.2) ...
Setting up grub2-common (2.02~beta2-9ubuntu1.2) ...
Setting up grub-efi-amd64 (2.02~beta2-9ubuntu1.2) ...
Setting up shim-signed (1.6+0.4-0ubuntu4) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...

(no error code, always stopped at "Processing triggers for libc-bin (2.19-0ubuntu6.6) ...)

$ ls

description: updated
description: updated
Ben Nemec (bnemec) on 2015-08-10
Changed in diskimage-builder:
status: New → Triaged
importance: Undecided → Medium
Cameron.C (cameron-c) wrote :

This is the error message


Creating config file /etc/default/grub with new version
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
dpkg: error processing package grub-efi-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of grub-efi-amd64-signed:
 grub-efi-amd64-signed depends on grub-efi-amd64 (= 2.02~beta2-9ubuntu1.3); however:
  Package grub-efi-amd64 is not configured yet.

dpkg: error processing package grub-efi-amd64-signed (--configure):
 dependency problems - leaving unconfigured
/bin/df: cannot read table of mounted file systems: No such file or directory
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
install failed with error Reading package lists...


I think this bug is duplicated with https://bugs.launchpad.net/diskimage-builder/+bug/1491280.

There's a patch addressing the problem in #1491280, can you confirm if that works for you please?

Naohiro Tamura (naohirot) wrote :

I'll try the patch if the bug #1491280 is fixed, thanks!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers