kernel install failed /bin/cp: cannot stat ‘/boot/initrd.img-4.3.0-7-generic’: No such file or directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
Andy Whitcroft |
Bug Description
Hi, this failure for kernel package installation occured inside a maas image (lp:maas-images) build process.
The failure log ends like this:
Unpacking linux-generic (4.3.0.7.8) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up linux-image-
Running depmod.
update-initramfs: deferring update (hook will be called later)
/bin/cp: cannot stat '/boot/
Failed to copy /boot/initrd.
dpkg: error processing package linux-image-
subprocess installed post-installation script returned error exit status 2
Setting up devio (1.2-1build2) ...
Setting up linux-base (4.0ubuntu1) ...
Setting up flash-kernel (3.0~rc.4ubuntu57) ...
Setting up linux-firmware (1.155) ...
dpkg: dependency problems prevent configuration of linux-image-
linux-
Package linux-image-
dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Setting up linux-headers-
Setting up linux-headers-
Setting up linux-headers-
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 4.3.0.7.8); however:
Package linux-image-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
linux-
linux-
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
failed install of linux-generic
failed chroot and kernel install
failed
failed to get linux-generic output
Related bugs:
* bug 1539157: Images built with "link_in_boot = yes" in /etc/kernel-
* bug 1536810 kernel install failed /bin/cp: cannot stat ‘/boot/
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
description: | updated |
tags: | added: patch |
Changed in linux (Ubuntu): | |
status: | Confirmed → In Progress |
assignee: | nobody → Andy Whitcroft (apw) |
For full disclosure, this is in a "cross" build environment (qemu-static).
this works for other versions of ubuntu and has worked for xenial in the past.
the error messages seem to indicate 'update-initramfs' was deferred, but the the postinst tried to copy it into place even though it wasnt there. I am able to hack around this error by just touching the file /boot/initrd. img-4.3. 0-7-generic before runnign the apt-get install.
Setting up linux-image- 4.3.0-7- generic (4.3.0-7.18) ... initrd. img-4.3. 0-7-generic' : No such file or directory img-4.3. 0-7-generic to /boot/initrd.img at /var/lib/ dpkg/info/ linux-image- 4.3.0-7- generic. postinst line 745.
Running depmod.
update-initramfs: deferring update (hook will be called later)
/bin/cp: cannot stat '/boot/
Failed to copy /boot/initrd.