Skip to content

Commit efb281f

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

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

asciidoc/tips/metal3.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,33 @@ 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+
There's sometimes where 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+
It is possible to clean up those old entries by either:
213+
214+
* Deleting them on the setup interface directly (the exact procedure will depend on the hardware).
215+
* Using the UEFI https://uefi.org/sites/default/files/resources/UEFI_Shell_2_2.pdf[`bcfg`] shell command 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+
* Using `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+
[NOTE]
235+
====
236+
Be aware that in any of these cases, it may have leftover files on your EFI System Partition (ESP), typically mounted as `/boot/efi/EFI` on a Linux system. Such files can be deleted, although depending on the OS, it may be needed to explicitly mount the ESP. If they aren't referenced, the files won't do any real harm, unless they consume so much space that they prevent installing another OS or updating the boot manager. The files will normally be stored in subdirectories of the EFI directory on the ESP; most OSes create subdirectories named after themselves or the companies that create them, such as EFI/opensuse for openSUSE or EFI/Microsoft for Windows.
237+
====

0 commit comments

Comments
 (0)