This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Efibootmgr

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Efibootmgr and the translation is 67% complete.
Outdated translations are marked like this.
Resources

efibootmgr 프로그램은 시스템의 UEFI 펌웨어와 함께 동작합니다. 리눅스(또는 기타 EFI 운영체제)로 부팅할 수 있는 항목을 만들고 관리하는 목적으로 EFI 설정을 다루는 인기있는 도구입니다.

sys-boot/efibootmgr 프로그램은 부트로더가 아닙니다. 부트로더로 동작하는 시스템의 EFI 펌웨어와 함께 동작하는 도구입니다. efibootmgr 을 활용하면 부팅 항목을 만들고, 뒤섞고, 편집하고, 제거할 수 있습니다.

설치

커널

CONFIG_EFI_VARS support needs to be enabled:

커널 Enable EFI variable support
Firmware Drivers  --->
   EFI (Extensible Firmware Interface) Support  --->
       <*> EFI Variable Support via sysfs

Emerge

sys-boot/efibootmgr 꾸러미는 어떤 USE 플래그도 필요 없습니다. 단지 설치하기만 하면 됩니다:

root #emerge --ask sys-boot/efibootmgr

설정

EFI 변수

efibootmgr을 제대로 활용하려면, EFI 변수 파일 시스템에 접근할 수 있어야합니다. EFI 모드로 시스템을 부팅하지(그리고 펌웨어 MBR 모드는 아님) 않으면 EFI 변수 자체에 접근할 수 없습니다. 시스템이 MBR 모드면, 다시 부팅하고 시스템 펌웨어에 EFI 모드로 부팅하는데 필요한 조치를 취하십시오. 보통 펌웨어 설정 옵션을 바꾸거나 시스템 부팅 메뉴의 EFI 부팅 항목을 선택하시면 됩니다.

When the system is in EFI mode, run the following command to check for the existence of efivarfs:

root #mount | grep efivars
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)

마운트하지 않았다면(sysfs 초기화 스크립트로 마운드해야함), 다음 명령으로 직접 마운트할 수 있습니다:

root #mount -t efivarfs efivarfs /sys/firmware/efi/efivars

See OpenRC-0.28 news.

Preconditions

If an EFI System Partition (ESP) does not exist, one needs to be created, see EFI System Partition

Usage

Listing boot entries

--verbose (-v) 옵션으로 현재 부팅 항목을 보려면:

root #efibootmgr -v
BootCurrent: 0002
Timeout: 3 seconds
BootOrder: 0003,0003,0002,0000,0004
Boot0000* CD/DVD Drive  BIOS(3,0,00)
Boot0001* Hard Drive    BIOS(2,0,00)
Boot0002* Gentoo        HD(1,800,61800,6d98f360-cb3e-4727-8fed-5ce0c040365d)File(\EFI\boot\bootx64.efi)
Boot0003* Hard Drive    BIOS(2,0,00)P0: ST1500DM003-9YN16G

Creating a boot entry

부팅 항목을 만들 때 efibootmgr에 전달할 몇가지 매개 변수가 있습니다:

  • --create (-c) to create a new entry;
  • --part (-p) followed by the partition number on which the EFI System Partition is hosted;
  • --disk (-d) followed by the disk on which the EFI System Partition is hosted;
  • --label (-L) followed by the label to use as the boot entry;
  • --loader (-l) followed by the path of the EFI image to boot
중요
부팅할 EFI 이미지 경로 구분시 /(슬래시)가 아닌 \(역슬래시) 를 사용해야합니다.

예를 들자면:

root #efibootmgr -c -d /dev/sda -p 2 -L "Gentoo" -l "\efi\boot\bootx64.efi"

Optionally, additional kernels can be installed and made known to the UEFI firmware. This is especially useful when wanting to test more kernels or to dual-boot with another operating system. These will be shown in the boot selection prompt, normally after a keyboard hotkey is pressed at the right time during system initialization. The latest added entry always gets highest boot priority, so it will be default. If the hotkey combination is unknown, search for official documentation from the computer manufacturer. This information is usually not difficult to find.

Deleting a boot entry

항목을 삭제하기 전에 항목의 ID를 우선 확인하십시오.

아래에서 나타난 바와 같이 젠투 항목을 삭제(Boot0002가 식별자였음), efibootmgr에게 --bootnum (-b) 매개변수와 식별 번호를, 항목을 삭제하는 --delete-bootnum (-B) 매개 변수로, 2번 ID를 지닌 항목을 삭제하라고 요청하십시오.

root #efibootmgr -b 2 -B

제거

Unmerge

root #emerge --ask --depclean sys-boot/efibootmgr

추가 참조