Então, estou usando o linux Ubuntu 16.04.1 LTS e, por um tempo, meu / boot teve 0 espaço.
Eu estou tentando instalar alguns pacotes usando o apt-get, mas continuo recebendo problemas de dependência que essencialmente apontam para nenhum espaço em / boot. Quando eu vou arrancar e tentar limpar, recebo o mesmo erro dizendo o mesmo problema de dependência -
deepak@deepak-Inspiron-7520:/boot$ sudo apt-get purge linux-image-4.4.0-{72-gene,75-gene,78-gene,83-gene,87-gene,92-gene,93-gen
e,96-gene}
[sudo] password for deepak:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-4.4.0-72-generic' for regex 'linux-image-4.4.0-72-gene'
Note, selecting 'linux-image-4.4.0-75-generic' for regex 'linux-image-4.4.0-75-gene'
Note, selecting 'linux-image-4.4.0-78-generic' for regex 'linux-image-4.4.0-78-gene'
Note, selecting 'linux-image-4.4.0-83-generic' for regex 'linux-image-4.4.0-83-gene'
Note, selecting 'linux-image-4.4.0-87-generic' for regex 'linux-image-4.4.0-87-gene'
Note, selecting 'linux-image-4.4.0-92-generic' for regex 'linux-image-4.4.0-92-gene'
Note, selecting 'linux-image-4.4.0-93-generic' for regex 'linux-image-4.4.0-93-gene'
Note, selecting 'linux-image-4.4.0-96-generic' for regex 'linux-image-4.4.0-96-gene'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-4.4.0-103-generic : Depends: linux-image-4.4.0-103-generic but it is not going to be installed
linux-image-extra-4.4.0-72-generic : Depends: linux-image-4.4.0-72-generic but it is not going to be installed
linux-image-extra-4.4.0-75-generic : Depends: linux-image-4.4.0-75-generic but it is not going to be installed
linux-image-extra-4.4.0-78-generic : Depends: linux-image-4.4.0-78-generic but it is not going to be installed
linux-image-extra-4.4.0-83-generic : Depends: linux-image-4.4.0-83-generic but it is not going to be installed
linux-image-extra-4.4.0-87-generic : Depends: linux-image-4.4.0-87-generic but it is not going to be installed
linux-image-extra-4.4.0-92-generic : Depends: linux-image-4.4.0-92-generic but it is not going to be installed
linux-image-extra-4.4.0-93-generic : Depends: linux-image-4.4.0-93-generic but it is not going to be installed
linux-image-extra-4.4.0-96-generic : Depends: linux-image-4.4.0-96-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-103-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
-
deepak@deepak-Inspiron-7520:/boot$ sudo apt-get purge linux-headers-4.4.0-{101,101-g,72,72-ge,75,75-ge,78,78-ge,83,83-ge,87,87-
ge,92,92-ge,93,93-ge,96,96-ge,98,98-ge}
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-headers-4.4.0-101-generic' for regex 'linux-headers-4.4.0-101-g'
Note, selecting 'linux-headers-4.4.0-72-generic' for regex 'linux-headers-4.4.0-72-ge'
Note, selecting 'linux-headers-4.4.0-75-generic' for regex 'linux-headers-4.4.0-75-ge'
Note, selecting 'linux-headers-4.4.0-78-generic' for regex 'linux-headers-4.4.0-78-ge'
Note, selecting 'linux-headers-4.4.0-83-generic' for regex 'linux-headers-4.4.0-83-ge'
Note, selecting 'linux-headers-4.4.0-87-generic' for regex 'linux-headers-4.4.0-87-ge'
Note, selecting 'linux-headers-4.4.0-92-generic' for regex 'linux-headers-4.4.0-92-ge'
Note, selecting 'linux-headers-4.4.0-93-generic' for regex 'linux-headers-4.4.0-93-ge'
Note, selecting 'linux-headers-4.4.0-96-generic' for regex 'linux-headers-4.4.0-96-ge'
Note, selecting 'linux-headers-4.4.0-98-generic' for regex 'linux-headers-4.4.0-98-ge'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-4.4.0-103-generic : Depends: linux-image-4.4.0-103-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-103-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
-
deepak@deepak-Inspiron-7520:/boot$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-4.4.0-103-generic
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following NEW packages will be installed:
linux-image-4.4.0-103-generic
0 upgraded, 1 newly installed, 0 to remove and 334 not upgraded.
14 not fully installed or removed.
Need to get 0 B/21.9 MB of archives.
After this operation, 66.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 572401 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-103-generic_4.4.0-103.126_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-103-generic /boot/vmlinuz-4.4.0-103-generic
Done.
Unpacking linux-image-4.4.0-103-generic (4.4.0-103.126) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-103-generic_4.4.0-103.126_amd64.deb (--unpack):
cannot copy extracted data for './boot/System.map-4.4.0-103-generic' to '/boot/System.map-4.4.0-103-generic.dpkg-new': failed
to write (No space left on device)
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by s
ignal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-103-generic /boot/vmlinuz-4.4.0-103-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-103-generic /boot/vmlinuz-4.4.0-103-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.4.0-103-generic_4.4.0-103.126_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Estou assumindo que estas são as imagens que preciso remover -
deepak@deepak-Inspiron-7520:/boot$ kernelver=$(uname -r | sed -r 's/-[a-z]+//')
deepak@deepak-Inspiron-7520:/boot$ dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve $kernelver
linux-headers-4.4.0-101
linux-headers-4.4.0-101-g
linux-headers-4.4.0-72
linux-headers-4.4.0-72-ge
linux-headers-4.4.0-75
linux-headers-4.4.0-75-ge
linux-headers-4.4.0-78
linux-headers-4.4.0-78-ge
linux-headers-4.4.0-83
linux-headers-4.4.0-83-ge
linux-headers-4.4.0-87
linux-headers-4.4.0-87-ge
linux-headers-4.4.0-92
linux-headers-4.4.0-92-ge
linux-headers-4.4.0-93
linux-headers-4.4.0-93-ge
linux-headers-4.4.0-96
linux-headers-4.4.0-96-ge
linux-headers-4.4.0-98
linux-headers-4.4.0-98-ge
linux-image-4.4.0-72-gene
linux-image-4.4.0-75-gene
linux-image-4.4.0-78-gene
linux-image-4.4.0-83-gene
linux-image-4.4.0-87-gene
linux-image-4.4.0-92-gene
linux-image-4.4.0-93-gene
linux-image-4.4.0-96-gene
- conteúdo do meu / boot:
deepak@deepak-Inspiron-7520:/boot$ ls
abi-4.4.0-101-generic config-4.4.0-83-generic initrd.img-4.4.0-96-generic System.map-4.4.0-97-generic
abi-4.4.0-72-generic config-4.4.0-87-generic initrd.img-4.4.0-97-generic System.map-4.4.0-98-generic
abi-4.4.0-75-generic config-4.4.0-92-generic lost+found vmlinuz-4.4.0-101-generic
abi-4.4.0-78-generic config-4.4.0-93-generic memtest86+.bin vmlinuz-4.4.0-72-generic
abi-4.4.0-83-generic config-4.4.0-96-generic memtest86+.elf vmlinuz-4.4.0-75-generic
abi-4.4.0-87-generic config-4.4.0-97-generic memtest86+_multiboot.bin vmlinuz-4.4.0-78-generic
abi-4.4.0-92-generic config-4.4.0-98-generic System.map-4.4.0-101-generic vmlinuz-4.4.0-83-generic
abi-4.4.0-93-generic grub System.map-4.4.0-72-generic vmlinuz-4.4.0-87-generic
abi-4.4.0-96-generic initrd.img-4.4.0-72-generic System.map-4.4.0-75-generic vmlinuz-4.4.0-92-generic
abi-4.4.0-97-generic initrd.img-4.4.0-75-generic System.map-4.4.0-78-generic vmlinuz-4.4.0-93-generic
abi-4.4.0-98-generic initrd.img-4.4.0-78-generic System.map-4.4.0-83-generic vmlinuz-4.4.0-96-generic
config-4.4.0-101-generic initrd.img-4.4.0-83-generic System.map-4.4.0-87-generic vmlinuz-4.4.0-97-generic
config-4.4.0-72-generic initrd.img-4.4.0-87-generic System.map-4.4.0-92-generic vmlinuz-4.4.0-98-generic
config-4.4.0-75-generic initrd.img-4.4.0-92-generic System.map-4.4.0-93-generic
config-4.4.0-78-generic initrd.img-4.4.0-93-generic System.map-4.4.0-96-generic
- autoremove também leva ao mesmo erro:
deepak@deepak-Inspiron-7520:/boot$ sudo apt-get autoremove
[sudo] password for deepak:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-image-extra-4.4.0-103-generic : Depends: linux-image-4.4.0-103-generic but it is not installed
linux-image-generic : Depends: linux-image-4.4.0-103-generic but it is not installed
E: Unmet dependencies. Try using -f.