Versi lama dari kernel yang dihapus untuk membebaskan ruang - sekarang mendapatkan kesalahan tanpa henti

10

Saya /bootpartisi penuh, jadi saya dihapus versi lama kernel untuk membebaskan ruang, jadi saya menghapus file-file berikut di /boot:

abi-3.8.0-25-generic
config-3.8.0-25-generic
initrd.img-3.8.0-25-generic
System.map-3.8.0-25-generic
vmlinuz-3.8.0-25-generic

Tapi sekarang, setiap kali saya melakukan apa pun di apt-get, itu melempar kesalahan, misalnya:

sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-extra-3.8.0-25-generic (3.8.0-25.37) ...
Internal Error: Could not find image (/boot/vmlinuz-3.8.0-25-generic)
dpkg: error processing linux-image-extra-3.8.0-25-generic (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-extra-3.8.0-25-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Apakah ada cara saya dapat memperbaikinya sekarang karena saya dengan bodohnya tidak membuat cadangan file yang saya hapus?

$ dpkg -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                      Architecture                 Description
+++-===============================================-============================-============================-===================================================================================================
un  linux-image-3.0                                 <none>                                                    (no description available)
rc  linux-image-3.5.0-17-generic                    3.5.0-17.28                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
rc  linux-image-3.5.0-25-generic                    3.5.0-25.39                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
rc  linux-image-3.5.0-26-generic                    3.5.0-26.42                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
ii  linux-image-3.5.0-27-generic                    3.5.0-27.46                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
rc  linux-image-3.8.0-19-generic                    3.8.0-19.30                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-21-generic                    3.8.0-21.32                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-22-generic                    3.8.0-22.33                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-23-generic                    3.8.0-23.34                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-25-generic                    3.8.0-25.37                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-26-generic                    3.8.0-26.38                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-29-generic                    3.8.0-29.42                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-31-generic                    3.8.0-31.46                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-32-generic                    3.8.0-32.47                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
rc  linux-image-extra-3.5.0-17-generic              3.5.0-17.28                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
rc  linux-image-extra-3.5.0-25-generic              3.5.0-25.39                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
rc  linux-image-extra-3.5.0-26-generic              3.5.0-26.42                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
ii  linux-image-extra-3.5.0-27-generic              3.5.0-27.46                  amd64                        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
rc  linux-image-extra-3.8.0-19-generic              3.8.0-19.30                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-21-generic              3.8.0-21.32                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-22-generic              3.8.0-22.33                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-23-generic              3.8.0-23.34                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
iF  linux-image-extra-3.8.0-25-generic              3.8.0-25.37                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-26-generic              3.8.0-26.38                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-29-generic              3.8.0-29.42                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-31-generic              3.8.0-31.46                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-32-generic              3.8.0-32.47                  amd64                        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-generic                             3.8.0.32.50                  amd64                        Generic Linux kernel image


$ sudo apt-get --reinstall install linux-image-extra-3.8.0-25-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for linux-image-extra-3.8.0-25-generic:amd64
Alex
sumber
Apa output dari uname -a?
Braiam

Jawaban:

19

Manajer paket mengeluh karena tidak dapat menghapus file yang hilang. Jadi, berikan apa yang diinginkannya! Saya menemukan bahkan file panjang nol akan dilakukan. Di / boot, buat ulang file yang hilang:

sudo touch vmlinuz-3.8.0-25-generic

... dll. Kemudian jalankan purge pada semua paket terkait:

sudo apt-get purge `apt-cache pkgnames | fgrep 3.8.0-25`

(Anda akan diminta untuk mengkonfirmasi penghapusan).

ubfan1
sumber
2

Tolong, jangan hapus apa pun di /bootdirektori Anda dengan tangan! Untuk itu ada pengelola paket. Anda harus menginstal ulang paket untuk memperbaiki situasi ini:

sudo apt-get --reinstall install linux-image-extra-3.8.0-25-generic
Braiam
sumber
Terima kasih atas bantuannya, tetapi tidak berhasil: sudo apt-get - install ulang linux-image-extra-3.8.0-25-generic Daftar paket membaca ... Selesai membangun pohon ketergantungan informasi negara Membaca ... Selesai 0 ditingkatkan, 0 baru diinstal, 1 diinstal ulang, 0 untuk dihapus dan 13 tidak ditingkatkan. 1 tidak sepenuhnya diinstal atau dihapus. Setelah operasi ini, 0 B ruang disk tambahan akan digunakan. E: Kesalahan Internal, Tidak ada nama file untuk linux-image-extra-3.8.0-25-generic: amd64
Alex
Terima kasih atas bantuannya, jalankan pembaruan dan tempelkan output dari kedua perintah ke pertanyaan.
Alex