A partição de inicialização está 100% cheia. Não consigo remover pacotes antigos para criar espaço [duplicado]

1

Estou tendo problemas com espaço livre na partição de inicialização e segui as instruções em várias outras perguntas, mas ainda não obtive bons resultados. Eu continuo tendo o mesmo erro quando tento remover pacotes antigos e outras coisas. Se alguém puder me ajudar, encontre minhas saídas publicadas:

ornendil@Galla:~$ ls /boot
abi-4.4.0-51-generic     config-4.4.0-66-generic      memtest86+.elf                       vmlinuz-4.4.0-57-generic
abi-4.4.0-53-generic     config-4.4.0-70-generic      memtest86+_multiboot.bin             vmlinuz-4.4.0-57-generic.efi.signed
abi-4.4.0-57-generic     efi                          System.map-4.4.0-51-generic          vmlinuz-4.4.0-59-generic
abi-4.4.0-59-generic     grub                         System.map-4.4.0-53-generic          vmlinuz-4.4.0-59-generic.efi.signed
abi-4.4.0-63-generic     initrd.img-4.4.0-51-generic  System.map-4.4.0-57-generic          vmlinuz-4.4.0-63-generic
abi-4.4.0-64-generic     initrd.img-4.4.0-53-generic  System.map-4.4.0-59-generic          vmlinuz-4.4.0-63-generic.efi.signed
abi-4.4.0-66-generic     initrd.img-4.4.0-57-generic  System.map-4.4.0-63-generic          vmlinuz-4.4.0-64-generic
abi-4.4.0-70-generic     initrd.img-4.4.0-59-generic  System.map-4.4.0-64-generic          vmlinuz-4.4.0-64-generic.efi.signed
config-4.4.0-51-generic  initrd.img-4.4.0-63-generic  System.map-4.4.0-66-generic          vmlinuz-4.4.0-66-generic
config-4.4.0-53-generic  initrd.img-4.4.0-64-generic  System.map-4.4.0-70-generic          vmlinuz-4.4.0-66-generic.efi.signed
config-4.4.0-57-generic  initrd.img-4.4.0-66-generic  vmlinuz-4.4.0-51-generic             vmlinuz-4.4.0-70-generic
config-4.4.0-59-generic  initrd.img-4.4.0-70-generic  vmlinuz-4.4.0-51-generic.efi.signed  vmlinuz-4.4.0-70-generic.efi.signed
config-4.4.0-63-generic  lost+found                   vmlinuz-4.4.0-53-generic
config-4.4.0-64-generic  memtest86+.bin               vmlinuz-4.4.0-53-generic.efi.signed
ornendil@Galla:~$ dpkg -l | grep linux-image
rc  linux-image-4.4.0-21-generic                4.4.0-21.37                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-28-generic                4.4.0-28.47                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-31-generic                4.4.0-31.50                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-36-generic                4.4.0-36.55                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-45-generic                4.4.0-45.66                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-47-generic                4.4.0-47.68                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-51-generic                4.4.0-51.72                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-53-generic                4.4.0-53.74                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-57-generic                4.4.0-57.78                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-59-generic                4.4.0-59.80                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-63-generic                4.4.0-63.84                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-64-generic                4.4.0-64.85                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-66-generic                4.4.0-66.87                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-70-generic                4.4.0-70.91                                   amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-21-generic          4.4.0-21.37                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-28-generic          4.4.0-28.47                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-31-generic          4.4.0-31.50                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-36-generic          4.4.0-36.55                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-47-generic          4.4.0-47.68                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-51-generic          4.4.0-51.72                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-53-generic          4.4.0-53.74                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-57-generic          4.4.0-57.78                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-59-generic          4.4.0-59.80                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-63-generic          4.4.0-63.84                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-64-generic          4.4.0-64.85                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-66-generic          4.4.0-66.87                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
iF  linux-image-extra-4.4.0-70-generic          4.4.0-70.91                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rH  linux-image-extra-4.4.0-72-generic          4.4.0-72.93                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
pH  linux-image-extra-4.4.0-75-generic          4.4.0-75.96                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
pU  linux-image-extra-4.4.0-77-generic          4.4.0-77.98                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
pU  linux-image-generic                         4.4.0.77.83                                   amd64        Generic Linux kernel image

ornendil@Galla:~$ sudo apt-get purge linux-image-4.4.0-28-generic
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-77-generic : Depends: linux-image-4.4.0-77-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-4.4.0-77-generic but it is not going to be installed
 linux-signed-image-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic (= 4.4.0-77.98) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

E isso acontece com todos os pacotes que eu tento remover. Eu estou no 4.4.0.70

