Expand description of how gptboot and gptzfsboot choose a partition for
booting. Reviewed by: ae MFC after: 1 week
This commit is contained in:
parent
a89a2c8ba4
commit
0e0d13226c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245910
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd January 3, 2013
|
.Dd January 25, 2013
|
||||||
.Dt GPART 8
|
.Dt GPART 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -807,34 +807,51 @@ Both types of bootstrap code are used to boot from the GUID Partition Table.
|
|||||||
First, a protective MBR is embedded into the first disk sector from the
|
First, a protective MBR is embedded into the first disk sector from the
|
||||||
.Pa /boot/pmbr
|
.Pa /boot/pmbr
|
||||||
image.
|
image.
|
||||||
It searches the GPT
|
It searches through the GPT for a
|
||||||
.Cm freebsd-boot
|
.Cm freebsd-boot
|
||||||
partition (see the
|
partition (see the
|
||||||
.Sx "PARTITION TYPES"
|
.Sx "PARTITION TYPES"
|
||||||
section) in the GPT and runs the next bootstrap stage from it.
|
section) and runs the next bootstrap stage from it.
|
||||||
The
|
The
|
||||||
.Cm freebsd-boot
|
.Cm freebsd-boot
|
||||||
partition should be smaller than 545 KB.
|
partition should be smaller than 545 KB.
|
||||||
|
It can be located either before or after other
|
||||||
|
.Fx
|
||||||
|
partitions on the disk.
|
||||||
There are two variants of bootstrap code to write to this partition:
|
There are two variants of bootstrap code to write to this partition:
|
||||||
.Pa /boot/gptboot
|
.Pa /boot/gptboot
|
||||||
and
|
and
|
||||||
.Pa /boot/gptzfsboot .
|
.Pa /boot/gptzfsboot .
|
||||||
.Pa /boot/gptboot
|
.Pa /boot/gptboot
|
||||||
is used to boot from UFS.
|
is used to boot from UFS.
|
||||||
It searches
|
It searches through
|
||||||
.Cm freebsd-ufs
|
.Cm freebsd-ufs
|
||||||
GPT partitions and starts
|
partitions in the GPT and boots from the first one with the
|
||||||
|
.Cm bootonce
|
||||||
|
attribute set.
|
||||||
|
If that attribute is not found,
|
||||||
|
.Pa /boot/gptboot
|
||||||
|
boots from the first
|
||||||
|
.Cm freebsd-ufs
|
||||||
|
partition with the
|
||||||
|
.Cm bootme
|
||||||
|
attribute set.
|
||||||
|
If neither attribute is found,
|
||||||
|
.Pa /boot/gptboot
|
||||||
|
boots from the first
|
||||||
|
.Cm freebsd-ufs
|
||||||
|
partition.
|
||||||
.Pa /boot/loader
|
.Pa /boot/loader
|
||||||
.Pq the third bootstrap stage
|
.Pq the third bootstrap stage
|
||||||
if found.
|
is loaded from the first partition that matches these conditions.
|
||||||
The
|
|
||||||
.Pa /boot/gptzfsboot
|
.Pa /boot/gptzfsboot
|
||||||
is used to boot from ZFS.
|
is used to boot from ZFS.
|
||||||
It searches
|
It searches through the GPT for
|
||||||
.Cm freebsd-zfs
|
.Cm freebsd-zfs
|
||||||
GPT partitions and starts
|
partitions, trying to detect ZFS pools.
|
||||||
|
After all pools are detected,
|
||||||
.Pa /boot/zfsloader
|
.Pa /boot/zfsloader
|
||||||
if found.
|
is started from the first one found.
|
||||||
.Pp
|
.Pp
|
||||||
The VTOC8 scheme does not support embedding bootstrap code.
|
The VTOC8 scheme does not support embedding bootstrap code.
|
||||||
Instead, the 8 KBytes bootstrap code image
|
Instead, the 8 KBytes bootstrap code image
|
||||||
@ -945,7 +962,7 @@ The GEOM PART class can detect the same partition table visible through
|
|||||||
different GEOM providers, and some of them will be marked as corrupt.
|
different GEOM providers, and some of them will be marked as corrupt.
|
||||||
Be careful when choosing a provider for recovery.
|
Be careful when choosing a provider for recovery.
|
||||||
If you choose incorrectly you can destroy the metadata of another GEOM class,
|
If you choose incorrectly you can destroy the metadata of another GEOM class,
|
||||||
e.g.\& GEOM MIRROR or GEOM LABEL.
|
e.g.,\& GEOM MIRROR or GEOM LABEL.
|
||||||
.Sh SYSCTL VARIABLES
|
.Sh SYSCTL VARIABLES
|
||||||
The following
|
The following
|
||||||
.Xr sysctl 8
|
.Xr sysctl 8
|
||||||
|
Loading…
Reference in New Issue
Block a user