I am using Ubuntu 14.04. When I run sudo apt-get autoremove
, it generated the following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-extra-4.4.0-34-generic (4.4.0-34.53~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-34-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-34-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-34-generic (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic-lts-xenial:
linux-image-generic-lts-xenial depends on linux-image-extra-4.4.0-34-generic; however:
Package linux-image-extra-4.4.0-34-generic is not configured yet.
dpkg: error processing package linux-image-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-xenial:
linux-generic-lts-xenial depends on linux-image-generic-lts-xenial (= 4.4.0.34.24); however:
Package linux-image-generic-lts-xenial is not configured yet.
dpkg: error processing package linux-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image-generic-lts-xenial:
linux-signed-image-generic-lts-xenial depends on linux-image-extra-4.4.0-34-generic; however:
Package linux-image-extra-4.4.0-34-generic is not configured yet.
dpkg: error processing package linux-signeNo 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.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
d-image-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic-lts-xenial:
linux-signed-generic-lts-xenial depends on linux-signed-image-generic-lts-xenial (= 4.4.0.34.24); however:
Package linux-signed-image-generic-lts-xenial is not configured yet.
dpkg: error processing package linux-signed-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-extra-4.4.0-34-generic
linux-image-generic-lts-xenial
linux-generic-lts-xenial
linux-signed-image-generic-lts-xenial
linux-signed-generic-lts-xenial
E: Sub-process /usr/bin/dpkg returned an error code (1)
Also, there is a warning saying “The volume boot has only 0 bytes disk space remaining”. I was trying the answers from here. Then I got
linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic
linux-image-3.19.0-64-generic
linux-image-3.19.0-65-generic
linux-image-3.19.0-66-generic
linux-image-4.4.0-34-generic
I am not sure if it will be safe to remove all linux-image-3.19.0-xx-generic kernels. Should I keep some? Thanks.
Edit:
output of blkid -o list
:
device fs_type label mount point UUID
-------------------------------------------------------------------------------
/dev/ram0 (not mounted)
/dev/ram1 (not mounted)
/dev/ram2 (not mounted)
/dev/ram3 (not mounted)
/dev/ram4 (not mounted)
/dev/ram5 (not mounted)
/dev/ram6 (not mounted)
/dev/ram7 (not mounted)
/dev/ram8 (not mounted)
/dev/ram9 (not mounted)
/dev/ram10 (not mounted)
/dev/ram11 (not mounted)
/dev/ram12 (not mounted)
/dev/ram13 (not mounted)
/dev/ram14 (not mounted)
/dev/ram15 (not mounted)
/dev/sda1 (not mounted)
/dev/sdb1 /boot/efi
/dev/sdb2 /boot
/dev/sdb3 (not mounted)
/dev/mapper/ubuntu--vg-root
/
/dev/mapper/ubuntu--vg-swap_1
<swap>
Even if you try to remove some kernels, you will get those errors, because it still needs a small portion of storage in /boot
to clear kernels.
My suggestion is creating an Ubuntu Live USB, booting from it and move 1 or 2 kernel image to another location. Make sure you don't remove those which you will boot. I suggest keeping linux-image-3.19.0-66-generic
kernel.
After making some room, boot to regular Ubuntu, and remove other kernels you didn't moved manually. This way you will get some room cleanly. Then again boot using USB and put those moved kernel files in their location.
Now, again boot to regular Ubuntu and remove unnecessary kernels, keeping only one. You should be to do so without any warning.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加