ornendil@Galla:~$ uname -r
4.4.0-70-generic

Conforme solicitado:

ornendil@Galla:~$ sudo apt install -f
[sudo] password for ornendil: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-75 linux-headers-4.4.0-75-generic linux-image-4.4.0-75-generic linux-image-extra-4.4.0-75-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-4.4.0-72-generic linux-image-4.4.0-75-generic linux-image-4.4.0-77-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-72-generic linux-image-4.4.0-75-generic linux-image-4.4.0-77-generic
0 upgraded, 3 newly installed, 0 to remove and 107 not upgraded.
9 not fully installed or removed.
Need to get 0 B/137 MB of archives.
After this operation, 200 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 640358 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-77-generic_4.4.0-77.98_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-77-generic /boot/vmlinuz-4.4.0-77-generic
Done.
Unpacking linux-image-4.4.0-77-generic (4.4.0-77.98) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-77-generic_4.4.0-77.98_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.4.0-77-generic' to '/boot/vmlinuz-4.4.0-77-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 signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-77-generic /boot/vmlinuz-4.4.0-77-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-77-generic /boot/vmlinuz-4.4.0-77-generic
Preparing to unpack .../linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic
Done.
Unpacking linux-image-4.4.0-72-generic (4.4.0-72.93) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.4.0-72-generic' to '/boot/vmlinuz-4.4.0-72-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 signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic
Preparing to unpack .../linux-image-4.4.0-75-generic_4.4.0-75.96_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-75-generic /boot/vmlinuz-4.4.0-75-generic
Done.
Unpacking linux-image-4.4.0-75-generic (4.4.0-75.96) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-75-generic_4.4.0-75.96_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.4.0-75-generic' to '/boot/vmlinuz-4.4.0-75-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 signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-75-generic /boot/vmlinuz-4.4.0-75-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-75-generic /boot/vmlinuz-4.4.0-75-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.4.0-77-generic_4.4.0-77.98_amd64.deb
 /var/cache/apt/archives/linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb
 /var/cache/apt/archives/linux-image-4.4.0-75-generic_4.4.0-75.96_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ornendil@Galla:~$ sudo apt autoremove
[sudo] password for ornendil: 
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-72-generic : Depends: linux-image-4.4.0-72-generic but it is not installed
 linux-image-extra-4.4.0-75-generic : Depends: linux-image-4.4.0-75-generic but it is not installed
 linux-image-extra-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
 linux-image-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
 linux-signed-image-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic (= 4.4.0-77.98) but it is not installed
