Skip to content

Commit 3e0178a

Browse files
committed
feat: Added how to clean up efi entries
1 parent aed5834 commit 3e0178a

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

asciidoc/tips/metal3.adoc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,32 @@ spec:
205205
====
206206
Kubernetes namespaces can be also used to better organize the different objects.
207207
====
208+
209+
== Clean up old EFI boot entries
210+
211+
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).
212+
You can clean up those old entries by following any of the following procedures:
213+
214+
* Delete them on the BIOS/EFI setup interface directly (the exact procedure will depend on the hardware).
215+
* Run the UEFI https://uefi.org/sites/default/files/resources/UEFI_Shell_2_2.pdf[`bcfg`] shell as:
216+
217+
----
218+
# List the entries
219+
bcfg boot dump -b
220+
# Delete entry number X
221+
bcfg boot rm X
222+
# X is the number associated the entry to remove. For example, if the entry is "Boot0002 foobar", then X is 2.
223+
----
224+
225+
* Use `efibootmgr` on a Linux system as:
226+
227+
----
228+
# List the entries
229+
efibootmgr -v
230+
# Delete entry number X
231+
efibootmgr -b X -B
232+
----
233+
234+
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`).
235+
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.
236+
Removal may require explicitly mounting the ESP, typically mounted as `/boot/efi/EFI` on Linux systems.

0 commit comments

Comments
 (0)