Раздел начальной загрузки продолжает заполнение старыми inird.img файлами

Вот содержание /boot:

drwxr-xr-x  5 root root     3072 Apr 18 09:10 .
drwxr-xr-x 26 root root     4096 Mar 22 15:43 ..
-rw-r--r--  1 root root   217495 Jan 17 05:59 config-4.15.0-76-generic
-rw-r--r--  1 root root   217457 Feb 28 02:45 config-4.15.0-91-generic
drwxr-xr-x  3 root root     4096 Dec 31  1969 efi
drwxr-xr-x  5 root root     1024 Mar 22 15:50 grub
-rw-r--r--  1 root root 60196828 Apr 18 09:05 initrd.img-4.15.0-76-generic
-rw-r--r--  1 root root 60206115 Apr 18 09:05 initrd.img-4.15.0-91-generic
drwx------  2 root root    12288 Feb 13  2016 lost+found
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-------  1 root root  4068355 Jan 17 05:59 System.map-4.15.0-76-generic
-rw-------  1 root root  8367768 Jan 17 06:27 vmlinuz-4.15.0-76-generic
-rw-------  1 root root  8375960 Feb 28 02:51 vmlinuz-4.15.0-91-generic

Моя версия ядра 4.15.0-91-generic (на основе uname -r).

Вывод dpkg --list | grep linux-image :

c  linux-image-4.15.0-74-generic                               4.15.0-74.84                                     amd64        Signed kernel image generic
ii  linux-image-4.15.0-76-generic                               4.15.0-76.86                                     amd64        Signed kernel image generic
ii  linux-image-4.15.0-91-generic                               4.15.0-91.92                                     amd64        Signed kernel image generic
ic  linux-image-4.4.0-171-generic                               4.4.0-171.200                                    amd64        Signed kernel image generic

Это - то, что происходит, когда я работаю sudo apt-get upgrade:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  thermald
Use 'sudo apt autoremove' to remove it.
The following packages have been kept back:
  linux-headers-generic
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-firmware (1.173.17) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-91-generic
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory
update-initramfs: Generating /boot/initrd.img-4.15.0-76-generic
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.19.0-69-generic
WARNING: missing /lib/modules/3.19.0-69-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.19.0-69-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_BapeFK/lib/modules/3.19.0-69-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_BapeFK/lib/modules/3.19.0-69-generic/modules.builtin: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.19.0-66-generic
WARNING: missing /lib/modules/3.19.0-66-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.19.0-66-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_oFrhwW/lib/modules/3.19.0-66-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_oFrhwW/lib/modules/3.19.0-66-generic/modules.builtin: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.19.0-65-generic
WARNING: missing /lib/modules/3.19.0-65-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.19.0-65-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_cmnh3Q/lib/modules/3.19.0-65-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_cmnh3Q/lib/modules/3.19.0-65-generic/modules.builtin: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.19.0-59-generic
WARNING: missing /lib/modules/3.19.0-59-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.19.0-59-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_kimz35/lib/modules/3.19.0-59-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_kimz35/lib/modules/3.19.0-59-generic/modules.builtin: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.19.0-58-generic
WARNING: missing /lib/modules/3.19.0-58-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.19.0-58-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_yH46Fl/lib/modules/3.19.0-58-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_yH46Fl/lib/modules/3.19.0-58-generic/modules.builtin: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.19.0-25-generic
WARNING: missing /lib/modules/3.19.0-25-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.19.0-25-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_gmb7aZ/lib/modules/3.19.0-25-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_gmb7aZ/lib/modules/3.19.0-25-generic/modules.builtin: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf: No such file or directory

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.19.0-25-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)

Теперь, контент начальной загрузки/:

drwxr-xr-x  5 root root     3072 Apr 18 09:14 .
drwxr-xr-x 26 root root     4096 Mar 22 15:43 ..
-rw-r--r--  1 root root   217495 Jan 17 05:59 config-4.15.0-76-generic
-rw-r--r--  1 root root   217457 Feb 28 02:45 config-4.15.0-91-generic
drwxr-xr-x  3 root root     4096 Dec 31  1969 efi
drwxr-xr-x  5 root root     1024 Mar 22 15:50 grub
-rw-r--r--  1 root root 16975438 Apr 18 09:14 initrd.img-3.19.0-58-generic
-rw-r--r--  1 root root 16975489 Apr 18 09:14 initrd.img-3.19.0-59-generic
-rw-r--r--  1 root root 16975434 Apr 18 09:14 initrd.img-3.19.0-65-generic
-rw-r--r--  1 root root 16975144 Apr 18 09:14 initrd.img-3.19.0-66-generic
-rw-r--r--  1 root root 16975428 Apr 18 09:14 initrd.img-3.19.0-69-generic
-rw-r--r--  1 root root 60195966 Apr 18 09:14 initrd.img-4.15.0-76-generic
-rw-r--r--  1 root root 60204841 Apr 18 09:14 initrd.img-4.15.0-91-generic
drwx------  2 root root    12288 Feb 13  2016 lost+found
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-------  1 root root  4068355 Jan 17 05:59 System.map-4.15.0-76-generic
-rw-------  1 root root  8367768 Jan 17 06:27 vmlinuz-4.15.0-76-generic
-rw-------  1 root root  8375960 Feb 28 02:51 vmlinuz-4.15.0-91-generic

