From owner-svn-src-all@FreeBSD.ORG Fri May 27 15:29:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6CAF106566B; Fri, 27 May 2011 15:29:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C61858FC08; Fri, 27 May 2011 15:29:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4RFTdb4041317; Fri, 27 May 2011 15:29:39 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RFTdY2041315; Fri, 27 May 2011 15:29:39 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105271529.p4RFTdY2041315@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 27 May 2011 15:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222359 - head/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 15:29:39 -0000 Author: ae Date: Fri May 27 15:29:39 2011 New Revision: 222359 URL: http://svn.freebsd.org/changeset/base/222359 Log: Add example how to create MBR and BSD schemes and install boot code. Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Fri May 27 14:30:19 2011 (r222358) +++ head/sbin/geom/class/part/gpart.8 Fri May 27 15:29:39 2011 (r222359) @@ -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 t /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