From f39dcb8b690765dfcdf2a642c8a11e1ef70341cc Mon Sep 17 00:00:00 2001 From: delphij Date: Thu, 9 Oct 2008 06:23:04 +0000 Subject: =?UTF-8?q?Add=20some=20examples=20to=20demostrate=20gpart(8).=20-?= =?UTF-8?q?-=E6=AD=A4=E8=A1=8C=E5=8F=8A=E4=BB=A5=E4=B8=8B=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=B0=86=E4=BC=9A=E8=A2=AB=E5=BF=BD=E7=95=A5--=20>=20?= =?UTF-8?q?Description=20of=20fields=20to=20fill=20in=20above:=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=2076=20columns?= =?UTF-8?q?=20--|=20>=20PR:=20=20=20=20=20=20=20=20=20=20=20=20If=20a=20GN?= =?UTF-8?q?ATS=20PR=20is=20affected=20by=20the=20change.=20>=20Submitted?= =?UTF-8?q?=20by:=20=20If=20someone=20else=20sent=20in=20the=20change.=20>?= =?UTF-8?q?=20Reviewed=20by:=20=20=20If=20someone=20else=20reviewed=20your?= =?UTF-8?q?=20modification.=20>=20Approved=20by:=20=20=20If=20you=20needed?= =?UTF-8?q?=20approval=20for=20this=20commit.=20>=20Obtained=20from:=20If?= =?UTF-8?q?=20the=20change=20is=20from=20a=20third=20party.=20>=20MFC=20af?= =?UTF-8?q?ter:=20=20=20=20=20N=20[day[s]|week[s]|month[s]].=20=20Request?= =?UTF-8?q?=20a=20reminder=20email.=20>=20Security:=20=20=20=20=20=20Vulne?= =?UTF-8?q?rability=20reference=20(one=20per=20line)=20or=20description.?= =?UTF-8?q?=20>=20Empty=20fields=20above=20will=20be=20automatically=20rem?= =?UTF-8?q?oved.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M gpart.8 --- sbin/geom/class/part/gpart.8 | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'sbin/geom') 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 , -- cgit v1.1