OSError: [Errno 28] デバイスに空き容量がありません: '/boot/initrd.img

OSError: [Errno 28] デバイスに空き容量がありません: '/boot/initrd.img

apt今朝現在、すべての呼び出しでエラーが発生するため、デフォルトではエラーが発生せず使用できませんkernelstub.Installer : ERROR Couldn't copy the initrd onto the ESP!。私はUbuntu 20.04.2 LTS x86_64ベースのPop!_OSを使用しています。逆追跡後の問題は次のとおりです。

OSError: [Errno 28] No space left on device: '/boot/initrd.img-5.11.0-7614-generic' -> '/boot/efi/EFI/Ubuntu-22666039-42da-4b29-8575-b464fa505439/initrd.img'

私は以下を使って古いカーネルを削除しようsudo apt-get autoremove linux-image-5.11.0-7612-genericとしました。ここそしてsudo apt --purge autoremoveおすすめに従うここ。同じ更新に対する2回の試行が失敗しました。

フルコールは次のとおりです。

update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
kernelstub.Config    : INFO     Looking for configuration...
kernelstub           : INFO     System information: 

    OS:..................Ubuntu 20.04
    Root partition:....../dev/nvme0n1p3
    Root FS UUID:........22666039-42da-4b29-8575-b464fa505439
    ESP Path:............/boot/efi
    ESP Partition:......./dev/nvme0n1p1
    ESP Partition #:.....1
    NVRAM entry #:.......-1
    Boot Variable #:.....0000
    Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash
    Kernel Image Path:.../boot/vmlinuz-5.11.0-7614-generic
    Initrd Image Path:.../boot/initrd.img-5.11.0-7614-generic
    Force-overwrite:.....False

kernelstub.Installer : INFO     Copying Kernel into ESP
kernelstub.Installer : INFO     Copying initrd.img into ESP
kernelstub.Installer : ERROR    Couldn't copy the initrd onto the ESP!
This is a critical error and we cannot continue. Check your settings to see if there is a typo. Otherwise, check permissions and try again.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 247, in copy_files
    shutil.copy(src, dest)
  File "/usr/lib/python3.8/shutil.py", line 415, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 272, in copyfile
    _fastcopy_sendfile(fsrc, fdst)
  File "/usr/lib/python3.8/shutil.py", line 163, in _fastcopy_sendfile
    raise err from None
  File "/usr/lib/python3.8/shutil.py", line 149, in _fastcopy_sendfile
    sent = os.sendfile(outfd, infd, offset, blocksize)
OSError: [Errno 28] No space left on device: '/boot/initrd.img-5.11.0-7614-generic' -> '/boot/efi/EFI/Ubuntu-22666039-42da-4b29-8575-b464fa505439/initrd.img'

出力は次のとおりですdf -H

Filesystem      Size  Used Avail Use% Mounted on
udev             17G     0   17G   0% /dev
tmpfs           3.4G  4.2M  3.4G   1% /run
/dev/nvme0n1p3  483G  226G  233G  50% /
tmpfs            17G  128M   17G   1% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs            17G     0   17G   0% /sys/fs/cgroup
/dev/loop0       34M   34M     0 100% /snap/snapd/11402
/dev/loop2       34M   34M     0 100% /snap/snapd/11588
/dev/loop1       59M   59M     0 100% /snap/core18/1988
/dev/loop3       59M   59M     0 100% /snap/core18/1997
/dev/nvme0n1p2  4.3G  2.6G  1.8G  60% /recovery
/dev/nvme0n1p1  522M  522M     0 100% /boot/efi
/dev/sda1       984G  910G   25G  98% /mnt/data
tmpfs           3.4G   25k  3.4G   1% /run/user/1000

カーネルは次のとおりです。

sudo dpkg --list | egrep -i --color 'linux-image|linux-headers'
ii  linux-headers-5.11.0-7612                     5.11.0-7612.13~1617215757~20.04~97a8d1a                   all          Header files related to Linux kernel version 5.11.0
ii  linux-headers-5.11.0-7612-generic             5.11.0-7612.13~1617215757~20.04~97a8d1a                   amd64        Linux kernel headers for version 5.11.0 on 64 bit x86 SMP
ii  linux-headers-5.11.0-7614                     5.11.0-7614.15~1618626693~20.04~ecb25cd                   all          Header files related to Linux kernel version 5.11.0
ii  linux-headers-5.11.0-7614-generic             5.11.0-7614.15~1618626693~20.04~ecb25cd                   amd64        Linux kernel headers for version 5.11.0 on 64 bit x86 SMP
ii  linux-headers-5.8.0-7642                      5.8.0-7642.47~1614007149~20.04~82fb226                    all          Header files related to Linux kernel version 5.8.0
ii  linux-headers-5.8.0-7642-generic              5.8.0-7642.47~1614007149~20.04~82fb226                    amd64        Linux kernel headers for version 5.8.0 on 64 bit x86 SMP
ii  linux-headers-generic                         5.11.0.7614.15~1618626693~20.04~ecb25cd                   amd64        Generic Linux kernel headers
rc  linux-image-5.11.0-7612-generic               5.11.0-7612.13~1617215757~20.04~97a8d1a                   amd64        Linux kernel image for version 5.11.0 on 64 bit x86 SMP
ii  linux-image-5.11.0-7614-generic               5.11.0-7614.15~1618626693~20.04~ecb25cd                   amd64        Linux kernel image for version 5.11.0 on 64 bit x86 SMP
rc  linux-image-5.4.0-7642-generic                5.4.0-7642.46~1598628707~20.04~040157c                    amd64        Linux kernel image for version 5.4.0 on 64 bit x86 SMP
rc  linux-image-5.8.0-7630-generic                5.8.0-7630.32~1609193707~20.04~781bb80                    amd64        Linux kernel image for version 5.8.0 on 64 bit x86 SMP
rc  linux-image-5.8.0-7642-generic                5.8.0-7642.47~1614007149~20.04~82fb226                    amd64        Linux kernel image for version 5.8.0 on 64 bit x86 SMP
ii  linux-image-generic                           5.11.0.7614.15~1618626693~20.04~ecb25cd                   amd64        Generic Linux kernel image

この問題を解決する方法についてのアイデアはありますか?

ベストアンサー1

私は解決策を見つけました。ここ。基本的に問題は/boot/efi/EFIそれがいっぱいだということです。リンクされた回答が承認されず、反対表を受け取ったため、ここに投稿しています。しかし、それは私の問題を解決しました。

デフォルトでは、以下を使用しました。

sudo su
cd /boot/efi/EFI
ls

というフォルダが見つかりましたUbuntu-22666039-42da-4b29-8575-b464fa505439。 Pop!_OSを使っているので、EFIフォルダには必要ないようで移動しました。

mv Ubuntu-22666039-42da-4b29-8575-b464fa505439 /home/johannes/Downloads/backup/

問題が発生した場合は元に戻すことができますが、今はすべてうまくいくようです。

おすすめ記事