E: Unmet dependencies. Try using -f.
ornendil@Galla:~$ sudo apt update
Hit:1 http://cr.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://cr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                              
Get:3 http://cr.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]                                                                 
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]                                                         
Hit:5 http://archive.ubuntu.com/ubuntu xenial InRelease                           
Get:6 http://cr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [288 kB]
Get:7 http://cr.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [192 kB]           
Get:8 http://cr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [160 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [54,6 kB]
Get:10 http://cr.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [188 kB]              
Get:11 http://cr.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [2 516 B]         
Get:12 http://cr.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3 324 B]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [50,7 kB]                      
Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [32,2 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [36,9 kB]
Fetched 1 315 kB in 4s (279 kB/s)                                  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
107 packages can be upgraded. Run 'apt list --upgradable' to see them.
ornendil@Galla:~$ sudo apt autoremove
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-72-generic : Depends: linux-image-4.4.0-72-generic but it is not installed
 linux-image-extra-4.4.0-75-generic : Depends: linux-image-4.4.0-75-generic but it is not installed
 linux-image-extra-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
 linux-image-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
 linux-signed-image-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic (= 4.4.0-77.98) but it is not installed
E: Unmet dependencies. Try using -f.

e o fez:

ornendil@Galla:~$ sudo dpkg --remove linux-image-4.4.0-21-generic
dpkg: warning: ignoring request to remove linux-image-4.4.0-21-generic, only the config
 files of which are on the system; use --purge to remove them too
ornendil@Galla:~$ sudo dpkg --remove --purge linux-image-4.4.0-51-generic
dpkg: error: conflicting actions -P (--purge) and -r (--remove)

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
ornendil@Galla:~$ sudo dpkg --remove --force-remove-reinstreq linux-image-4.4.0-51-generic
dpkg: dependency problems prevent removal of linux-image-4.4.0-51-generic:
 linux-image-extra-4.4.0-51-generic depends on linux-image-4.4.0-51-generic.
 linux-signed-image-4.4.0-51-generic depends on linux-image-4.4.0-51-generic (= 4.4.0-51.72).

dpkg: error processing package linux-image-4.4.0-51-generic (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 linux-image-4.4.0-51-generic
ornendil@Galla:~$ sudo dpkg --configure -a
Setting up linux-image-extra-4.4.0-70-generic (4.4.0-70.91) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-70-generic /boot/vmlinuz-4.4.0-70-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-70-generic /boot/vmlinuz-4.4.0-70-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-70-generic

gzip: stdout: No space left on device
E: mkinitramfs failure find 141 cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-70-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-70-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-signed-image-generic:
 linux-signed-image-generic depends on linux-signed-image-4.4.0-77-generic; however:
  Package linux-signed-image-4.4.0-77-generic is not configured yet.
 linux-signed-image-generic depends on linux-image-extra-4.4.0-77-generic; however:
  Package linux-image-extra-4.4.0-77-generic is not configured yet.

dpkg: error processing package linux-signed-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 4.4.0.77.83); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic:
 linux-signed-generic depends on linux-signed-image-generic (= 4.4.0.77.83); however:
  Package linux-signed-image-generic is not configured yet.

dpkg: error processing package linux-signed-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-extra-4.4.0-70-generic
 linux-signed-image-generic
 linux-generic
 linux-signed-generic
ornendil@Galla:~$ sudo dpkg-reconfigure -a
Unknown option: a
Usage: dpkg-reconfigure [options] packages
  -u,  --unseen-only        Show only not yet seen questions.
       --default-priority   Use default priority instead of low.
       --force          Force reconfiguration of broken packages.
       --no-reload      Do not reload templates. (Use with caution.)
  -f,  --frontend       Specify debconf frontend to use.
  -p,  --priority       Specify minimum priority question to show.
       --terse          Enable terse mode.
    
por Ornendil 03.05.2017 / 22:06

3 respostas

3

A partição de inicialização está cheia das versões antigas do Linux. Eu tive o mesmo problema cerca de um mês atrás, porque eu estava com preguiça de autoremove.

sudo apt-get autoremove

Limpa tudo o que não é mais necessário, incluindo esses. Só depois de ter limpado algum espaço, vai funcionar para corrigir ou instalar outras coisas.

Depois de executar o comando acima, consegui fazer:

sudo apt-get install -f

E, finalmente, atualizar e atualizar com

sudo apt-get update
sudo apt-get upgrade
    
por Dave 04.05.2017 / 03:07
3

Dê ao gerenciador de pacotes alguma sala de trabalho zerando alguns arquivos antigos initrd ..., vmlinuz ... e System.map .... Assumindo que você está rodando em vmlinuz-4.4.0-70, mantenha todos os ... 70 arquivos e o kernel anterior, os ... 66 arquivos. Se ... 70 não é o kernel que você está executando, então mantenha o que você está executando também. Agora você pode usar um comando echo para zerar os arquivos que não deseja, por exemplo:

sudo echo >/boot/initrd.img-4.4.0-51-generic
sudo echo >/boot/vmlinuz-4.4.0-51-generic
sudo echo >/boot/vmlinuz-4.4.0-51-generic.efi.signed  
sudo echo >/boot/System.map-4.4.0-51-generic
sudo echo >/boot/abi-4.4.0-51-generic

etc.
Quando você tiver algum espaço, tente os comandos de remoção / remoção sugeridos anteriormente.

A simples remoção dos arquivos fará com que o gerenciador de pacotes entre em pânico e se recuse a fazer qualquer coisa, mas um arquivo de comprimento zero é aceitável, portanto, deve ser concluído. Parece que você acumulou uma fila inteira de coisas para instalar, elas podem recarregar o / boot. Esteja preparado para fazer mais zerar, se isso acontecer.

Se você deve excluir um arquivo que você queria por acidente, o pacote ainda deve estar por perto, e pode ser restaurado com outra instalação ou reconfiguração.

Os pacotes baixados são colocados no diretório / var / cache / apt / archives, então se o seu arquivo faltando tiver o pacote lá, tente

 sudo dpkg-reconfigure thepackage

Há várias outras sugestões acima para limpar, mas, na pior das hipóteses, talvez seja necessário criar os arquivos vazios necessários, limpar o pacote e instalá-lo novamente.

    
por ubfan1 06.05.2017 / 02:48
0

Eu tentaria a mesma desinstalação limpa com o aptitude ou então o dpkg (purge?), mas por que não excluir o arquivo, e depois os módulos correspondentes em / lib / modules. Talvez você precise mover alguns arquivos grandes para outro armazenamento temporariamente, para liberar espaço para executar o "apt-get -f install". Por que ter tantos kernels, por favor, apenas mantenha alguns marcos e os mais recentes.

    
por xubunuser 03.05.2017 / 22:22