Hello,
I have seen many threads about the EFI space problem, and I have been able to fix it in the past. However, I currently have it again on one of my hosts and can't seem to get it cleaned up. None of the other threads have helped this time.
I mounted my EFI partitions and cleaned out some space by removing the ancient 5.3 and 5.4 from EFI/proxmox. I then deleted one of the versions from the base directory to make some more space. then I get
/dev/sda2 523248 323512 199736 62% /mnt/efi
/dev/sdf2 523248 318140 205108 61% /mnt/efi2
So now I have some space (I have tried deleting more and gotten to 45% full and it does the same thing as below).
I then try to purge an old kernel (by the way it tells me the kernel is not installed - WTF?):
root@pve2:~# apt purge proxmox-kernel-6.17.13-1-pve
Package 'proxmox-kernel-6.17.13-1-pve' is not installed, so not removed
REMOVING:
proxmox-kernel-6.17.13-6-pve-signed proxmox-kernel-6.17.2-1-pve-signed
Summary:
Upgrading: 0, Installing: 0, Removing: 2, Not Upgrading: 0
9 not fully installed or removed.
Freed space: 1,980 MB
Continue? [Y/n]
(Reading database ... 118429 files and directories currently installed.)
Removing proxmox-kernel-6.17.13-6-pve-signed (6.17.13-6) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 6.17.13-6-pve /boot/vmlinuz-6.17.13-6-pve
update-initramfs: Deleting /boot/initrd.img-6.17.13-6-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 6.17.13-6-pve /boot/vmlinuz-6.17.13-6-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 6.17.13-6-pve /boot/vmlinuz-6.17.13-6-pve
Re-executing '/etc/kernel/postrm.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/09F3-32DF
Copying kernel 6.17.13-1-pve
Copying kernel 6.17.13-8-pve
Copying kernel 7.0.0-3-pve
Copying kernel 7.0.2-3-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.2-3-pve
Found initrd image: /boot/initrd.img-7.0.2-3-pve
Found linux image: /boot/vmlinuz-7.0.0-3-pve
Found initrd image: /boot/initrd.img-7.0.0-3-pve
Found linux image: /boot/vmlinuz-6.17.13-8-pve
Found initrd image: /boot/initrd.img-6.17.13-8-pve
Found linux image: /boot/vmlinuz-6.17.13-1-pve
Found initrd image: /boot/initrd.img-6.17.13-1-pve
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Copying and configuring kernels on /dev/disk/by-uuid/09F3-A22E
Copying kernel 6.17.13-1-pve
Copying kernel 6.17.13-8-pve
Copying kernel 7.0.0-3-pve
Copying kernel 7.0.2-3-pve
cp: error writing '/var/tmp/espmounts/09F3-A22E/initrd.img-7.0.2-3-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.17.13-6-pve-signed.postrm line 15.
dpkg: error processing package proxmox-kernel-6.17.13-6-pve-signed (--remove):
installed proxmox-kernel-6.17.13-6-pve-signed package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
proxmox-kernel-6.17.13-6-pve-signed
Processing was halted because there were too many errors.
Error: Sub-process /usr/bin/dpkg returned an error code (1)
And the apt process fills my EFI partitions back up with the same damn kernels I just deleted before trying the purge.
root@pve2:~# ls -al /mnt/efi
total 415533
drwxr-xr-x 5 root root 4096 Dec 31 1969 .
drwxr-xr-x 5 root root 5 May 16 04:17 ..
drwxr-xr-x 5 root root 4096 Nov 6 2019 EFI
drwxr-xr-x 5 root root 4096 May 16 04:51 grub
-rwxr-xr-x 1 root root 88949017 Mar 7 22:14 initrd.img-6.17.13-1-pve
-rwxr-xr-x 1 root root 89334426 May 16 03:35 initrd.img-6.17.13-8-pve
-rwxr-xr-x 1 root root 91480874 May 16 03:34 initrd.img-7.0.0-3-pve
-rwxr-xr-x 1 root root 91456376 May 16 03:36 initrd.img-7.0.2-3-pve
drwxr-xr-x 3 root root 4096 Nov 6 2019 loader
-rwxr-xr-x 1 root root 15842088 Feb 10 08:06 vmlinuz-6.17.13-1-pve
-rwxr-xr-x 1 root root 15956776 May 14 17:48 vmlinuz-6.17.13-8-pve
-rwxr-xr-x 1 root root 16227432 Apr 21 17:56 vmlinuz-7.0.0-3-pve
-rwxr-xr-x 1 root root 16223336 May 14 11:28 vmlinuz-7.0.2-3-pve
For some reason this particular host has an extra kernel in the list:
root@pve2:~# proxmox-boot-tool kernel list
Manually selected kernels:
None.
Automatically selected kernels:
6.17.13-1-pve
6.17.13-8-pve
7.0.0-3-pve
7.0.2-3-pve
I can't seem to get rid of that 6.17.13-1-pve and it re-fills the EFI partitions every time I try.
Can I get rid of any of these kernels that are automatically selected without apt filling my EFI partitions?
Please Help!
I have seen many threads about the EFI space problem, and I have been able to fix it in the past. However, I currently have it again on one of my hosts and can't seem to get it cleaned up. None of the other threads have helped this time.
I mounted my EFI partitions and cleaned out some space by removing the ancient 5.3 and 5.4 from EFI/proxmox. I then deleted one of the versions from the base directory to make some more space. then I get
/dev/sda2 523248 323512 199736 62% /mnt/efi
/dev/sdf2 523248 318140 205108 61% /mnt/efi2
So now I have some space (I have tried deleting more and gotten to 45% full and it does the same thing as below).
I then try to purge an old kernel (by the way it tells me the kernel is not installed - WTF?):
root@pve2:~# apt purge proxmox-kernel-6.17.13-1-pve
Package 'proxmox-kernel-6.17.13-1-pve' is not installed, so not removed
REMOVING:
proxmox-kernel-6.17.13-6-pve-signed proxmox-kernel-6.17.2-1-pve-signed
Summary:
Upgrading: 0, Installing: 0, Removing: 2, Not Upgrading: 0
9 not fully installed or removed.
Freed space: 1,980 MB
Continue? [Y/n]
(Reading database ... 118429 files and directories currently installed.)
Removing proxmox-kernel-6.17.13-6-pve-signed (6.17.13-6) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 6.17.13-6-pve /boot/vmlinuz-6.17.13-6-pve
update-initramfs: Deleting /boot/initrd.img-6.17.13-6-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 6.17.13-6-pve /boot/vmlinuz-6.17.13-6-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 6.17.13-6-pve /boot/vmlinuz-6.17.13-6-pve
Re-executing '/etc/kernel/postrm.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/09F3-32DF
Copying kernel 6.17.13-1-pve
Copying kernel 6.17.13-8-pve
Copying kernel 7.0.0-3-pve
Copying kernel 7.0.2-3-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.2-3-pve
Found initrd image: /boot/initrd.img-7.0.2-3-pve
Found linux image: /boot/vmlinuz-7.0.0-3-pve
Found initrd image: /boot/initrd.img-7.0.0-3-pve
Found linux image: /boot/vmlinuz-6.17.13-8-pve
Found initrd image: /boot/initrd.img-6.17.13-8-pve
Found linux image: /boot/vmlinuz-6.17.13-1-pve
Found initrd image: /boot/initrd.img-6.17.13-1-pve
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Copying and configuring kernels on /dev/disk/by-uuid/09F3-A22E
Copying kernel 6.17.13-1-pve
Copying kernel 6.17.13-8-pve
Copying kernel 7.0.0-3-pve
Copying kernel 7.0.2-3-pve
cp: error writing '/var/tmp/espmounts/09F3-A22E/initrd.img-7.0.2-3-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.17.13-6-pve-signed.postrm line 15.
dpkg: error processing package proxmox-kernel-6.17.13-6-pve-signed (--remove):
installed proxmox-kernel-6.17.13-6-pve-signed package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
proxmox-kernel-6.17.13-6-pve-signed
Processing was halted because there were too many errors.
Error: Sub-process /usr/bin/dpkg returned an error code (1)
And the apt process fills my EFI partitions back up with the same damn kernels I just deleted before trying the purge.
root@pve2:~# ls -al /mnt/efi
total 415533
drwxr-xr-x 5 root root 4096 Dec 31 1969 .
drwxr-xr-x 5 root root 5 May 16 04:17 ..
drwxr-xr-x 5 root root 4096 Nov 6 2019 EFI
drwxr-xr-x 5 root root 4096 May 16 04:51 grub
-rwxr-xr-x 1 root root 88949017 Mar 7 22:14 initrd.img-6.17.13-1-pve
-rwxr-xr-x 1 root root 89334426 May 16 03:35 initrd.img-6.17.13-8-pve
-rwxr-xr-x 1 root root 91480874 May 16 03:34 initrd.img-7.0.0-3-pve
-rwxr-xr-x 1 root root 91456376 May 16 03:36 initrd.img-7.0.2-3-pve
drwxr-xr-x 3 root root 4096 Nov 6 2019 loader
-rwxr-xr-x 1 root root 15842088 Feb 10 08:06 vmlinuz-6.17.13-1-pve
-rwxr-xr-x 1 root root 15956776 May 14 17:48 vmlinuz-6.17.13-8-pve
-rwxr-xr-x 1 root root 16227432 Apr 21 17:56 vmlinuz-7.0.0-3-pve
-rwxr-xr-x 1 root root 16223336 May 14 11:28 vmlinuz-7.0.2-3-pve
For some reason this particular host has an extra kernel in the list:
root@pve2:~# proxmox-boot-tool kernel list
Manually selected kernels:
None.
Automatically selected kernels:
6.17.13-1-pve
6.17.13-8-pve
7.0.0-3-pve
7.0.2-3-pve
I can't seem to get rid of that 6.17.13-1-pve and it re-fills the EFI partitions every time I try.
Can I get rid of any of these kernels that are automatically selected without apt filling my EFI partitions?
Please Help!