failed to configure linux-firmware in minimal cloud image based vm in cloud-init: Can't open /etc/initramfs-tools/initramfs.conf

Bug #1839236 reported by You-Sheng Yang on 2019-08-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-firmware (Ubuntu)

Bug Description

When running a patched `autopkgtest-buildvm-ubuntu-cloud` that enables constructing autopkgtest vm with minial cloud images [1], it fails to install linux-firmware at postinst stage because /etc/initramfs-tools/initramfs.conf from package initramfs-tools-core may not have been installed:
cloud-init[528]: Setting up linux-firmware (1.173.9) ...
cloud-init[528]: update-initramfs: Generating /boot/initrd.img-4.15.0-1039-kvm
cloud-init[528]: /usr/sbin/mkinitramfs: 66: .: Can't open /etc/initramfs-tools/initramfs.conf
cloud-init[528]: update-initramfs: failed for /boot/initrd.img-4.15.0-1039-kvm with 2.
cloud-init[528]: dpkg: error processing package linux-firmware (--configure):
cloud-init[528]: installed linux-firmware package post-installation script subprocess returned error exit status 2

See for full log.


tags: added: patch
Seth Forshee (sforshee) wrote :

How does this situation come about? linux-firmware postinst invokes /usr/sbin/update-initramfs if it exists, i.e. initramfs-tools is installed. This depends on initramfs-tools-core, which should supply the missing file. However it happens, I don't think the issue lies in linux-firmware.

You-Sheng Yang (vicamo) wrote :

From the full log, the original minimal cloud image doesn't have initramfs-* packages installed in the first place. So when it's configuring linux-firmware, all those tools are in unpacked state except initramfs-tools-bin has been full setup then. So this happened in some intermediate state that initramfs-tools is not fully configured yet, and maybe some other dependencies, checks should be added in either initramfs-tools or linux-firmeware.

You-Sheng Yang (vicamo) wrote :

From linux-firmware postinst script it has:

  5 if [ -x /usr/sbin/update-initramfs ]; then
  6 /usr/sbin/update-initramfs -u -k all
  7 fi

and since this is optional, there is no dependency to initramfs-tools-bin declared. I think we can test if the initramfs-tools package has completed installation instead: `dpkg-query --show -f '${Status}' initramfs-tools`.

Changed in linux-firmware (Ubuntu Bionic):
importance: Undecided → Low
Changed in linux-firmware (Ubuntu Disco):
importance: Undecided → Low
You-Sheng Yang (vicamo) wrote :

Should be low as one can always issue another dpkg-reconfigure later to easily fix this situation.

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

Other bug subscribers