2

When i try:

sudo apt dist-upgrade

I am getting following errors:

vagrant@ubuntu-16:~$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.122ubuntu8.1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.1) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-21-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-21-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Alexander Kim
  • 597
  • 3
  • 8
  • 21

1 Answers1

4

Sorry to revive an old question but I stumbled upon it trying to fix this without finding a clear answer.

The following fixed it in my build:

rm -rf /etc/udev/rules.d/70-persistent-net.rules
touch /etc/udev/rules.d/70-persistent-net.rules

This will delete the folder and create a file instead as initramfs expects
You might want to check if the folder is empty before removing it.

Mikael Kjær
  • 141
  • 4