/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
12
2
8
26
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.
 
  • Like
Reactions: luison
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
 
  • Like
Reactions: luison
I have this exact same issue when upgrading to 6.8.12-5

Code:
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/cmdline found - falling back to /proc/cmdline
Copying and configuring kernels on /dev/disk/by-uuid/2C6E-A8ED
        Copying kernel 5.15.158-2-pve
        Copying kernel 6.8.12-4-pve
        Copying kernel 6.8.12-5-pve
cp: error al escribir en '/var/tmp/espmounts/2C6E-A8ED/initrd.img-6.8.12-5-pve': No queda espacio en el dispositivo
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1

Mounting one (of the 4 I have) shows
1734112251951.png

So not that many and wondering why that partition is so small or why proxmox-boot-tool does not handle this on upgrades.

Also my:

Code:
# proxmox-boot-tool kernel list
Manually selected kernels:
None.

Automatically selected kernels:
5.15.158-2-pve
6.8.12-4-pve
6.8.12-5-pve

so not sure why is still there!

When you say "unlink" and "link" the devices you mean register and deregister with proxmox-boot-tool or how?
Also how do I remove that 6.8.12-2 from the tool so it does not get written again?
I have to admit I am starting to hate quite a lot the proxmox-boot-tool as I've been having issues with it for a while

Thanks.
 
Last edited:
the only partition of importance for what you're doing is /

what do you see for
df /
I guess you mean regarding root and that /var path... plenty of space there

Code:
# df -h /
S.ficheros           Tamaño Usados  Disp Uso% Montado en
/dev/mapper/pve-root    42G    16G   24G  39% /
# df -h /var/tmp/espmounts/
S.ficheros           Tamaño Usados  Disp Uso% Montado en
/dev/mapper/pve-root    42G    16G   24G  39% /
 
I have this exact same issue when upgrading to 6.8.12-5

Code:
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/cmdline found - falling back to /proc/cmdline
Copying and configuring kernels on /dev/disk/by-uuid/2C6E-A8ED
        Copying kernel 5.15.158-2-pve
        Copying kernel 6.8.12-4-pve
        Copying kernel 6.8.12-5-pve
cp: error al escribir en '/var/tmp/espmounts/2C6E-A8ED/initrd.img-6.8.12-5-pve': No queda espacio en el dispositivo
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1

Mounting one (of the 4 I have) shows
View attachment 79079

So not that many and wondering why that partition is so small or why proxmox-boot-tool does not handle this on upgrades.

Also my:

Code:
# proxmox-boot-tool kernel list
Manually selected kernels:
None.

Automatically selected kernels:
5.15.158-2-pve
6.8.12-4-pve
6.8.12-5-pve

so not sure why is still there!

When you say "unlink" and "link" the devices you mean register and deregister with proxmox-boot-tool or how?
Also how do I remove that 6.8.12-2 from the tool so it does not get written again?
I have to admit I am starting to hate quite a lot the proxmox-boot-tool as I've been having issues with it for a while

Thanks.
So this is kind of funny to end back on this post haha !

I'm having the same issue again with 6.11. Anyway, it does not matter. I think the issue is that I need to run auto-remove more often.
I am currently not running it, so I guess I have to blame myself for having this issue again!

@luison, I literally mean unlink
This is what I have:
# ll /dev/disk/by-uuid/DA1A-*
lrwxrwxrwx 1 root root 10 Jan 29 00:05 /dev/disk/by-uuid/DA1A-3738 -> ../../sdd2
lrwxrwxrwx 1 root root 10 Jan 28 23:14 /dev/disk/by-uuid/DA1A-7782 -> ../../sde2

unlink meaning
# unlink /dev/disk/by-uuid/DA1A-3738

Then link it to the usb key
# ln -s /dev/<USBKEYID> /dev/disk/by-uuid/DA1A-3738

I also have 500M partition in both drive. I'm guessing this is the default from the install.