aboutsummaryrefslogtreecommitdiff
path: root/lib/geom/part/gpart.8
diff options
context:
space:
mode:
Diffstat (limited to 'lib/geom/part/gpart.8')
-rw-r--r--lib/geom/part/gpart.8151
1 files changed, 67 insertions, 84 deletions
diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8
index 4dbe45b9953e..fa0b247c6174 100644
--- a/lib/geom/part/gpart.8
+++ b/lib/geom/part/gpart.8
@@ -22,9 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD$
-.\"
-.Dd January 26, 2022
+.Dd July 26, 2023
.Dt GPART 8
.Os
.Sh NAME
@@ -221,7 +219,7 @@ MBR bootcode contains Volume Serial Number by default, and
.Nm
tries to preserve it when installing new bootstrap code.
This option skips preservation to help with some versions of
-.Xr boot0 8
+.Xr boot0cfg 8
that do not support Volume Serial Number.
.It Fl b Ar bootcode
Embed bootstrap code from the file
@@ -544,14 +542,16 @@ See
Several partitioning schemes are supported by the
.Nm
utility:
-.Bl -tag -width ".Cm VTOC8"
+.Bl -tag -width ".Cm BSD64"
.It Cm APM
Apple Partition Map, used by PowerPC(R) Macintosh(R) computers.
Requires the
.Cd GEOM_PART_APM
kernel option.
.It Cm BSD
-Traditional BSD disklabel, usually used to subdivide MBR partitions.
+Traditional BSD
+.Xr disklabel 8 ,
+usually used to subdivide MBR partitions.
.Po
This scheme can also be used as the sole partitioning method, without
an MBR.
@@ -564,7 +564,9 @@ Requires the
.Cm GEOM_PART_BSD
kernel option.
.It Cm BSD64
-64-bit implementation of BSD disklabel used in DragonFlyBSD to subdivide MBR
+64-bit implementation of BSD disklabel used in
+.Dx
+to subdivide MBR
or GPT partitions.
Requires the
.Cm GEOM_PART_BSD64
@@ -595,15 +597,6 @@ The
option enables backward compatibility for partition names
in the EBR scheme.
It also prevents any type of actions on such partitions.
-.It Cm VTOC8
-Sun's SMI Volume Table Of Contents, used by
-.Tn SPARC64
-and
-.Tn UltraSPARC
-computers.
-Requires the
-.Cm GEOM_PART_VTOC8
-kernel option.
.El
.Pp
See
@@ -676,36 +669,36 @@ A
partition dedicated to swap space.
The scheme-specific types are
.Qq Li "!FreeBSD-swap"
-for APM,
+for APM, and
.Qq Li "!516e7cb5-6ecf-11d6-8ff8-00022d09712b"
-for GPT, and tag 0x0901 for VTOC8.
+for GPT.
.It Cm freebsd-ufs
A
.Fx
partition that contains a UFS or UFS2 filesystem.
The scheme-specific types are
.Qq Li "!FreeBSD-UFS"
-for APM,
+for APM, and
.Qq Li "!516e7cb6-6ecf-11d6-8ff8-00022d09712b"
-for GPT, and tag 0x0902 for VTOC8.
+for GPT.
.It Cm freebsd-vinum
A
.Fx
partition that contains a Vinum volume.
The scheme-specific types are
.Qq Li "!FreeBSD-Vinum"
-for APM,
+for APM, and
.Qq Li "!516e7cb8-6ecf-11d6-8ff8-00022d09712b"
-for GPT, and tag 0x0903 for VTOC8.
+for GPT.
.It Cm freebsd-zfs
A
.Fx
partition that contains a ZFS volume.
The scheme-specific types are
.Qq Li "!FreeBSD-ZFS"
-for APM,
+for APM, and
.Qq Li "!516e7cba-6ecf-11d6-8ff8-00022d09712b"
-for GPT, and 0x0904 for VTOC8.
+for GPT.
.El
.Pp
Other symbolic names that can be used with the
@@ -770,50 +763,67 @@ See
.Sx CAVEATS
section below.
.It Cm dragonfly-label32
-A DragonFlyBSD partition subdivided into filesystems with a
+A
+.Dx
+partition subdivided into filesystems with a
.Bx
disklabel.
The scheme-specific type is
.Qq Li "!9d087404-1ca5-11dc-8817-01301bb8a9f5"
for GPT.
.It Cm dragonfly-label64
-A DragonFlyBSD partition subdivided into filesystems with a
+A
+.Dx
+partition subdivided into filesystems with a
disklabel64.
The scheme-specific type is
.Qq Li "!3d48ce54-1d16-11dc-8696-01301bb8a9f5"
for GPT.
.It Cm dragonfly-legacy
-A legacy partition type used in DragonFlyBSD.
+A legacy partition type used in
+.Dx .
The scheme-specific type is
.Qq Li "!bd215ab2-1d16-11dc-8696-01301bb8a9f5"
for GPT.
.It Cm dragonfly-ccd
-A DragonFlyBSD partition used with Concatenated Disk driver.
+A
+.Dx
+partition used with Concatenated Disk driver.
The scheme-specific type is
.Qq Li "!dbd5211b-1ca5-11dc-8817-01301bb8a9f5"
for GPT.
.It Cm dragonfly-hammer
-A DragonFlyBSD partition that contains a Hammer filesystem.
+A
+.Dx
+partition that contains a Hammer filesystem.
The scheme-specific type is
.Qq Li "!61dc63ac-6e38-11dc-8513-01301bb8a9f5"
for GPT.
.It Cm dragonfly-hammer2
-A DragonFlyBSD partition that contains a Hammer2 filesystem.
+A
+.Dx
+partition that contains a Hammer2 filesystem.
The scheme-specific type is
.Qq Li "!5cbb9ad1-862d-11dc-a94d-01301bb8a9f5"
for GPT.
.It Cm dragonfly-swap
-A DragonFlyBSD partition dedicated to swap space.
+A
+.Dx
+partition dedicated to swap space.
The scheme-specific type is
.Qq Li "!9d58fdbd-1ca5-11dc-8817-01301bb8a9f5"
for GPT.
.It Cm dragonfly-ufs
-A DragonFlyBSD partition that contains an UFS1 filesystem.
+A
+.Dx
+partition that contains an UFS1 filesystem.
The scheme-specific type is
.Qq Li "!9d94ce7c-1ca5-11dc-8817-01301bb8a9f5"
for GPT.
.It Cm dragonfly-vinum
-A DragonFlyBSD partition used with Logical Volume Manager.
+A
+.Dx
+partition used with Logical Volume Manager.
The scheme-specific type is
.Qq Li "!9dd4478f-1ca5-11dc-8817-01301bb8a9f5"
for GPT.
@@ -904,32 +914,44 @@ The scheme-specific type is
.Qq Li "!5808c8aa-7e8f-42e0-85d2-e1e90434cfb3"
for GPT.
.It Cm netbsd-ccd
-A NetBSD partition used with Concatenated Disk driver.
+A
+.Nx
+partition used with Concatenated Disk driver.
The scheme-specific type is
.Qq Li "!2db519c4-b10f-11dc-b99b-0019d1879648"
for GPT.
.It Cm netbsd-cgd
-An encrypted NetBSD partition.
+An encrypted
+.Nx
+partition.
The scheme-specific type is
.Qq Li "!2db519ec-b10f-11dc-b99b-0019d1879648"
for GPT.
.It Cm netbsd-ffs
-A NetBSD partition that contains an UFS filesystem.
+A
+.Nx
+partition that contains an UFS filesystem.
The scheme-specific type is
.Qq Li "!49f48d5a-b10e-11dc-b99b-0019d1879648"
for GPT.
.It Cm netbsd-lfs
-A NetBSD partition that contains an LFS filesystem.
+A
+.Nx
+partition that contains an LFS filesystem.
The scheme-specific type is
.Qq Li "!49f48d82-b10e-11dc-b99b-0019d1879648"
for GPT.
.It Cm netbsd-raid
-A NetBSD partition used in a software RAID configuration.
+A
+.Nx
+partition used in a software RAID configuration.
The scheme-specific type is
.Qq Li "!49f48daa-b10e-11dc-b99b-0019d1879648"
for GPT.
.It Cm netbsd-swap
-A NetBSD partition dedicated to swap space.
+A
+.Nx
+partition dedicated to swap space.
The scheme-specific type is
.Qq Li "!49f48d32-b10e-11dc-b99b-0019d1879648"
for GPT.
@@ -1163,18 +1185,6 @@ After all pools are detected,
.Pa /boot/loader
is started from the first one found set as bootable.
.Pp
-The VTOC8 scheme does not support embedding bootstrap code.
-Instead, the 8 KBytes bootstrap code image
-.Pa /boot/boot1
-should be written with the
-.Cm gpart bootcode
-command with the
-.Fl p Ar bootcode
-option to all sufficiently large VTOC8 partitions.
-To do this the
-.Fl i Ar index
-option could be omitted.
-.Pp
The APM scheme also does not support embedding bootstrap code.
Instead, the 800 KBytes bootstrap code image
.Pa /boot/boot1.hfs
@@ -1273,7 +1283,7 @@ GEOM class.
The default value is shown next to each variable.
.Bl -tag -width indent
.It Va kern.geom.part.allow_nesting : No 0
-By default, some schemes (currently BSD, BSD64 and VTOC8) do not permit
+By default, some schemes (currently BSD and BSD64) do not permit
further nested partitioning.
This variable overrides this restriction and allows arbitrary nesting (except
within partitions created at offset 0).
@@ -1396,7 +1406,7 @@ sizes of up to 256 kB.
.Pp
Finally, we create and format an 8 GB
.Cm freebsd-ufs
-partition for the root filesystem, leaving the rest of the slice free
+partition for the root filesystem, leaving the rest of the device free
for additional filesystems:
.Bd -literal -offset indent
/sbin/gpart add -s 8G -t freebsd-ufs ada0
@@ -1410,12 +1420,12 @@ using a traditional
.Bx
disklabel.
.Pp
-First, we create the partition table and a single 64 GB partition,
-then we mark that partition active (bootable) and install the
-first-stage boot loader:
+First, we create the partition table as well as a single partition 64 GB in
+size and an alignment of 4 kB, then we mark that partition active (bootable)
+and install the first-stage boot loader:
.Bd -literal -offset indent
/sbin/gpart create -s MBR ada0
-/sbin/gpart add -t freebsd -s 64G ada0
+/sbin/gpart add -t freebsd -s 64G -a 4k ada0
/sbin/gpart set -a active -i 1 ada0
/sbin/gpart bootcode -b /boot/boot0 ada0
.Ed
@@ -1442,32 +1452,6 @@ label:
.Bd -literal -offset indent
/sbin/gpart bootcode -b /boot/boot ada0s1
.Ed
-.Ss VTOC8
-.Pp
-Create a VTOC8 scheme on
-.Pa da0 :
-.Bd -literal -offset indent
-/sbin/gpart create -s VTOC8 da0
-.Ed
-.Pp
-Create a 512MB-sized
-.Cm freebsd-ufs
-partition to contain a UFS filesystem from which the system can boot.
-.Bd -literal -offset indent
-/sbin/gpart add -s 512M -t freebsd-ufs da0
-.Ed
-.Pp
-Create a 15GB-sized
-.Cm freebsd-ufs
-partition to contain a UFS filesystem and aligned on 4KB boundaries:
-.Bd -literal -offset indent
-/sbin/gpart add -s 15G -t freebsd-ufs -a 4k da0
-.Ed
-.Pp
-After creating all required partitions, embed bootstrap code into them:
-.Bd -literal -offset indent
-/sbin/gpart bootcode -p /boot/boot1 da0
-.Ed
.Ss Deleting Partitions and Destroying the Partitioning Scheme
If a
.Em "Device busy"
@@ -1496,7 +1480,6 @@ This is equivalent to the previous example:
/sbin/gpart destroy -F da0
.Ed
.Ss Backup and Restore
-.Pp
Create a backup of the partition table from
.Pa da0 :
.Bd -literal -offset indent