[Bug 1636922] Re: update-initramfs fails when cp encounters empty directory
Launchpad Bug Tracker
1636922 at bugs.launchpad.net
Sat Apr 22 02:44:23 UTC 2017
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: initramfs-tools (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1636922
Title:
update-initramfs fails when cp encounters empty directory
Status in initramfs-tools package in Ubuntu:
Confirmed
Bug description:
I recently upgraded to UbuntuServer 16.04 but encountered the
following problem:
dpkg --configure linux-image-4.4.0-45-generic
Setting up linux-image-4.4.0-45-generic (4.4.0-45.66) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-45-generic
vmlinuz(/boot/vmlinuz-4.4.0-45-generic
) points to /boot/vmlinuz-4.4.0-45-generic
(/boot/vmlinuz-4.4.0-45-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-45-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-45-generic /boot/vmlinuz-4.4.0-45-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-45-generic /boot/vmlinuz-4.4.0-45-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-45-generic
cp: omitting directory '/etc/udev/rules.d/70-persistent-net.rules'
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-45-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-45-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-45-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
linux-image-4.4.0-45-generic
With a bit of digging I determined the issue was with this line (after
initially disregarding it):
cp: omitting directory '/etc/udev/rules.d/70-persistent-net.rules'
The path specified turned out to be an empty directory, hence why cp
omitted it, so I simply deleted it and tried again, this time
successfully.
It seems that update-initramfs, or some other component of it, is
treating a cp omission as a failure and erroring out, rather than
continuing, while looking into the problem I found a few variations of
the problem (directories other than udev) so it seems like this
behaviour could do with being changed to prevent this issue in future.
Version information:
lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04
initramfs-tools:
Installed: 0.122ubuntu8.5
Candidate: 0.122ubuntu8.5
Version table:
*** 0.122ubuntu8.5 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
100 /var/lib/dpkg/status
0.122ubuntu8 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1636922/+subscriptions
More information about the foundations-bugs
mailing list