[SOLVED] Remove leftover boot UEFI boot environments

Nov 16, 2022
118
18
23
Sweden
I recently changed the whole rpool mirror to two new disks. All went well and the new disks are now running instead (SSD--> NVME).

The problem is that I now have the old boot environments left, as they weren't removed automatically with the proxmox-boot-tool. Situation is like this:


Bash:
root@pbs-offsite:~# proxmox-boot-tool status

Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
3EC4-BA68 is configured with: uefi (versions: 6.8.12-4-pve, 6.8.12-5-pve)
6211-173B is configured with: uefi (versions: 6.8.12-4-pve, 6.8.12-5-pve)
95D7-D59E is configured with: uefi (versions: 6.8.12-4-pve, 6.8.12-5-pve)
D423-C9D6 is configured with: uefi (versions: 6.8.12-4-pve, 6.8.12-5-pve)


Bash:
 pool: rpool
 state: ONLINE
  scan: resilvered 1.66G in 00:00:03 with 0 errors on Mon Dec 16 19:12:21 2024
config:

    NAME                                            STATE     READ WRITE CKSUM
    rpool                                           ONLINE       0     0     0
      mirror-0                                      ONLINE       0     0     0
        nvme-redacted_X300_256GB_TP2redacted-part3  ONLINE       0     0     0
        nvme-redacted_X300_256GB_TP2redacted-part3  ONLINE       0     0     0

errors: No known data errors

How do I find which boot environments that are in use, and how do I safely remove them?
 
Last edited:
There's no man page, but:


proxmox-boot-tool --help


Invalid/unknown command '--help'.

Code:
USAGE: /usr/sbin/proxmox-boot-tool <commands> [ARGS]

  /usr/sbin/proxmox-boot-tool format <partition> [--force]
  /usr/sbin/proxmox-boot-tool init <partition> [grub]
  /usr/sbin/proxmox-boot-tool reinit
  /usr/sbin/proxmox-boot-tool clean [--dry-run]
  /usr/sbin/proxmox-boot-tool refresh [--hook <name>]
  /usr/sbin/proxmox-boot-tool kernel <add|remove> <kernel-version>
  /usr/sbin/proxmox-boot-tool kernel pin <kernel-version> [--next-boot]
  /usr/sbin/proxmox-boot-tool kernel unpin [--next-boot]
  /usr/sbin/proxmox-boot-tool kernel list
  /usr/sbin/proxmox-boot-tool status [--quiet]
  /usr/sbin/proxmox-boot-tool help

You might try clean --dry-run and see what it recommends; I usually use efibootmgr and delete obsolete/unwanted boot entries but don't know if that applies for ZFS boot/root
 
  • Like
Reactions: leesteken
You might try clean --dry-run and see what it recommends; I usually use efibootmgr and delete obsolete/unwanted boot entries but don't know if that applies for ZFS boot/root

Well that was an easy one:

Bash:
root@pbs-offsite:~# proxmox-boot-tool clean

Checking whether ESP '3EC4-BA68' exists.. Not found!
Checking whether ESP '6211-173B' exists.. Not found!
Checking whether ESP '95D7-D59E' exists.. Found!
Checking whether ESP 'D423-C9D6' exists.. Found!
Sorting and removing duplicate ESPs..

root@pbs-offsite:~# proxmox-boot-tool status

Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
95D7-D59E is configured with: uefi (versions: 6.8.12-4-pve, 6.8.12-5-pve)
D423-C9D6 is configured with: uefi (versions: 6.8.12-4-pve, 6.8.12-5-pve

Strange because I ran clean before but it didn't change anything. Problem solved anyway. :+1:
 
  • Like
Reactions: Kingneutron