Difference between revisions of "UEFI"
(Created page with "{{welcome}} ==Introduction== UEFI -- Unified Extensible Firmware Interface bootstrapping procedures ==DESCRIPTION== The UEFI Unified Extensible Firmware Interface provides...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{welcome}} | {{welcome}} | ||
+ | {{Navbar GhostBSD Boot Process}} | ||
+ | |||
==Introduction== | ==Introduction== | ||
Line 5: | Line 7: | ||
UEFI -- Unified Extensible Firmware Interface bootstrapping procedures | UEFI -- Unified Extensible Firmware Interface bootstrapping procedures | ||
− | == | + | ==Description== |
− | The UEFI Unified Extensible Firmware Interface provides boot- and runtime services to operating systems. UEFI is a replacement for the legacy BIOS on the i386 and amd64 CPU architectures, and is also used on arm, arm64 and ia64. | + | The [https://www.freebsd.org/cgi/man.cgi?query=uefi&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports UEFI] Unified Extensible Firmware Interface provides boot- and runtime services to operating systems. UEFI is a replacement for the legacy BIOS on the i386 and amd64 CPU architectures, and is also used on arm, arm64 and ia64. |
The UEFI specification is the successor to the Extensible Firmware Interface (EFI) specification. The terms are often used interchangeably. | The UEFI specification is the successor to the Extensible Firmware Interface (EFI) specification. The terms are often used interchangeably. | ||
− | The UEFI boot process loads system bootstrap code located in an EFI System Partition (ESP). The ESP is a GPT or MBR partition with a specific identifier that contains an msdosfs(5) FAT file system with a specified file hierarchy. | + | The UEFI boot process loads system bootstrap code located in an EFI System Partition (ESP). The ESP is a GPT or MBR partition with a specific identifier that contains an [https://www.freebsd.org/cgi/man.cgi?query=msdosfs&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports msdosfs(5)] FAT file system with a specified file hierarchy. |
{|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px" | {|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px" | ||
Line 23: | Line 25: | ||
|} | |} | ||
− | The UEFI boot process proceeds as follows | + | The UEFI boot process proceeds as follows<br/> |
+ | |||
1. UEFI firmware runs at power up and searches for an OS loader in the EFI system partition. The path to the loader may beset by an EFI environment variable. If not set, an architecture-specific default is used. | 1. UEFI firmware runs at power up and searches for an OS loader in the EFI system partition. The path to the loader may beset by an EFI environment variable. If not set, an architecture-specific default is used. | ||
Line 37: | Line 40: | ||
The default UEFI boot configuration for FreeBSD installs boot1.efi in the default path. | The default UEFI boot configuration for FreeBSD installs boot1.efi in the default path. | ||
+ | |||
2. boot1.efi reads boot configuration from /boot.config or /boot/config. Unlike other first-stage boot loaders, | 2. boot1.efi reads boot configuration from /boot.config or /boot/config. Unlike other first-stage boot loaders, | ||
boot1.efi passes the configuration to the next stage boot loader and does not itself act on the contents of the file. | boot1.efi passes the configuration to the next stage boot loader and does not itself act on the contents of the file. | ||
+ | |||
3. boot1.efi searches partitions of type freebsd-ufs and freebsd-zfs for loader.efi. The search begins with partitions | 3. boot1.efi searches partitions of type freebsd-ufs and freebsd-zfs for loader.efi. The search begins with partitions | ||
on the device from which boot1.efi was loaded, and continues with other available partitions. If both freebsd-ufs and | on the device from which boot1.efi was loaded, and continues with other available partitions. If both freebsd-ufs and | ||
freebsd-zfs partitions exist on the same device the freebsd-zfs partition is preferred. boot1.efi then loads and | freebsd-zfs partitions exist on the same device the freebsd-zfs partition is preferred. boot1.efi then loads and | ||
executes loader.efi. | executes loader.efi. | ||
− | |||
− | The vt(4) system console is automatically selected when booting via UEFI. | + | 4. loader.efi loads and boots the kernel, as described in [https://www.freebsd.org/cgi/man.cgi?query=loader&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports loader(8)]. |
+ | |||
+ | The [https://www.freebsd.org/cgi/man.cgi?query=vt&sektion=4&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports vt(4)] system console is automatically selected when booting via UEFI. | ||
FILES | FILES | ||
{|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px" | {|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px" | ||
|- | |- | ||
− | ! scope="col" style="width: 100px;"|''' | + | ! scope="col" style="width: 100px;"|'''File''' |
− | ! scope="col" style="width: 350px;"|''' | + | ! scope="col" style="width: 350px;"|'''Description''' |
|- | |- | ||
|/boot/boot1.efi|| First stage UEFI bootstrap | |/boot/boot1.efi|| First stage UEFI bootstrap | ||
|- | |- | ||
− | |/boot/boot1.efifat||msdosfs(5) FAT file system image containing boot1.efi for use by bsdinstall(8) and the bootcode argument to gpart(8). | + | |/boot/boot1.efifat||[https://www.freebsd.org/cgi/man.cgi?query=msdosfs&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports msdosfs(5)] FAT file system image containing boot1.efi for use by [https://www.freebsd.org/cgi/man.cgi?query=bsdinstall&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports bsdinstall(8)] and the bootcode argument to [https://www.freebsd.org/cgi/man.cgi?query=gpart&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports gpart(8)]. |
|- | |- | ||
|/boot/loader.efi||Final stage bootstrap | |/boot/loader.efi||Final stage bootstrap | ||
Line 65: | Line 71: | ||
+ | The next steps are described as [[GhostBSD Boot Process#Bootstrap Process|Bootstrap Process]]. | ||
+ | ==Additional information about UEFI== | ||
− | + | [https://wiki.freebsd.org/UEFI?highlight=%28%5CbCategoryProject%5Cb%29 FreeBSD about UEFI] | |
− | + | ||
Latest revision as of 06:52, 5 October 2020
Welcome to UEFI. |
GhostBSD Boot Process | |||
---|---|---|---|
MBR and GPT | UEFI | OpenRC | /boot/ |
Back to the System |
Introduction[edit]
UEFI -- Unified Extensible Firmware Interface bootstrapping procedures
Description[edit]
The UEFI Unified Extensible Firmware Interface provides boot- and runtime services to operating systems. UEFI is a replacement for the legacy BIOS on the i386 and amd64 CPU architectures, and is also used on arm, arm64 and ia64.
The UEFI specification is the successor to the Extensible Firmware Interface (EFI) specification. The terms are often used interchangeably.
The UEFI boot process loads system bootstrap code located in an EFI System Partition (ESP). The ESP is a GPT or MBR partition with a specific identifier that contains an msdosfs(5) FAT file system with a specified file hierarchy.
Partition Scheme | ESP Identifier |
---|---|
GPT | C12A7328-F81F-11D2-BA4B-00A0C93EC93B |
MBR | 0xEF |
The UEFI boot process proceeds as follows
1. UEFI firmware runs at power up and searches for an OS loader in the EFI system partition. The path to the loader may beset by an EFI environment variable. If not set, an architecture-specific default is used.
Architecture | Default Path |
---|---|
amd64 | /EFI/BOOT/BOOTX64.EFI |
arm64 | /EFI/BOOT/BOOTAA64.EFI |
The default UEFI boot configuration for FreeBSD installs boot1.efi in the default path.
2. boot1.efi reads boot configuration from /boot.config or /boot/config. Unlike other first-stage boot loaders, boot1.efi passes the configuration to the next stage boot loader and does not itself act on the contents of the file.
3. boot1.efi searches partitions of type freebsd-ufs and freebsd-zfs for loader.efi. The search begins with partitions on the device from which boot1.efi was loaded, and continues with other available partitions. If both freebsd-ufs and freebsd-zfs partitions exist on the same device the freebsd-zfs partition is preferred. boot1.efi then loads and executes loader.efi.
4. loader.efi loads and boots the kernel, as described in loader(8).
The vt(4) system console is automatically selected when booting via UEFI.
FILES
File | Description |
---|---|
/boot/boot1.efi | First stage UEFI bootstrap |
/boot/boot1.efifat | msdosfs(5) FAT file system image containing boot1.efi for use by bsdinstall(8) and the bootcode argument to gpart(8). |
/boot/loader.efi | Final stage bootstrap |
/boot/kernel/kernel | default kernel |
/boot/kernel.old/kernel | typical non-default kernel (optional) |
The next steps are described as Bootstrap Process.