Eu purgei o kernel atual! [duplicado]

1

Ajuda - Eu depurei o Kernel atual (linux-image-2.6.32-43-server) e não posso reinstalar porque o setor de inicialização está cheio. Como posso limpar o setor de inicialização para reinstalar o kernel?

$ ls /boot
abi-2.6.32-44-server         initrd.img-3.2.0-39-generic
abi-3.2.0-34-generic         initrd.img-3.2.0-40-generic
abi-3.2.0-35-generic         initrd.img-3.2.0-41-generic
abi-3.2.0-36-generic         lost+found
abi-3.2.0-37-generic         memtest86+.bin
abi-3.2.0-38-generic         memtest86+_multiboot.bin
abi-3.2.0-39-generic         System.map-2.6.32-44-server
abi-3.2.0-40-generic         System.map-3.2.0-34-generic
abi-3.2.0-41-generic         System.map-3.2.0-35-generic
config-2.6.32-44-server      System.map-3.2.0-36-generic
config-3.2.0-34-generic      System.map-3.2.0-37-generic
config-3.2.0-35-generic      System.map-3.2.0-38-generic
config-3.2.0-36-generic      System.map-3.2.0-39-generic
config-3.2.0-37-generic      System.map-3.2.0-40-generic
config-3.2.0-38-generic      System.map-3.2.0-41-generic
config-3.2.0-39-generic      vmcoreinfo-2.6.32-44-server
config-3.2.0-40-generic      vmlinuz-2.6.32-44-server
config-3.2.0-41-generic      vmlinuz-3.2.0-34-generic
grub                         vmlinuz-3.2.0-35-generic
initrd.img-2.6.32-44-server  vmlinuz-3.2.0-36-generic
initrd.img-3.2.0-34-generic  vmlinuz-3.2.0-37-generic
initrd.img-3.2.0-35-generic  vmlinuz-3.2.0-38-generic
initrd.img-3.2.0-36-generic  vmlinuz-3.2.0-39-generic
initrd.img-3.2.0-37-generic  vmlinuz-3.2.0-40-generic
initrd.img-3.2.0-38-generic  vmlinuz-3.2.0-41-generic


$ sudo apt-get purge linux-image-3.2.0-3*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-3.2.0-38-lowlatency' for regex 'linux-image-3.2.0-3*'
Note, selecting 'linux-image-3.2.0-1615-armadaxp' for regex 'linux-image-3.2.0-3*'
[...CUT...]

    Package linux-image-3.2.0-39-lowlatency is not installed, so not removed
    Package linux-image-3.2.0-40-lowlatency is not installed, so not removed
    Package linux-image-3.2.0-41-lowlatency is not installed, so not removed
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies.
    linux-image-server : Depends: linux-image-3.2.0-43-generic but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

SAÍDA DE DPKG

$ dpkg-query -l linux-image*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
un  linux-image    <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
un  linux-image-2. <none>         (no description available)
rc  linux-image-2. 2.6.32-34.77   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-35.78   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-36.79   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-37.81   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-38.83   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-39.86   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-40.87   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-41.91   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-42.96   Linux kernel image for version 2.6.32 on x86
rc  linux-image-2. 2.6.32-43.97   Linux kernel image for version 2.6.32 on x86
ii  linux-image-2. 2.6.32-44.98   Linux kernel image for version 2.6.32 on x86
un  linux-image-3. <none>         (no description available)
ii  linux-image-3. 3.2.0-34.53    Linux kernel image for version 3.2.0 on 64 b
ii  linux-image-3. 3.2.0-35.55    Linux kernel image for version 3.2.0 on 64 b
ii  linux-image-3. 3.2.0-36.57    Linux kernel image for version 3.2.0 on 64 b
ii  linux-image-3. 3.2.0-37.58    Linux kernel image for version 3.2.0 on 64 b
ii  linux-image-3. 3.2.0-38.61    Linux kernel image for version 3.2.0 on 64 b
ii  linux-image-3. 3.2.0-39.62    Linux kernel image for version 3.2.0 on 64 b
ii  linux-image-3. 3.2.0-40.64    Linux kernel image for version 3.2.0 on 64 b
ii  linux-image-3. 3.2.0-41.66    Linux kernel image for version 3.2.0 on 64 b
in  linux-image-3. <none>         (no description available)
iU  linux-image-se 3.2.0.43.51    Linux kernel image on Server Equipment.
    
por Hercule 17.05.2013 / 10:53

1 resposta

3

Acabei de ter o mesmo problema. A única coisa que ajudou foi remover manualmente arquivos suficientes em / boot usando

cd /boot
rm initrd.img-3.2.0-24-generic-pae initrd.img-3.2.0-29-generic-pae

para

apt-get -f install

para poder completar normalmente. Então use

 dpkg --list|grep linux-image

para identificar imagens linux e remover o suficiente das antiguidades com, por exemplo,

apt-get purge linux-image-3.2.0-24-generic-pae linux-image-3.2.0-29-generic-pae ...

Finalmente, pode haver algum espaço extra para recuperar com

apt-get autoclean
apt-get autoremove

(eu deduzi o acima de outras respostas - isso foi trabalhado para mim)

Eu acredito que eu vi que o Ubuntu agora tem algumas funcionalidades de "limpar velhos kernels", mas aparentemente ele não entrou aqui.

    
por Thorbjørn Ravn Andersen 17.05.2013 / 12:35