Efibootmgr: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Add categories: Linux, Reference)
(Phase 6.1: LLM-Optimized Wiki Template migration)
Line 1: Line 1:
= Efibootmgr =


{{Status
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}


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


== Usage ==
== Overview ==
Assumming that you have installed [[Linux]] in UEFI mode.


=== Install efibootmgr ===
UEFI 부트 메뉴를 관리하는 명령줄 도구. Linux 시스템의 부트 순서, 부트 엔트리 추가/삭제/수정을 담당.
You can install the '''efibootmgr''' command line utility with the following commands  on Debian/Ubuntu/Linux Mint
sudo apt install efibootmgr


=== Displaying Current Settings ===
=== Summary ===
Simply run the following command. In some Linux distributions like Debian, you need to run it with <code>sudo</code> privilege.
$ 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 ===
* 무엇인가? UEFI firmware의 부트 매니저 설정을 명령줄에서 조작하는 유틸리티
First, copy the current boot order. For example, my boot order is:
* 왜 필요한가? 부트 순서 변경, 새 OS 부트 엔트리 추가, 부트 옵션 커스터마이징
0002,0009,0003,0001,0007,0004
* 언제 사용하는가? 멀티부트 환경 구성, 부트 순서 변경, UEFI firmware 설정 조정
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 ===
---
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
== Purpose ==
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.
efibootmgr 명령어 사용법, 부트 순서 변경, 현재 설정 확인 방법 등 실용적인 UEFI 부트 관리 가이드 제공
efibootmgr -c -d /dev/sda -p 7 -L <label> -l \EFI\<label>\grubx64.efi
Newly added entry will be the first in boot order.


=== Deleteing Boot Entry ===
* Goal: Linux 시스템의 UEFI 부트 설정을 효율적으로 관리
To remove the respective boot entry, run:
* Scope: efibootmgr 설치, 설정 확인, 부트 순서 변경, 부트 엔티 관리
sudo efibootmgr -b <bootnum> -B
* Non-goals: UEFI firmware 상세 설명, [[BIOS]] 설정 가이드
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 ===
---
A boot entry followed by an asterisk indicates that it’s active from the output of efibootmgr command. Otherwise it’s inactive.


== Key Concepts ==


To set a boot entry active, run:
{| class="wikitable"
sudo efibootmgr -b <bootnum> -a
! Concept
To set a boot entry inactive, run:
! Description
sudo efibootmgr -b <bootnum> -A
! Related
We can use systemd service to automatically disable target boot entry.
|-
  sudo nano /etc/systemd/system/disable-boot-entry.service
| UEFI
Add the following line in this file.
| BIOS의 차세대 대체 표준, 그래픽 인터페이스 지원
[Unit]
| [[BIOS/UEFI]]
  Description=disable Linux Mint Boot Entry
|-
  After=multi-user.target
| Boot Order
| 부트 장치 우선순위 (Boot0001, Boot0002 등)
[Service]
| [[Efi shell tips and tricks]]
  Type=oneshot
|-
  ExecStart=/bin/bash -c '/usr/bin/efibootmgr -b <Target boot entry number>  -A'
| Boot Entry
| 개별 부트 옵션 (OS, Shell, USB 등)
[Install]
| [[UEFI Boot]]
  WantedBy=multi-user.target
|-
| GPT
| EFI 시스템 파티션이 위치한 디스크 파티션 테이블
| [[Linux File System Types]]
|}
 
---
 
== Architecture ==
 
UEFI firmware는 부트 매니저를 NVRAM에 저장하고, efibootmgr은 이 NVRAM 설정을 명령줄에서 읽기/쓰기하는 인터페이스 제공.
 
* BootCurrent: 현재 부팅된 부트 엔트리
* BootOrder: 부트 우선순위 목록
* BootXXXX: 개별 부트 엔트리 (X는 4자리 hex)
 
---
 
== Workflow ==
 
# efibootmgr 설치 (apt install efibootmgr)
# 현재 설정 확인 (efibootmgr -v)
# 부트 순서 변경 (efibootmgr -o)
# 부트 엔티 추가/삭제 (efibootmgr -c/-B)
# 변경 사항 확인 (efibootmgr -v 재실행)
 
---
 
== Configuration ==
 
=== 설치 (Debian/Ubuntu/Linux Mint) ===
 
<syntaxhighlight lang="bash">
sudo apt install efibootmgr
</syntaxhighlight>
 
=== 현재 설정 확인 ===
 
<syntaxhighlight lang="bash">
# 기본 출력
$ efibootmgr
 
# 상세 출력 (-v 옵션)
$ efibootmgr -v
</syntaxhighlight>
 
=== 부트 순서 변경 ===
 
<syntaxhighlight lang="bash">
# 현재 순서: 0002,0009,0003,0001,0007,0004
# 0009을 첫 번째로 이동:
sudo efibootmgr -o 0009,0002,0003,0001,0007,0004
</syntaxhighlight>
 
---
 
== Examples ==
 
=== efibootmgr 출력 예시 ===
 
<syntaxhighlight lang="text">
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
</syntaxhighlight>
 
=== 상세 출력 예시 (-v 옵션) ===
 
<syntaxhighlight lang="text">
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
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
</syntaxhighlight>
 
---
 
== Best Practices ==
 
* 부트 순서 변경 전 현재 순서 반드시 백업 (efibootmgr 출력 저장)
* -v 옵션으로 상세 정보 확인 (EFI 파일 경로, 파티션 정보 포함)
* 부트 엔티 추가 시 GPT 파티션 테이블과 EFI 시스템 파티션 필수
* 잘못된 부트 순서는 시스템 부팅 실패로 이어질 수 있으므로 신중하게 변경
 
---
 
== Performance ==
 
{| class="wikitable"
! Operation
| Speed
| Notes
|-
| efibootmgr (기본)
| Instant
| NVRAM 읽기만 수행
|-
| efibootmgr -v (상세)
| Instant
| NVRAM + 디바이스 경로 해석
|-
| 부트 순서 변경
| Instant
| NVRAM 쓰기 (즉시 적용)
|}
 
---
 
== Limitations ==
 
* UEFI 모드에서만 동작 (Legacy BIOS 모드에서는 사용 불가)
* sudo 권한 필요
* 일부 플랫폼은 주소 범위 미러링 미지원 (MirrorStatus 경고)
* DesiredMirrorMemoryBelow4GB: false — 일부 플랫폼에서 제한
 
---


== References ==
== References ==
<references />
 
* [https://github.com/rhboot/efibootmgr efibootmgr GitHub]
 
---
 
== Related Pages ==
 
* [[BIOS/UEFI]]
* [[Efi shell tips and tricks]]
* [[BOOTP]]
* [[Linux]]
* [[UEFI Boot]]
 
---
 
[[Category:Linux]]
[[Category:Linux]]
 
[[Category:Guide]]
[[Category:Reference]]

Revision as of 14:51, 16 July 2026

Efibootmgr

Template:Status

Template:TOC

Overview

UEFI 부트 메뉴를 관리하는 명령줄 도구. Linux 시스템의 부트 순서, 부트 엔트리 추가/삭제/수정을 담당.

Summary

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

---

Purpose

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

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

---

Key Concepts

Concept Description Related
UEFI BIOS의 차세대 대체 표준, 그래픽 인터페이스 지원 BIOS/UEFI
Boot Order 부트 장치 우선순위 (Boot0001, Boot0002 등) Efi shell tips and tricks
Boot Entry 개별 부트 옵션 (OS, Shell, USB 등) UEFI Boot
GPT EFI 시스템 파티션이 위치한 디스크 파티션 테이블 Linux File System Types

---

Architecture

UEFI firmware는 부트 매니저를 NVRAM에 저장하고, efibootmgr은 이 NVRAM 설정을 명령줄에서 읽기/쓰기하는 인터페이스 제공.

  • BootCurrent: 현재 부팅된 부트 엔트리
  • BootOrder: 부트 우선순위 목록
  • BootXXXX: 개별 부트 엔트리 (X는 4자리 hex)

---

Workflow

  1. efibootmgr 설치 (apt install efibootmgr)
  2. 현재 설정 확인 (efibootmgr -v)
  3. 부트 순서 변경 (efibootmgr -o)
  4. 부트 엔티 추가/삭제 (efibootmgr -c/-B)
  5. 변경 사항 확인 (efibootmgr -v 재실행)

---

Configuration

설치 (Debian/Ubuntu/Linux Mint)

sudo apt install efibootmgr

현재 설정 확인

# 기본 출력
$ efibootmgr

# 상세 출력 (-v 옵션)
$ efibootmgr -v

부트 순서 변경

# 현재 순서: 0002,0009,0003,0001,0007,0004
# 0009을 첫 번째로 이동:
sudo efibootmgr -o 0009,0002,0003,0001,0007,0004

---

Examples

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

상세 출력 예시 (-v 옵션)

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
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

---

Best Practices

  • 부트 순서 변경 전 현재 순서 반드시 백업 (efibootmgr 출력 저장)
  • -v 옵션으로 상세 정보 확인 (EFI 파일 경로, 파티션 정보 포함)
  • 부트 엔티 추가 시 GPT 파티션 테이블과 EFI 시스템 파티션 필수
  • 잘못된 부트 순서는 시스템 부팅 실패로 이어질 수 있으므로 신중하게 변경

---

Performance

Operation Speed Notes
efibootmgr (기본) Instant NVRAM 읽기만 수행
efibootmgr -v (상세) Instant NVRAM + 디바이스 경로 해석
부트 순서 변경 Instant NVRAM 쓰기 (즉시 적용)

---

Limitations

  • UEFI 모드에서만 동작 (Legacy BIOS 모드에서는 사용 불가)
  • sudo 권한 필요
  • 일부 플랫폼은 주소 범위 미러링 미지원 (MirrorStatus 경고)
  • DesiredMirrorMemoryBelow4GB: false — 일부 플랫폼에서 제한

---

References

---

Related Pages

---