From owner-svn-src-all@FreeBSD.ORG Tue Jun 22 09:45:20 2010 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 A85B4106566C; Tue, 22 Jun 2010 09:45:20 +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 95D288FC14; Tue, 22 Jun 2010 09:45:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5M9jKDa005554; Tue, 22 Jun 2010 09:45:20 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5M9jKos005552; Tue, 22 Jun 2010 09:45:20 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201006220945.o5M9jKos005552@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 22 Jun 2010 09:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209427 - stable/8/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: Tue, 22 Jun 2010 09:45:20 -0000 Author: ae Date: Tue Jun 22 09:45:20 2010 New Revision: 209427 URL: http://svn.freebsd.org/changeset/base/209427 Log: MFC r198235: Clean up markup (mainly). Approved by: kib (mentor) Modified: stable/8/sbin/geom/class/part/gpart.8 Directory Properties: stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/stripe/ (props changed) Modified: stable/8/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/8/sbin/geom/class/part/gpart.8 Tue Jun 22 08:58:13 2010 (r209426) +++ stable/8/sbin/geom/class/part/gpart.8 Tue Jun 22 09:45:20 2010 (r209427) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2010 +.Dd June 22, 2010 .Dt GPART 8 .Os .Sh NAME @@ -43,23 +43,37 @@ lines in your kernel configuration file: .Cd "options GEOM_PART_VTOC8" .Ed .Pp -The GEOM_PART_APM option adds support for the Apple Partition Map (APM) +The +.Dv GEOM_PART_APM +option adds support for the Apple Partition Map (APM) found on Apple Macintosh computers. -The GEOM_PART_BSD option adds support for the traditional BSD disklabel. -The GEOM_PART_GPT option adds support for the GUID Partition Table (GPT) +The +.Dv GEOM_PART_BSD +option adds support for the traditional +.Bx +disklabel. +The +.Dv GEOM_PART_GPT +option adds support for the GUID Partition Table (GPT) found on Intel Itanium computers and Intel-based Macintosh computers. -The GEOM_PART_MBR option adds support for the Master Boot Record (MBR) +The +.Dv GEOM_PART_MBR +option adds support for the Master Boot Record (MBR) found on PCs and used on many removable media. -The GEOM_PART_PC98 option adds support for the MBR variant as used on +The +.Dv GEOM_PART_PC98 +option adds support for the MBR variant as used on NEC PC-98 computers. -The GEOM_PART_VTOC8 option adds support for Sun's SMI VTOC8 label as +The +.Dv GEOM_PART_VTOC8 +option adds support for Sun's SMI VTOC8 label as found on computers based on .Tn SPARC64 and .Tn UltraSPARC. .Pp Usage of the -.Xr gpart 8 +.Ns Nm utility: .Pp .\" ==== ADD ==== @@ -126,7 +140,7 @@ utility: .Ar geom .\" ==== UNSET ==== .Nm -.Cm unset +.Cm unset .Fl a Ar attrib .Fl i Ar index .Op Fl f Ar flags @@ -137,7 +151,7 @@ The .Nm utility is used to partition GEOM providers, normally disks. The first argument of which is the action to be taken: -.Bl -tag -width ".Cm wwwwwww" +.Bl -tag -width ".Cm bootcode" .\" ==== ADD ==== .It Cm add Add a new partition to the partitioning scheme given by @@ -151,13 +165,15 @@ option. The type of the partition is given by the .Fl t Ar type option. -Partition types are discussed in the section entitled "Partition Types". +Partition types are discussed below in the section entitled +.Sx "PARTITION TYPES" . .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl i Ar index The index in the partition table at which the new partition is to be -placed. The index determines the name of the device special file used +placed. +The index determines the name of the device special file used to represent the partition. .It Fl l Ar label The label attached to the partition. @@ -165,7 +181,9 @@ This option is only valid when used on p partition labels. .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .\" ==== BOOTCODE ==== @@ -188,7 +206,7 @@ The option specifies a file that contains the bootstrap code. The contents and size of the file are determined by the partitioning scheme. -For the MBR scheme, it's a 512 byte file of which the first 446 bytes +For the MBR scheme, it is a 512 byte file of which the first 446 bytes are installed as bootstrap code. The .Fl p Ar partcode @@ -205,11 +223,13 @@ option is omitted, the bootstrap code is partitions. The size of the file must be smaller than the size of the partition. .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .\" ==== COMMIT ==== @@ -238,8 +258,8 @@ option determines the scheme to use. The kernel needs to have support for a particular scheme before that scheme can be used to partition a disk. .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl n Ar entries The number of entries in the partition table. Every partitioning scheme has a minimum and a maximum number of entries @@ -251,7 +271,9 @@ By default, partition tables are created entries. .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .\" ==== DELETE ==== @@ -263,11 +285,13 @@ and further identified by the option. The partition cannot be actively used by the kernel. .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .\" ==== DESTROY ==== @@ -275,11 +299,13 @@ about its use. Destroy the partitioning scheme as implemented by geom .Ar geom . .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .\" ==== MODIFY ==== @@ -299,22 +325,26 @@ option. Not all partitioning schemes support labels and it is invalid to try to change a partition label in such cases. .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .\" ==== SET ==== .It Cm set Set the named attribute on the partition entry. .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .\" ==== SHOW ==== @@ -323,7 +353,8 @@ Show the current partition information o or all geoms if none are specified. .\" ==== UNDO ==== .It Cm undo -Revert any pending changes. +Revert any pending changes for geom +.Ar geom . This action is the opposite of the .Cm commit action and can be used to undo any changes that have not been committed. @@ -331,11 +362,13 @@ action and can be used to undo any chang .It Cm unset Clear the named attribute on the partition entry. .Pp -Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +Additional options include: +.Bl -tag -width 10n .It Fl f Ar flags Additional operational flags. -See the section entitled "Operational flags" below for a discussion +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion about its use. .El .El @@ -347,47 +380,82 @@ utility uses symbolic names for common p user needs to know what the partitioning scheme in question is and what the actual number or identification needs to be used for a particular type. -the +The .Nm utility also allows the user to specify scheme-specific partition types -for partition types that don't have symbol names. +for partition types that do not have symbol names. The symbolic names currently understood are: -.Bl -tag -width "wwwwwwwwwwwww" -.It efi +.Bl -tag -width ".Cm freebsd-vinum" +.It Cm efi The system partition for computers that use the Extensible Firmware Interface (EFI). In such cases, the GPT partitioning scheme is being used and the actual partition type for the system partition can also be specified as -"!c12a7328-f81f-11d2-ba4b-00a0c93ec93ab". -.It freebsd -A FreeBSD partition that uses the BSD disklabel to sub-divide the +.Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93ab" . +.It Cm freebsd +A +.Fx +partition that uses the +.Bx +disklabel to sub-divide the partition into file systems. This is a legacy partition type and should not be used for the APM or GPT schemes. -The scheme-specific types are "!165" for MBR, "!FreeBSD" for APM, and -"!516e7cb4-6ecf-11d6-8ff8-00022d09712b" for GPT. -.It freebsd-boot -A FreeBSD partition dedicated to bootstrap code. -The scheme-specific type is "!83bd6b9d-7f41-11dc-be0b-001560b84f0f" for GPT. -.It freebsd-swap -A FreeBSD partition dedicated to swap space. -The scheme-specific types are "!FreeBSD-swap" for APM, -"!516e7cb5-6ecf-11d6-8ff8-00022d09712b" for GPT, and tag 0x0901 for VTOC8. -.It freebsd-ufs -A FreeBSD partition that contains a UFS or UFS2 file system. -the scheme-specific types are "!FreeBSD-UFS" for APM, -"!516e7cb6-6ecf-11d6-8ff8-00022d09712b" for GPT, and tag 0x0902 for VTOC8. -.It freebsd-vinum -A FreeBSD partition that contains a Vinum volume. -The scheme-specific types are "!FreeBSD-Vinum" for APM, -"!516e7cb8-6ecf-11d6-8ff8-00022d09712b" for GPT, and tag 0x0903 for VTOC8. -.It freebsd-zfs -A FreeBSD partition that contains a ZFS volume. -The scheme-specific types are "!FreeBSD-ZFS" for APM, -"!516e7cba-6ecf-11d6-8ff8-00022d09712b" for GPT, and 0x0904 for VTOC8. -.It mbr +The scheme-specific types are +.Qq Li "!165" +for MBR, +.Qq Li "!FreeBSD" +for APM, and +.Qq Li "!516e7cb4-6ecf-11d6-8ff8-00022d09712b" +for GPT. +.It Cm freebsd-boot +A +.Fx +partition dedicated to bootstrap code. +The scheme-specific type is +.Qq Li "!83bd6b9d-7f41-11dc-be0b-001560b84f0f" +for GPT. +.It Cm freebsd-swap +A +.Fx +partition dedicated to swap space. +The scheme-specific types are +.Qq Li "!FreeBSD-swap" +for APM, +.Qq Li "!516e7cb5-6ecf-11d6-8ff8-00022d09712b" +for GPT, and tag 0x0901 for VTOC8. +.It Cm freebsd-ufs +A +.Fx +partition that contains a UFS or UFS2 file system. +The scheme-specific types are +.Qq Li "!FreeBSD-UFS" +for APM, +.Qq Li "!516e7cb6-6ecf-11d6-8ff8-00022d09712b" +for GPT, and tag 0x0902 for VTOC8. +.It Cm freebsd-vinum +A +.Fx +partition that contains a Vinum volume. +The scheme-specific types are +.Qq Li "!FreeBSD-Vinum" +for APM, +.Qq Li "!516e7cb8-6ecf-11d6-8ff8-00022d09712b" +for GPT, and tag 0x0903 for VTOC8. +.It Cm freebsd-zfs +A +.Fx +partition that contains a ZFS volume. +The scheme-specific types are +.Qq Li "!FreeBSD-ZFS" +for APM, +.Qq Li "!516e7cba-6ecf-11d6-8ff8-00022d09712b" + for GPT, and 0x0904 for VTOC8. +.It Cm mbr A partition that is sub-partitioned by a master boot record (MBR). -This type is known as "!024dee41-33e7-11d3-9d69-0008c781f39f" by GPT. +This type is known as +.Qq Li "!024dee41-33e7-11d3-9d69-0008c781f39f" +by GPT. .El .Sh OPERATIONAL FLAGS Actions other than the @@ -400,10 +468,12 @@ option. This option is used to specify action-specific operational flags. By default, the .Nm -utility defines the 'C' flag so that the action is immediately +utility defines the +.Ql C +flag so that the action is immediately committed. The user can specify -.Fl f Ar x +.Dq Fl f Cm x to have the action result in a pending change that can later, with other pending changes, be committed as a single compound change with the @@ -426,24 +496,26 @@ Embed GPT bootstrap code into protective .Ed .Pp Create a dedicated -.Pa freebsd-boot -partition that can boot FreeBSD from a -.Pa freebsd-ufs +.Cm freebsd-boot +partition that can boot +.Fx +from a +.Cm freebsd-ufs partition, and install bootstrap code into it. This partition must be larger than .Pa /boot/gptboot , or the GPT boot you are planning to write. A size of 15 blocks (7680 bytes) would be sufficient for -booting from UFS but lets use 128 blocks (64 KB) here in +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). +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 +.Cm freebsd-ufs partition that would contain UFS where the system boots from. .Bd -literal -offset indent /sbin/gpart add -b 162 -s 1048576 -t freebsd-ufs ad0 @@ -468,7 +540,7 @@ After having created all required partit .Ed .Sh SEE ALSO .Xr geom 4 , -.Xr geom 8 , +.Xr geom 8 .Sh HISTORY The .Nm