Кажется, что система пытается создать старый initrd файлы в /boot, и затем /boot заполняется, и затем dpkg сбои. Как я могу зафиксировать это?

1
задан 18 April 2020 в 19:17

4 ответа

  1. Удалите файлы остатка, которые говорят update-initramfs какое ядро установлено

    sudo rm /var/lib/initramfs-tools/3.19*
    
  2. Подтвердите (будет № 3.19*, изображения обрабатываются),

    sudo update-initramfs -u -k all
    
  3. Пойдите и зафиксируйте способную установку

    sudo apt install -f
    

Затем можно удалить те 3.19* изображения, постоянно.

Примечание: Шаг 2 является дополнительным, поскольку он повторяется в Шаге 3 при установке linux-firmware пакет. Я включал его, чтобы быть ясным.

0
ответ дан 25 April 2020 в 10:45

Ваши чистки только получают один из этих шести пакетов, связанных с ядром, и оставшиеся части вызывают проблемы. Для 3,19 initrd файлов в начальной загрузке / возьмите numbwer, например, 3.19.0-58 и выполните это через свой dpkg - список | fgrep 3.19.0-58. Работайте Ваша Кв. - получают чистку в том списке 3,19 пакетов. Затем возьмите следующий, пока все не были зафиксированы.
Сделайте это в следующий раз, когда Вы хотите произвести чистку полного ядра - получают связанные пакеты с dpkg - список | fgrep x.y.z-w затем, если только пакеты, которые Вы хотите удалить, перечислены, канал, которые перечисляют к чистке (повторно вызывают команду в предыдущей строке для создания списка):

dpkg --list |fgrep x.y.z-w
apt-get purge `!!`
0
ответ дан 25 April 2020 в 10:45

Внимательно прочтите это https://help.ubuntu.com/community/RemoveOldKernels

Согласно этому сообщению, вы можете удалить старое неиспользуемое ядро ​​просто с помощью команды autoremove в терминале:

sudo apt-get autoremove --purge  

Примечание: apt- get autoremove не удалит все автоматически устанавливаемые старые пакеты ядра, поскольку сохраняются резервные версии; список сохраненных ядер поддерживается и автоматически обновляется в файле /etc/apt/apt.conf.d/01autoremove-kernels как список подходящих регулярных выражений. НАСКОЛЬКО я написал. Внимательно прочтите сообщение выше.

Перечислите все ядра, включая загруженное:

dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+'

Если вы хотите очистить один конкретный пакет, предоставляющий ядро, вы можете сделать это с помощью следующей команды в терминале:

sudo apt-get purge linux-image-4.**.*-**-generic
sudo dpkg --purge linux-headers-4.**.*-* linux-headers-4.**.*-**-generic

На странице выше также описано, как «Безопасно Удаление старых ядер », включая initrd.img . Лучше проделайте это шаг за шагом.

4
ответ дан 26 April 2020 в 13:26

Одно достаточно безопасное решение для большинства будущих читателей:

Для каждого файла или каталога, в котором нет такого-файла, создайте фиктивный файл, который apt удаляет. Apt не заботится о содержимом файла, ему просто нужно удалить файл. Так что дайте ему файл удалить.

Этот метод может быть утомительным (у вас МНОГО) отсутствующих файлов, но он намного безопаснее, чем альтернатива ниже.


ПРИМЕР

Вот одна ошибка: /sbin/ldconfig.real: Предупреждение: игнорирование файла конфигурации, который не может быть открыт: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: Нет такого файла или каталога

Файлы в / и т.д. принадлежат пользователю root, поэтому создайте фиктивный файл, используя sudo touch /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf

Теперь есть файл, который нужно удалить с помощью apt / dpkg, что устраняет ошибку отсутствия такого файла или каталога.


Менее безопасное решение - использовать флаг dpkg --force-remove-reinstreq. Мы называем это Nuclear Option - он удаляет запись о пакете в базе данных dpkg , не пытаясь удалить какие-либо файлы .

Похоже, это эффективное решение для вас (и только для вас). Всем будущим читателям следует забыть, что они видели это

ПРЕДУПРЕЖДЕНИЕ Используйте --force-remove-reinstreq в качестве ПОСЛЕДНЕГО ИСПОЛЬЗОВАНИЯ перед переустановкой. Если вы используете его неправильно, вы можете сломать диспетчер пакетов и потребовать переустановки. Эта опция ТОЛЬКО для опытных пользователей. Это сильное лекарство - неправильное употребление может убить пациента.

0
ответ дан 27 April 2020 в 16:01

Другие вопросы по тегам:

Похожие вопросы: