diff options
author | Andrey V. Elsukov <ae@FreeBSD.org> | 2011-05-27 15:29:39 +0000 |
---|---|---|
committer | Andrey V. Elsukov <ae@FreeBSD.org> | 2011-05-27 15:29:39 +0000 |
commit | ca203c4faa372321c3f4a72e340c4b3e5692f847 (patch) | |
tree | e34c1b939b681cfd69e2d9c2019b2073540f2aff /sbin | |
parent | cbcc2a4fd60650524babae8aea8c403def4838fb (diff) | |
download | src-ca203c4faa372321c3f4a72e340c4b3e5692f847.tar.gz src-ca203c4faa372321c3f4a72e340c4b3e5692f847.zip |
Add example how to create MBR and BSD schemes and install boot code.
Notes
Notes:
svn path=/head/; revision=222359
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/geom/class/part/gpart.8 | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8 index 417ddf15f707..dff881ebc374 100644 --- a/sbin/geom/class/part/gpart.8 +++ b/sbin/geom/class/part/gpart.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 03, 2011 +.Dd May 27, 2011 .Dt GPART 8 .Os .Sh NAME @@ -842,6 +842,33 @@ partition that would contain UFS where the system boots from. /sbin/gpart add -b 162 -s 1048576 -t freebsd-ufs ad0 .Ed .Pp +Create MBR scheme on +.Pa ada0 , +then create 30GB-sized FreeBSD slice, mark it active and +install boot0 boot manager: +.Bd -literal -offset indent +/sbin/gpart create -s MBR ada0 +/sbin/gpart add -t freebsd -s 30G ada0 +/sbin/gpart set -a active -i 1 ada0 +/sbin/gpart bootcode -b /boot/boot0 ada0 +.Ed +.Pp +Now create BSD scheme (BSD label) with ability to have up to 20 partitions: +.Bd -literal -offset indent +/sbin/gpart create -s BSD -n 20 ada0s1 +.Ed +.Pp +Create 1GB-sized UFS partition and 4GB-sized swap partition: +.Bd -literal -offset indent +/sbin/gpart add -t freebsd-ufs -s 1G ada0s1 +/sbin/gpart add -t freebsd-swap -s 4G ada0s1 +.Ed +.Pp +Install bootstrap code for the BSD label: +.Bd -literal -offset indent +/sbin/gpart bootcode -b /boot/boot ada0s1 +.Ed +.Pp Create VTOC8 scheme on .Pa da0 . .Bd -literal -offset indent |