Efibootmgr: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Add categories: Linux, Reference)
(Fix: remove --- horizontal lines (9 removed))
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Status
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}


{{TOC}}


'''efibootmgr'''<ref>https://github.com/rhboot/efibootmgr</ref> is a command line tool to managing UEFI boot menu.
== Overview ==


== Usage ==
Efibootmgr에 대한 기술 문서입니다.
Assumming that you have installed [[Linux]] in UEFI mode.


=== Install efibootmgr ===
=== Summary ===
You can install the '''efibootmgr''' command line utility with the following commands  on Debian/Ubuntu/Linux Mint
sudo apt install efibootmgr


=== Displaying Current Settings ===
* 무엇인가? - Efibootmgr
Simply run the following command. In some Linux distributions like Debian, you need to run it with <code>sudo</code> privilege.
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
$ efibootmgr
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0009,0003,0001,0007,0004
Boot0000* AMIFWUpdate
Boot0001* UEFI: Built-in EFI Shell
Boot0002* ubuntu
Boot0003* USB
Boot0004* CentOS Linux
Boot0007* CentOS Linux
Boot0009* Hard Drive
MirrorStatus: Platform does not support address range mirror
DesiredMirroredPercentageAbove4G: 0.00
DesiredMirrorMemoryBelow4GB: false
#<code>-v</code> option to show verbose information
$ efibootmgr -v
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0009,0003,0001,0007,0004
Boot0000* AMIFWUpdate
Boot0001* UEFI: Built-in EFI Shell
Boot0002* ubuntu
Boot0003* USB
Boot0004* CentOS Linux
Boot0007* CentOS Linux
Boot0009* Hard Drive
MirrorStatus: Platform does not support address range mirror
DesiredMirroredPercentageAbove4G: 0.00
DesiredMirrorMemoryBelow4GB: false
hpcmate@GPGPUA:~/setup/test$ efibootmgr -v
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0009,0003,0001,0007,0004
Boot0000* AMIFWUpdate  VenMedia(5023b95c-db26-429b-a648-bd47664c8012)/FvFile(1de64b8e-138b-4258-b7dd-f2d8ec142a9e)
Boot0001* UEFI: Built-in EFI Shell      VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0002* ubuntu        HD(1,GPT,eac04fbf-cb5f-4e94-a04f-b0e250c06b62,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0003* USB  BBS(USB,,0x0)..GO..NO........c.A.M.I. .V.i.r.t.u.a.l. .C.D.R.O.M.0. .1...0.0....................A.............................0..Gd-.;.A..MQ..L.A.A.A.A.B.B.B.B.C.C.C.C.1........BO
Boot0004* CentOS Linux  VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0007* CentOS Linux  VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0009* Hard Drive    BBS(HD,,0x0)..GO..NO........o.S.a.m.s.u.n.g. .S.S.D. .8.7.0. .E.V.O. .2.T.B....................A...........................>..Gd-.;.A..MQ..L.7.S.4.5.S.N.W.0.0.A.7.8.3.3. .P. . . . ........BO
MirrorStatus: Platform does not support address range mirror
DesiredMirroredPercentageAbove4G: 0.00
DesiredMirrorMemoryBelow4GB: false


=== Changing Boot Order ===
First, copy the current boot order. For example, my boot order is:
0002,0009,0003,0001,0007,0004
Then type in the following command
sudo efibootmgr -o
And append the boot order to the above command.
sudo efibootmgr -o 0002,0009,0003,0001,0007,0004
Let’s say you want <code>0009</code> to be the first boot entry. All you have to do is move it to the left of <code>0002</code> and press Enter.
sudo efibootmgr -o 0009,0002,0003,0001,0007,0004


=== Adding Boot Entry ===
== Purpose ==
If you have installed multiple Linux distributions on your computer, but one of the Linux distribution doesn’t have a UEFI boot entry, you can manually add it.
Boot into the Linux distro that doesn’t have UFEI boot entry.  Then make sure it has the EFI version of GRUB boot loader installed.


Debian/Ubuntu/Linux Mint
이 문서가 존재하는 이유
sudo apt install grub-efi
Then mount the EFI system partition (ESP) under <code>/boot/efi/</code> directory. In this example, <code>/dev/sda1</code> is the ESP.  ** If you are using NVME SSD, then the disk name is different. Use the following command to check the disk name.
sudo mount /dev/sda1 /boot/efi/
Then install Grub boot loader to ESP.
sudo grub-install /dev/sda --target=x86_64-efi --efi-directory=/boot/efi/
<code>x86_64-efi</code> means that we are going to install Grub for UEFI firmware. The default target is <code>i386-pc</code>, which is for traditional [[BIOS]] firmware.


Now, you should see a new entry in UEFI boot menu with the <code>bootmgr</code> command.  Under the hood, the Grub installer first installs a <code>.efi</code> booloader file to <code>/boot/efi/EFI/<label>/</code> directory. Usually it’s named grubx64.efi. Then it runs the following command to add a new entry in UEFI boot menu.
* Goal: Efibootmgr에 대한 기술 정보 제공
efibootmgr -c -d /dev/sda -p 7 -L <label> -l \EFI\<label>\grubx64.efi
* Scope: Efibootmgr의 개념, 사용법, 설정
Newly added entry will be the first in boot order.
* Non-goals: 다른 주제로의 확장


=== Deleteing Boot Entry ===
To remove the respective boot entry, run:
sudo efibootmgr -b <bootnum> -B
For example,
sudo efibootmgr -b 0014 -B
<code>-b</code> option specify the boot number. <code>-B</code> option delete that boot number.


=== Setting a Boot Entry Active or Inactive ===
== Key Concepts ==
A boot entry followed by an asterisk indicates that it’s active from the output of efibootmgr command. Otherwise it’s inactive.


{| class="wikitable"
! Concept
! Description
! Related
|-
| Efibootmgr
| HPC/서버 환경에서 중요한 기술 개념
| [[Linux]], [[Server]]
|}
== Detailed Explanation ==
= Efibootmgr =
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}
UEFI 부트 메뉴를 관리하는 명령줄 도구. Linux 시스템의 부트 순서, 부트 엔트리 추가/삭제/수정을 담당.
* 무엇인가? UEFI firmware의 부트 매니저 설정을 명령줄에서 조작하는 유틸리티
* 왜 필요한가? 부트 순서 변경, 새 OS 부트 엔트리 추가, 부트 옵션 커스터마이징
* 언제 사용하는가? 멀티부트 환경 구성, 부트 순서 변경, UEFI firmware 설정 조정
efibootmgr 명령어 사용법, 부트 순서 변경, 현재 설정 확인 방법 등 실용적인 UEFI 부트 관리 가이드 제공
* Goal: Linux 시스템의 UEFI 부트 설정을 효율적으로 관리
* Scope: efibootmgr 설치, 설정 확인, 부트 순서 변경, 부트 엔티 관리
* Non-goals: UEFI firmware 상세 설명, [[BIOS]] 설정 가이드
{| class="wikitable"
! Concept
! Description
! Related
== Best Practices ==
* 최신 버전 사용 권장
* 공식 문서 참고
* 테스트 환경에서 먼저 검증


To set a boot entry active, run:
sudo efibootmgr -b <bootnum> -a
To set a boot entry inactive, run:
sudo efibootmgr -b <bootnum> -A
We can use systemd service to automatically disable target boot entry.
sudo nano /etc/systemd/system/disable-boot-entry.service
Add the following line in this file.
[Unit]
  Description=disable Linux Mint Boot Entry
  After=multi-user.target
[Service]
  Type=oneshot
  ExecStart=/bin/bash -c '/usr/bin/efibootmgr -b <Target boot entry number>  -A'
[Install]
  WantedBy=multi-user.target


== References ==
== References ==
<references />
[[Category:Linux]]


[[Category:Reference]]
* [https://wiki.hpcmate.com Efibootmgr]
 
 
== Related Pages ==
 
* [[Linux]]
* [[Server]]
* [[Hardware]]
* [[Network]]
 
 
[[Category:Hardware]]
== Knowledge Graph ==
 
Related
 
→ [[Efi shell tips and tricks]]
→ [[BIOS]]
→ [[UEFI]]
→ [[AMI Boot code]]
 
[[Category:Guide]]

Latest revision as of 11:28, 17 July 2026

Template:Status

Template:TOC

Overview

Efibootmgr에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Efibootmgr
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시


Purpose

이 문서가 존재하는 이유

  • Goal: Efibootmgr에 대한 기술 정보 제공
  • Scope: Efibootmgr의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장


Key Concepts

Concept Description Related
Efibootmgr HPC/서버 환경에서 중요한 기술 개념 Linux, Server


Detailed Explanation

Efibootmgr

|status=Draft |owner=Knowledge Agent |last_update=2026-07-16 |review=Pending }} UEFI 부트 메뉴를 관리하는 명령줄 도구. Linux 시스템의 부트 순서, 부트 엔트리 추가/삭제/수정을 담당.

  • 무엇인가? UEFI firmware의 부트 매니저 설정을 명령줄에서 조작하는 유틸리티
  • 왜 필요한가? 부트 순서 변경, 새 OS 부트 엔트리 추가, 부트 옵션 커스터마이징
  • 언제 사용하는가? 멀티부트 환경 구성, 부트 순서 변경, UEFI firmware 설정 조정

efibootmgr 명령어 사용법, 부트 순서 변경, 현재 설정 확인 방법 등 실용적인 UEFI 부트 관리 가이드 제공

  • Goal: Linux 시스템의 UEFI 부트 설정을 효율적으로 관리
  • Scope: efibootmgr 설치, 설정 확인, 부트 순서 변경, 부트 엔티 관리
  • Non-goals: UEFI firmware 상세 설명, BIOS 설정 가이드
Concept Description Related


Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증


References


Related Pages

Knowledge Graph

Related

Efi shell tips and tricksBIOSUEFIAMI Boot code