/ boot заполнен, и я не могу его очистить [ duplicate]

Хорошо, я не уверен, что делать, моя загрузка была полной, и я очистил ее, вручную удалив старые ядра, а затем запустил sudo apt-get -f install, чтобы исправить зависимость, или, как я думал, во время этого процесса он пытался установить следующий ядро ​​или что-то в этом роде, и у меня закончилось место. Теперь мой / boot заполнен, но, похоже, мне нечего чистить. Пожалуйста, помогите, это срочно.

Вот результаты: uname -r

4.4.0-206-generic

Итак, я выполнил это:

dpkg -l linux-image- * | awk '/ ii / {print $ 2}'

Что дало мне:

linux-image-4.4.0-200-generic
dclarke@NASBUBUNTU:~$ dpkg --list 'linux-image*' | grep ^ii
ii  linux-image-4.4.0-200-generic          4.4.0-200.232 amd64        Signed kernel image generic

Итак, я попытался удалить 200, выполнив это:

sudo apt-get remove linux-image-4.4.0-200-generic

Что дало мне следующее:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  linux-image-unsigned-4.4.0-200-generic
Suggested packages:
  fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following packages will be REMOVED:
  linux-image-4.4.0-200-generic linux-modules-extra-4.4.0-200-generic
The following NEW packages will be installed:
  linux-image-unsigned-4.4.0-200-generic
0 upgraded, 1 newly installed, 2 to remove and 114 not upgraded.
1 not fully installed or removed.
Need to get 7,051 kB of archives.
After this operation, 156 MB disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-unsigned-4.4.0-200-generic amd64 4.4.0-200.232 [7,051 kB]
Fetched 7,051 kB in 0s (10.6 MB/s)
(Reading database ... 194153 files and directories currently installed.)
Removing linux-modules-extra-4.4.0-200-generic (4.4.0-200.232) ...
Removing linux-image-4.4.0-200-generic (4.4.0-200.232) ...
/etc/kernel/prerm.d/dkms:
DKMS: Starting autoremove for kernel: 4.4.0-200-generic
DKMS: removing: rapidrecovery-vss 6.1.3.100 (4.4.0-200-generic) (x86_64)

cp: error writing '/boot/initrd.img-4.4.0-200-generic.old-dkms': No space left on device
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.4.0-200-generic
/etc/kernel/postrm.d/x-grub-legacy-ec2:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-4.4.0-206-generic
Found kernel: /vmlinuz-4.4.0-201-generic
Found kernel: /vmlinuz-4.4.0-200-generic
Replacing config file /run/grub/menu.lst with new version
Found kernel: /vmlinuz-4.4.0-206-generic
Found kernel: /vmlinuz-4.4.0-201-generic
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-206-generic
Found initrd image: /boot/initrd.img-4.4.0-206-generic
Found linux image: /boot/vmlinuz-4.4.0-201-generic
done
Selecting previously unselected package linux-image-unsigned-4.4.0-200-generic.
(Reading database ... 189722 files and directories currently installed.)
Preparing to unpack .../linux-image-unsigned-4.4.0-200-generic_4.4.0-200.232_amd64.deb ...
Unpacking linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ...
Setting up linux-image-4.4.0-201-generic (4.4.0-201.233) ...
I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-201-generic
Setting up linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.4.0-201-generic
I: /vmlinuz is now a symlink to boot/vmlinuz-4.4.0-200-generic
I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-200-generic
Processing triggers for linux-image-4.4.0-201-generic (4.4.0-201.233) ...
/etc/kernel/postinst.d/dkms:
DKMS: Starting post-install script on kernel 4.4.0-201-generic
DKMS: Error: Linux headers are missing, Will not continue autoinstall process.
      Please install the linux-headers-4.4.0-201-generic package and run command '/usr/lib/dkms/dkms_autoinstaller 4.4.0-201-generic' manually.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.4.0-201-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
/etc/kernel/postinst.d/x-grub-legacy-ec2:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-4.4.0-206-generic
Found kernel: /vmlinuz-4.4.0-201-generic
Replacing config file /run/grub/menu.lst with new version
Found kernel: /vmlinuz-4.4.0-206-generic
Found kernel: /vmlinuz-4.4.0-201-generic
Found kernel: /vmlinuz-4.4.0-200-generic
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

/etc/kernel/postinst.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-206-generic
Found initrd image: /boot/initrd.img-4.4.0-206-generic
Found linux image: /boot/vmlinuz-4.4.0-201-generic
Found initrd image: /boot/initrd.img-4.4.0-201-generic
Found linux image: /boot/vmlinuz-4.4.0-200-generic
sed: couldn't flush stdout: No space left on device
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 4
dpkg: error processing package linux-image-4.4.0-201-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ...
/etc/kernel/postinst.d/dkms:
DKMS: Starting post-install script on kernel 4.4.0-200-generic
Warning: Unable to find an initial ram disk that I know how to handle.
Will not try to make an initrd.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.4.0-200-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
cat: write error: No space left on device
update-initramfs: failed for /boot/initrd.img-4.4.0-200-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-unsigned-4.4.0-200-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

Если я просто попытаюсь запустить:

sudo apt-get autoremove

, я получу следующее:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 114 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.4.0-201-generic (4.4.0-201.233) ...
I: /initrd.img.old is now a symlink to boot/initrd.img-4.4.0-201-generic
Setting up linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ...
I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-200-generic
Processing triggers for linux-image-4.4.0-201-generic (4.4.0-201.233) ...
/etc/kernel/postinst.d/dkms:
DKMS: Starting post-install script on kernel 4.4.0-201-generic
DKMS: Error: Linux headers are missing, Will not continue autoinstall process.
      Please install the linux-headers-4.4.0-201-generic package and run command '/usr/lib/dkms/dkms_autoinstaller 4.4.0-201-generic' manually.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.4.0-201-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
cat: write error: No space left on device
update-initramfs: failed for /boot/initrd.img-4.4.0-201-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.4.0-201-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ...
/etc/kernel/postinst.d/dkms:
DKMS: Starting post-install script on kernel 4.4.0-200-generic
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.4.0-200-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
cat: write error: No space left on device
update-initramfs: failed for /boot/initrd.img-4.4.0-200-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-unsigned-4.4.0-200-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-4.4.0-201-generic
 linux-image-unsigned-4.4.0-200-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Любая помощь будет принята с благодарностью.

Заранее спасибо.

0
задан 31 March 2021 в 04:37

1 ответ

Хорошо, похоже, что мои проблемы были на самом деле все старые initrd.img файлы, оставленные в /boot, даже после того, как я очистил старые ядра, я все еще получал только 5% от моего /boot обратно. Когда я посмотрел на диск /boot с ls я заметил несколько десятков старых initrdimg файлов и последовал за следующим постом, чтобы помочь исправить

Есть ли неиспользуемые `initrd.img` для удаления?

У меня теперь 82% на моем /boot :)

Спасибо

0
ответ дан 23 April 2021 в 23:28

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

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