summaryrefslogtreecommitdiffstats
path: root/sbin/geom
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-10-09 06:23:04 +0000
committerdelphij <delphij@FreeBSD.org>2008-10-09 06:23:04 +0000
commitf39dcb8b690765dfcdf2a642c8a11e1ef70341cc (patch)
treef4b91cdc8cfdb3e1a74284b95069bb1802953051 /sbin/geom
parentaf2adb6117206edd386ab955534cfa57b644adb1 (diff)
downloadFreeBSD-src-f39dcb8b690765dfcdf2a642c8a11e1ef70341cc.zip
FreeBSD-src-f39dcb8b690765dfcdf2a642c8a11e1ef70341cc.tar.gz
Add some examples to demostrate gpart(8).
--此行及以下内容将会被忽略-- > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M gpart.8
Diffstat (limited to 'sbin/geom')
-rw-r--r--sbin/geom/class/part/gpart.837
1 files changed, 36 insertions, 1 deletions
diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8
index 3506334..f972040 100644
--- a/sbin/geom/class/part/gpart.8
+++ b/sbin/geom/class/part/gpart.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd Jun 17, 2008
+.Dd Oct 9, 2008
.Dt GPART 8
.Os
.Sh NAME
@@ -404,6 +404,41 @@ action or reverted with the
action.
.Sh EXIT STATUS
Exit status is 0 on success, and 1 if the command fails.
+.Sh EXAMPLES
+Create GPT scheme on
+.Pa ad0 .
+.Bd -literal -offset indent
+/sbin/gpart create -s GPT ad0
+.Ed
+.Pp
+Embed GPT bootstrap code into protective MBR.
+.Bd -literal -offset indent
+/sbin/gpart bootcode -b /boot/pmbr ad0
+.Ed
+.Pp
+Create a dedicated
+.Pa freebsd-boot
+partition that can boot FreeBSD from a
+.Pa freebsd-ufs
+partition, and install bootstrap code into it.
+This partition must be larger than
+.Pa /boot/gptboot ,
+or the GPT boot you are willing to write,
+a size of 15 blocks (7680 bytes) would be sufficient for
+booting from UFS, but let's use 128 blocks (64 KB) here in
+this example, in order to reserve some space for potential
+future need (e.g. from a ZFS partition).
+.Bd -literal -offset indent
+/sbin/gpart add -b 34 -s 128 -t freebsd-boot ad0
+/sbin/gpart bootcode -p /boot/gptboot -i 1 ad0
+.Ed
+.Pp
+Create a 512MB-sized
+.Pa freebsd-ufs
+partition that would contain UFS where the system boot from.
+.Bd -literal -offset indent
+/sbin/gpart add -b 162 -s 1048576 -t freebsd-ufs ad0
+.Ed
.Sh SEE ALSO
.Xr geom 4 ,
.Xr geom 8 ,
OpenPOWER on IntegriCloud