Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions asciidoc/tips/metal3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,32 @@ spec:
====
Kubernetes namespaces can be also used to better organize the different objects.
====

== Clean up old EFI boot entries

Sometimes, the https://en.wikipedia.org/wiki/UEFI#UEFI_booting[UEFI boot manager] contains multiple entries for older operating systems that are probably not needed anymore (especially for host being re-provisioned multiple times).
You can clean up those old entries by following any of the following procedures:

* Delete them on the BIOS/EFI setup interface directly (the exact procedure will depend on the hardware).
* Run the UEFI https://uefi.org/sites/default/files/resources/UEFI_Shell_2_2.pdf[`bcfg`] shell as:
+
----
# List the entries
bcfg boot dump -b
# Delete entry number X
bcfg boot rm X
# X is the number associated the entry to remove. For example, if the entry is "Boot0002 foobar", then X is 2.
----

* Use `efibootmgr` on a Linux system as:
+
----
# List the entries
efibootmgr -v
# Delete entry number X
efibootmgr -b X -B
----

The process may leave orphaned files on the EFI System Parition (ESP), usually found under subdirectories named by the vendor (e.g., `EFI/opensuse` or `EFI/Microsoft`).
While these files are generally harmless, they should be deleted if they consume excessive space as it can prevent the installation of a new OS or a boot manager update.
Removal may require explicitly mounting the ESP, typically mounted as `/boot/efi/EFI` on Linux systems.