Pop!_OS apt failure due to "No space left on device" error for /boot/efi
0
votes
1
answer
2325
views
I basically can't use
apt
without running into an error since this morning as all calls will result in the error: kernelstub.Installer : ERROR Couldn't copy the initrd onto the ESP!
. I'm using Pop!_OS based on Ubuntu 20.04.2 LTS x86_64. Following the traceback, it looks like the problem is the following:
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'
I tried removing old kernels using sudo apt-get autoremove linux-image-5.11.0-7612-generic
as suggested [here](https://askubuntu.com/a/223249/570716) and sudo apt --purge autoremove
as suggested [here](https://www.cyberciti.biz/faq/ubuntu-18-04-remove-all-unused-old-kernels/) . Both times the same update is attempted and fails.
Here is the full call:
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'
Here is the output of 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
And these are the kernels:
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
Any ideas how to fix this?
Asked by JBGruber
(101 rep)
May 5, 2021, 08:04 AM
Last activity: May 22, 2025, 04:09 AM
Last activity: May 22, 2025, 04:09 AM