/var/tmp/espmounts/7276-6706/EFI/proxmox/6.5.13-6-pve: No space left on device when installing new kernel

gogito

Member
Jan 12, 2022
11
1
8
25
I have a single node install with PVE 8.2.4 and ZFS Mirror as boot drive. I was doing apt update and was suggested to do a apt --fix-broken install. I ran that and got this:

Code:
root@pve:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  proxmox-kernel-6.5.13-1-pve
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
8 not fully installed or removed.
After this operation, 560 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 71272 files and directories currently installed.)
Removing proxmox-kernel-6.5.13-1-pve (6.5.13-1) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 6.5.13-1-pve /boot/vmlinuz-6.5.13-1-pve
update-initramfs: Deleting /boot/initrd.img-6.5.13-1-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 6.5.13-1-pve /boot/vmlinuz-6.5.13-1-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 6.5.13-1-pve /boot/vmlinuz-6.5.13-1-pve
Re-executing '/etc/kernel/postrm.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/7275-B78C
        Copying kernel and creating boot-entry for 6.5.13-6-pve
        Copying kernel and creating boot-entry for 6.8.8-4-pve
Copying and configuring kernels on /dev/disk/by-uuid/7276-6706
        Copying kernel and creating boot-entry for 6.5.13-6-pve
mkdir: cannot create directory ‘/var/tmp/espmounts/7276-6706/EFI/proxmox/6.5.13-6-pve’: No space left on device
run-parts: /etc/kernel/postrm.d/zz-proxmox-boot exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/proxmox-kernel-6.5.13-1-pve.postrm line 15.
dpkg: error processing package proxmox-kernel-6.5.13-1-pve (--remove):
 installed proxmox-kernel-6.5.13-1-pve package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 proxmox-kernel-6.5.13-1-pve
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

So my guess is that somehow the EFI partition is full? I'm rather inexperience when it comes to kernels and boot related issue so I'm not too sure how to proceed. Looking forward to you guys suggestion.
 
Hello,

Got the same error with apt upgrade and also apt autoremove.

Like you it was complaining about the Boot partition being full.
When you run df -h it does not show the EFI partition.

You can get them with fdisk and also by looking in /dev/disk/by-uuid/*
In my case I had this

# ls -al /dev/disk/by-uuid/
[...]
lrwxrwxrwx 1 root root 10 Jul 30 22:48 DA1A-3738 -> ../../sdd2
lrwxrwxrwx 1 root root 10 Jul 30 22:48 DA1A-7782 -> ../../sde2

Mounting the EFI partition to remove the content is useless because the kernel data is recreated every time you run an apt command to remove them.
To solve this, I did the following.

- I used a usb key and created 2 EFI partitions.
- unlink both /dev/disk/by-uuid/DA1A*
- link the 2 /dev/disk/by-uuid/DA1A.. to a partition from the usb key.
At that point, the space issue will not show up. You might get an error because the partition is not a block device whatever.
In any case, you can now clean up your old kernel entry.
- clean up old kernel entry and run apt autoremove.
- unlink both /dev/disk/by-uuid/DA1A*
- link them back to their original partition (the ones from your zfs root drives)
It's almost over!
- mount both EFI partitions to any mount point
- clean up the kernel you removed in /yourMountPoint/EFI/proxmox/6...[vers__to_delete]
- run 'apt autoremove' you should not get the error anymore.
- reboot

As a precaution do not remove all your kernel versions keep at least your current and a previous version you know worked.
Also, be careful when you remove the kernel version, the latest is tied to proxmox-ve packages.
there is a safety that will prevent you from removing it, just in case.

I'm telling you this because the latest version 6.8.8.4 was installed when I did the upgrade, but it was not available in the kernel at boot because of the space issue. So the proxmox-ve was tied to 6.8.8.4, and I was still running 6.8.8.1.

Good luck
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!