From owner-dev-commits-src-branches@freebsd.org Mon Apr 12 14:00:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D03DC5D20D4; Mon, 12 Apr 2021 14:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJr3t4fYbz4W47; Mon, 12 Apr 2021 14:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CC6218945; Mon, 12 Apr 2021 14:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13CE0gbU064244; Mon, 12 Apr 2021 14:00:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13CE0g8V064243; Mon, 12 Apr 2021 14:00:42 GMT (envelope-from git) Date: Mon, 12 Apr 2021 14:00:42 GMT Message-Id: <202104121400.13CE0g8V064243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Nathan Whitehorn Subject: git: d6dfcb6b27b5 - stable/13 - Tweak language involving ZFS installation; no content changes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d6dfcb6b27b50dcc216a78d655fcb7e6c8561b19 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 14:00:43 -0000 The branch stable/13 has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=d6dfcb6b27b50dcc216a78d655fcb7e6c8561b19 commit d6dfcb6b27b50dcc216a78d655fcb7e6c8561b19 Author: Nathan Whitehorn AuthorDate: 2021-04-05 14:23:00 +0000 Commit: Nathan Whitehorn CommitDate: 2021-04-12 14:00:10 +0000 Tweak language involving ZFS installation; no content changes. (cherry picked from commit b8639a1098a70e8ca8ec5880d2337fed04e4243a) --- usr.sbin/bsdinstall/bsdinstall.8 | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 854b4775883d..781660bf5ef1 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -465,7 +465,8 @@ exits. The two parts are separated by the usual script header (#!), which also sets the interpreter for the setup script. .Pp -A typical bsdinstall script looks like this: +A typical bsdinstall script, using the default filesystem layout and the UFS +filesystem, looks like this: .Bd -literal -offset indent PARTITIONS=ada0 DISTRIBUTIONS="kernel.txz base.txz" @@ -476,11 +477,12 @@ sysrc sshd_enable=YES pkg install puppet .Ed .Pp -For a ZFS scripted installation, the script looks like this: +For a scripted installation involving a ZFS pool spanning multiple disks, +the script instead looks like this: .Bd -literal -offset indent DISTRIBUTIONS="kernel.txz base.txz" export ZFSBOOT_VDEV_TYPE=stripe -export ZFSBOOT_DISKS=ada0 +export ZFSBOOT_DISKS="ada0 ada1" export nonInteractive="YES" #!/bin/sh @@ -517,6 +519,7 @@ the preamble can contain a variable which is passed to the .Cm scriptedpart target to control disk setup. +.Pp Alternatively, to use .Cm zfsboot @@ -525,12 +528,13 @@ instead of the preamble can contain the variable .Ev ZFSBOOT_DATASETS instead of -.Ev PARTITIONS , -and setting the variables +.Ev PARTITIONS +(see below). +If using .Cm zfsboot, the variables .Ev ZFSBOOT_DISKS and .Ev ZFSBOOT_VDEV_TYPE -to create the pool of disks for the base system. +must be set to create the pool of disks for the base system. Usually, for a mirrored booting disk, this two variables looks like this: .Bd -literal -offset indent ZFSBOOT_DISKS="ada0 ada1" @@ -539,7 +543,7 @@ ZFSBOOT_VDEV_TYPE=mirror .Pp Remember to export all the variables for the .Cm zfsboot -command, otherwise it will not get set. +command, otherwise installation will fail. .Ss SETUP SCRIPT Following the preamble is an optional shell script, beginning with a #! declaration. @@ -551,15 +555,17 @@ Note that newly configured system services, e.g., networking have not been started in the installed system at this time and only installation host services are available. .Ss ZFS DATASETS -The +If using +.Cm zfsboot +in an installation script, the .Cm zfsboot -partitioning takes the +partitioning tool takes the .Ev ZFSBOOT_DATASETS -variable to create the datasets on the base system. -This variable can get pretty huge if the pool contains a lot of datasets. +variable to create the ZFS datasets on the base system. +This variable definition can become large if the pool contains many datasets. The default value of the .Ev ZFSBOOT_DATASETS -looks like this: +is: .Bd -literal -offset indent # DATASET OPTIONS (comma or space separated; or both) @@ -591,11 +597,11 @@ looks like this: /var/tmp setuid=off .Ed .Pp -The first column if the dataset to be created on the top of the +The first column is the name of the dataset to be created as part of the .Ev ZFSBOOT_POOL_NAME -and the rest of the columns are the options to be set on each dataset. -The options must be written on a coma or space separated list, or both. -And everything behind a pound/hash character is ignored as a comment. +pool and the remainder of each line contains the options to be set on each dataset. +If multiple options are given, they can be separated by either commas or whitespace; +everything following a pound/hash character is ignored as a comment. .Ss BUILDING AUTOMATIC INSTALL MEDIA If building automatic install media, use tar to extract a release ISO: .Dl mkdir release-media @@ -617,3 +623,5 @@ first appeared in .Fx 9.0 . .Sh AUTHORS .An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org +.An Devin Teske Aq Mt dteske@FreeBSD.org +.An Allan Jude Aq Mt allanjude@FreeBSD.org