xref: /freebsd/share/man/man8/uefi.8 (revision 71de598c86c9676f0a430c85488dd2b800c63958)
14bf111c3SEd Maste.\" Copyright (c) 2014 The FreeBSD Foundation
24bf111c3SEd Maste.\" All rights reserved.
34bf111c3SEd Maste.\"
44bf111c3SEd Maste.\" Redistribution and use in source and binary forms, with or without
54bf111c3SEd Maste.\" modification, are permitted provided that the following conditions
64bf111c3SEd Maste.\" are met:
74bf111c3SEd Maste.\" 1. Redistributions of source code must retain the above copyright
84bf111c3SEd Maste.\"    notice, this list of conditions and the following disclaimer.
94bf111c3SEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright
104bf111c3SEd Maste.\"    notice, this list of conditions and the following disclaimer in the
114bf111c3SEd Maste.\"    documentation and/or other materials provided with the distribution.
124bf111c3SEd Maste.\"
134bf111c3SEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
144bf111c3SEd Maste.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
154bf111c3SEd Maste.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
164bf111c3SEd Maste.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
174bf111c3SEd Maste.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
184bf111c3SEd Maste.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
194bf111c3SEd Maste.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
204bf111c3SEd Maste.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
214bf111c3SEd Maste.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
224bf111c3SEd Maste.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
234bf111c3SEd Maste.\" SUCH DAMAGE.
244bf111c3SEd Maste.\"
254bf111c3SEd Maste.\" $FreeBSD$
264bf111c3SEd Maste.\"
27*71de598cSEd Maste.Dd February 11, 2016
284bf111c3SEd Maste.Dt UEFI 8
294bf111c3SEd Maste.Os
304bf111c3SEd Maste.Sh NAME
314bf111c3SEd Maste.Nm UEFI
324bf111c3SEd Maste.Nd Unified Extensible Firmware Interface bootstrapping procedures
334bf111c3SEd Maste.Sh DESCRIPTION
344bf111c3SEd MasteThe
354bf111c3SEd Maste.Nm
364bf111c3SEd MasteUnified Extensible Firmware Interface provides boot- and run-time services
37a0dcb24dSEd Masteto operating systems.
384bf111c3SEd Maste.Nm
394bf111c3SEd Masteis a replacement for the legacy BIOS on the i386 and amd64 CPU architectures,
404bf111c3SEd Masteand is also used on arm64 and ia64.
414bf111c3SEd Maste.Pp
424bf111c3SEd MasteThe
434bf111c3SEd Maste.Nm
444bf111c3SEd Masteboot process loads system bootstrap code located in an EFI System Partition
454bf111c3SEd Maste(ESP).
46a0dcb24dSEd MasteThe ESP is a GPT or MBR partition with a specific identifier that contains an
474bf111c3SEd Maste.Xr msdosfs 5
484bf111c3SEd MasteFAT file system with a specified file hierarchy.
494bf111c3SEd Maste.Bl -column -offset indent ".Sy Partition Scheme" ".Sy ESP Identifier"
504bf111c3SEd Maste.It Sy "Partition Scheme" Ta Sy "ESP Identifier"
514bf111c3SEd Maste.It GPT Ta C12A7328-F81F-11D2-BA4B-00A0C93EC93B
524bf111c3SEd Maste.It MBR Ta 0xEF
534bf111c3SEd Maste.El
544bf111c3SEd Maste.Pp
554bf111c3SEd MasteThe
564bf111c3SEd Maste.Nm
574bf111c3SEd Masteboot process proceeds as follows:
584bf111c3SEd Maste.Bl -enum -offset indent -compact
594bf111c3SEd Maste.It
604bf111c3SEd Maste.Nm
614bf111c3SEd Mastefirmware runs at power up and searches for an OS loader in the EFI system
624bf111c3SEd Mastepartition.
634bf111c3SEd MasteThe path to the loader may be set by an EFI environment variable.
644bf111c3SEd MasteIf not set, the default is
654bf111c3SEd Maste.Pa /EFI/BOOT/BOOTX64.EFI .
664bf111c3SEd MasteThe default
674bf111c3SEd Maste.Nm
684bf111c3SEd Masteboot configuration for
694bf111c3SEd Maste.Fx
704bf111c3SEd Masteinstalls
714bf111c3SEd Maste.Pa boot1.efi
724bf111c3SEd Masteas
734bf111c3SEd Maste.Pa /EFI/BOOT/BOOTX64.EFI .
744bf111c3SEd Maste.It
754bf111c3SEd Maste.Pa boot1.efi
76*71de598cSEd Mastereads boot configuration from
77*71de598cSEd Maste.Pa /boot.config
78*71de598cSEd Masteor
79*71de598cSEd Maste.Pa /boot/config .
80*71de598cSEd MasteUnlike other first-stage boot loaders,
81*71de598cSEd Maste.Pa boot1.efi
82*71de598cSEd Mastepasses the configuration to the next stage boot loader and does not
83*71de598cSEd Masteitself act on the contents of the file.
84*71de598cSEd Maste.It
85*71de598cSEd Maste.Pa boot1.efi
864bf111c3SEd Mastelocates the first partition with the type
874bf111c3SEd Maste.Li freebsd-ufs ,
884bf111c3SEd Masteand from it loads
894bf111c3SEd Maste.Pa loader.efi .
904bf111c3SEd Maste.It
914bf111c3SEd Maste.Pa loader.efi
924bf111c3SEd Masteloads and boots the kernel, as described in
934bf111c3SEd Maste.Xr loader 8 .
944bf111c3SEd Maste.El
954bf111c3SEd Maste.Pp
964bf111c3SEd MasteThe
974bf111c3SEd Maste.Xr vt 4
984bf111c3SEd Mastesystem console is automatically selected when booting via
994bf111c3SEd Maste.Nm .
1004bf111c3SEd Maste.Sh FILES
1014bf111c3SEd Maste.Bl -tag -width /boot/loader -compact
1024bf111c3SEd Maste.It Pa /boot/boot1.efi
1034bf111c3SEd MasteFirst stage
1044bf111c3SEd Maste.Nm
1054bf111c3SEd Mastebootstrap
1064bf111c3SEd Maste.It Pa /boot/boot1.efifat
1074bf111c3SEd Maste.Xr msdosfs 5
1084bf111c3SEd MasteFAT file system image containing
1094bf111c3SEd Maste.Pa boot1.efi
1104bf111c3SEd Mastefor use by
1114bf111c3SEd Maste.Xr bsdinstall 8
1124bf111c3SEd Masteand the
1134bf111c3SEd Maste.Ar bootcode
1144bf111c3SEd Masteargument to
1154bf111c3SEd Maste.Xr gpart 8 .
1164bf111c3SEd Maste.It Pa /boot/loader.efi
1174bf111c3SEd MasteFinal stage bootstrap
1184bf111c3SEd Maste.It Pa /boot/kernel/kernel
1194bf111c3SEd Mastedefault kernel
1204bf111c3SEd Maste.It Pa /boot/kernel.old/kernel
1214bf111c3SEd Mastetypical non-default kernel (optional)
1224bf111c3SEd Maste.El
1234bf111c3SEd Maste.Sh SEE ALSO
1244bf111c3SEd Maste.Xr vt 4 ,
125*71de598cSEd Maste.Xr boot.config 5 ,
1264bf111c3SEd Maste.Xr msdosfs 5 ,
1274bf111c3SEd Maste.Xr boot 8 ,
128d66023a0SEdward Tomasz Napierala.Xr gpart 8 ,
129d66023a0SEdward Tomasz Napierala.Xr uefisign 8
1304bf111c3SEd Maste.Sh HISTORY
1314bf111c3SEd Maste.Nm
1324bf111c3SEd Masteboot support first appeared in
1334bf111c3SEd Maste.Fx 10.1 .
1344bf111c3SEd Maste.Sh AUTHORS
1354bf111c3SEd Maste.An -nosplit
1364bf111c3SEd Maste.Nm
1374bf111c3SEd Masteboot support was developed by
1384bf111c3SEd Maste.An Benno Rice Aq Mt benno@FreeBSD.org ,
139548afe2bSChristian Brueffer.An \&Ed Maste Aq Mt emaste@FreeBSD.org ,
1404bf111c3SEd Masteand
1414bf111c3SEd Maste.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org .
1424bf111c3SEd MasteThe
1434bf111c3SEd Maste.Fx
1444bf111c3SEd MasteFoundation sponsored portions of the work.
145a0dcb24dSEd Maste.Sh CAVEATS
146a0dcb24dSEd MasteEFI environment variables are not supported by
147a0dcb24dSEd Maste.Xr loader 8
148a0dcb24dSEd Masteor the kernel.
149a0dcb24dSEd Maste.Pp
150a0dcb24dSEd Maste.Pa boot1.efi
151a0dcb24dSEd Masteloads
152a0dcb24dSEd Maste.Pa loader.efi
153a0dcb24dSEd Mastefrom the first FreeBSD-UFS file system it locates, even if it is on a
154a0dcb24dSEd Mastedifferent disk.
155a0dcb24dSEd Maste.Pp
156a0dcb24dSEd Maste.Pa boot1.efi
157a0dcb24dSEd Mastecannot load
158a0dcb24dSEd Maste.Pa loader.efi
159a0dcb24dSEd Mastefrom a
160a0dcb24dSEd Maste.Xr ZFS 8
161a0dcb24dSEd Mastefile system.
162a0dcb24dSEd MasteAs a result,
163a0dcb24dSEd Maste.Nm
164a0dcb24dSEd Mastedoes not support a typical root file system on ZFS configuration.
165