我昨天运行了 apt-get upgrade 来更新我的内核(ubuntu 15.04),但 /boot 内存不足(通常如果空间不足就会阻止升级任务运行)
我意外删除了活动内核,导致我按照以下步骤操作 -意外删除所有内核后如何恢复系统?
我被困在第 13 步,因为之前的内存错误阻止我安装当前内核或升级剩余内核。
升级引发以下错误
root@ubuntu:/# apt-get -y upgrade linux-image-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... linux-image-generic is already the newest version.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-3.19.0-31-generic (3.19.0-31.36) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Failed to symbolic-link boot/initrd.img-3.19.0-31-generic to initrd.img:File exists at /var/lib/dpkg/info/linux-image-3.19.0-31-generic.postinst line 629.
dpkg: error processing package linux-image-3.19.0-31-generic (--configure):
subprocess installed post-installation script returned error exit status 17
dpkg: dependency problems prevent configuration of linux-image-extra-3.19.0-31-generic:
linux-image-extra-3.19.0-31-generic depends on linux-image-3.19.0-31-generic; however:
Package linux-image-3.19.0-31-generic is not configured yet.
dpkg: error processing package linux-image-extra-3.19.0-31-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image-3.19.0-31-generic:
linux-signed-image-3.19.0-31-generic depends on linux-image-3.19.0-31-generic (= 3.19.0-31.36); however:
Package linux-image-3.19.0-31-generic is not configured yet.
linux-signed-image-3.19.0-31-generic depends on linux-image-extra-3.19.0-31-generic (= 3.19.0-31.36); however:
Package linux-image-extra-3.19.0-31-generic is not configured yet.
dpkg: error processing package linux-signed-image-3.19.0-31-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-image-3.19.0-31-generic
linux-image-extra-3.19.0-31-generic
linux-signed-image-3.19.0-31-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
我也尝试过清除并重新安装,但由于同样的错误,没有成功
root@ubuntu:/# sudo apt-get purge Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up linux-image-3.19.0-31-generic (3.19.0-31.36) ... Running depmod. update-initramfs: deferring update (hook will be called later) Failed to symbolic-link boot/initrd.img-3.19.0-31-generic to initrd.img:File exists at /var/lib/dpkg/info/linux-image-3.19.0-31-generic.postinst line 629. dpkg: error processing package linux-image-3.19.0-31-generic (--configure): subprocess installed post-installation script returned error exit status 17 dpkg: dependency problems prevent configuration of linux-image-extra-3.19.0-31-generic: linux-image-extra-3.19.0-31-generic depends on linux-image-3.19.0-31-generic; however: Package linux-image-3.19.0-31-generic is not configured yet.
dpkg: error processing package linux-image-extra-3.19.0-31-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-signed-image-3.19.0-31-generic: linux-signed-image-3.19.0-31-generic depends on linux-image-3.19.0-31-generic (= 3.19.0-31.36); however: Package linux-image-3.19.0-31-generic is not configured yet. linux-signed-image-3.19.0-31-generic depends on linux-image-extra-3.19.0-31-generic (= 3.19.0-31.36); however: Package linux-image-extra-3.19.0-31-generic is not configured yet.
dpkg: error processing package linux-signed-image-3.19.0-31-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-image-3.19.0-31-generic linux-image-extra-3.19.0-31-generic linux-signed-image-3.19.0-31-generic E: Sub-process /usr/bin/dpkg returned an error code (1)
我认为这值得单独提出一个问题,因为这是一个 dpkg 问题,而不是与上述问题直接相关的问题
答案1
不知道还能做什么,我只是删除了包
sudo apt-get remove linux-image-extra-3.19.0-31-generic
并重新安装
apt-get -y upgrade linux-image-generic
似乎成功了