From owner-svn-src-all@FreeBSD.ORG Fri Jan 25 16:33:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0B80DE65; Fri, 25 Jan 2013 16:33:02 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D9EB3927; Fri, 25 Jan 2013 16:33:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0PGX1PA040755; Fri, 25 Jan 2013 16:33:01 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0PGX15j040754; Fri, 25 Jan 2013 16:33:01 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201301251633.r0PGX15j040754@svn.freebsd.org> From: Warren Block Date: Fri, 25 Jan 2013 16:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245910 - head/sbin/geom/class/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Jan 2013 16:33:02 -0000 Author: wblock (doc committer) Date: Fri Jan 25 16:33:00 2013 New Revision: 245910 URL: http://svnweb.freebsd.org/changeset/base/245910 Log: Expand description of how gptboot and gptzfsboot choose a partition for booting. Reviewed by: ae MFC after: 1 week Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Fri Jan 25 15:25:24 2013 (r245909) +++ head/sbin/geom/class/part/gpart.8 Fri Jan 25 16:33:00 2013 (r245910) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 2013 +.Dd January 25, 2013 .Dt GPART 8 .Os .Sh NAME @@ -807,34 +807,51 @@ Both types of bootstrap code are used to First, a protective MBR is embedded into the first disk sector from the .Pa /boot/pmbr image. -It searches the GPT +It searches through the GPT for a .Cm freebsd-boot partition (see the .Sx "PARTITION TYPES" -section) in the GPT and runs the next bootstrap stage from it. +section) and runs the next bootstrap stage from it. The .Cm freebsd-boot partition should be smaller than 545 KB. +It can be located either before or after other +.Fx +partitions on the disk. There are two variants of bootstrap code to write to this partition: .Pa /boot/gptboot and .Pa /boot/gptzfsboot . .Pa /boot/gptboot is used to boot from UFS. -It searches +It searches through +.Cm freebsd-ufs +partitions in the GPT and boots from the first one with the +.Cm bootonce +attribute set. +If that attribute is not found, +.Pa /boot/gptboot +boots from the first .Cm freebsd-ufs -GPT partitions and starts +partition with the +.Cm bootme +attribute set. +If neither attribute is found, +.Pa /boot/gptboot +boots from the first +.Cm freebsd-ufs +partition. .Pa /boot/loader .Pq the third bootstrap stage -if found. -The +is loaded from the first partition that matches these conditions. .Pa /boot/gptzfsboot is used to boot from ZFS. -It searches +It searches through the GPT for .Cm freebsd-zfs -GPT partitions and starts +partitions, trying to detect ZFS pools. +After all pools are detected, .Pa /boot/zfsloader -if found. +is started from the first one found. .Pp The VTOC8 scheme does not support embedding bootstrap code. Instead, the 8 KBytes bootstrap code image @@ -945,7 +962,7 @@ The GEOM PART class can detect the same different GEOM providers, and some of them will be marked as corrupt. Be careful when choosing a provider for recovery. If you choose incorrectly you can destroy the metadata of another GEOM class, -e.g.\& GEOM MIRROR or GEOM LABEL. +e.g.,\& GEOM MIRROR or GEOM LABEL. .Sh SYSCTL VARIABLES The following .Xr sysctl 8