无法使用initramfs更新Ubuntu 16.04问题

当我尝试:

sudo apt dist-upgrade

我收到以下错误:

 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) 

对不起,以恢复旧的问题,但我偶然发现,试图解决这个问题,没有find明确的答案。

下面修复它在我的构build:

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

这将删除该文件夹,并创build一个文件,而不是像initramfs所期望的那样
删除之前,您可能需要检查文件夹是否为空。