xref: /freebsd-src/usr.sbin/bsdinstall/bsdinstall.8 (revision bbe2a1da2df639c616869aa838244c8094779bd4)
197e0f2b4SNathan Whitehorn.\"-
25475ce62SMateusz Piotrowski.\" Copyright (c) 2011-2013 Nathan Whitehorn <nwhitehorn@FreeBSD.org> All rights reserved.
35475ce62SMateusz Piotrowski.\" Copyright (c) 2018 Roberto Fernandez Cueto <roberfern@gmail.com>
4*bbe2a1daSBjoern A. Zeeb.\" Copyright (c) 2024 The FreeBSD Foundation
5*bbe2a1daSBjoern A. Zeeb.\"
6*bbe2a1daSBjoern A. Zeeb.\" Portions of this documentation were written by Björn Zeeb
7*bbe2a1daSBjoern A. Zeeb.\" under sponsorship from the FreeBSD Foundation.
897e0f2b4SNathan Whitehorn.\"
997e0f2b4SNathan Whitehorn.\" Redistribution and use in source and binary forms, with or without
1097e0f2b4SNathan Whitehorn.\" modification, are permitted provided that the following conditions
1197e0f2b4SNathan Whitehorn.\" are met:
1297e0f2b4SNathan Whitehorn.\" 1. Redistributions of source code must retain the above copyright
1397e0f2b4SNathan Whitehorn.\"    notice, this list of conditions and the following disclaimer.
1497e0f2b4SNathan Whitehorn.\" 2. Redistributions in binary form must reproduce the above copyright
1597e0f2b4SNathan Whitehorn.\"    notice, this list of conditions and the following disclaimer in the
1697e0f2b4SNathan Whitehorn.\"    documentation and/or other materials provided with the distribution.
1797e0f2b4SNathan Whitehorn.\"
1897e0f2b4SNathan Whitehorn.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1997e0f2b4SNathan Whitehorn.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2097e0f2b4SNathan Whitehorn.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2197e0f2b4SNathan Whitehorn.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
2297e0f2b4SNathan Whitehorn.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2397e0f2b4SNathan Whitehorn.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2497e0f2b4SNathan Whitehorn.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2597e0f2b4SNathan Whitehorn.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2697e0f2b4SNathan Whitehorn.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2797e0f2b4SNathan Whitehorn.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2897e0f2b4SNathan Whitehorn.\" POSSIBILITY OF SUCH DAMAGE.
2997e0f2b4SNathan Whitehorn.\"
30*bbe2a1daSBjoern A. Zeeb.Dd November 4, 2024
31edf5bf99SJoel Dahl.Dt BSDINSTALL 8
3297e0f2b4SNathan Whitehorn.Os
3397e0f2b4SNathan Whitehorn.Sh NAME
3497e0f2b4SNathan Whitehorn.Nm bsdinstall
3597e0f2b4SNathan Whitehorn.Nd system installer
3697e0f2b4SNathan Whitehorn.Sh SYNOPSIS
3797e0f2b4SNathan Whitehorn.Nm
38bc4a673fSDevin Teske.Op Ar options
3997e0f2b4SNathan Whitehorn.Op Ar target
4097e0f2b4SNathan Whitehorn.Op Ar ...
4197e0f2b4SNathan Whitehorn.Sh DESCRIPTION
4297e0f2b4SNathan Whitehorn.Nm
4397e0f2b4SNathan Whitehornis used for installation of new systems, both for system setup from
445a7c7dc5SEnji Cooperinstallation media, e.g., CD-ROMs, and for use on live systems to prepare
4597e0f2b4SNathan WhitehornVM images and jails.
4697e0f2b4SNathan Whitehorn.Pp
4797e0f2b4SNathan WhitehornMuch like
4897e0f2b4SNathan Whitehorn.Xr make 1 , Nm
495a7c7dc5SEnji Coopertakes a target and possible parameters of the target as arguments.
505a7c7dc5SEnji CooperIf invoked with no arguments, it will invoke the
5197e0f2b4SNathan Whitehorn.Cm auto
5297e0f2b4SNathan Whitehorntarget, which provides a standard interactive installation, invoking the
535a7c7dc5SEnji Cooperothers in sequence.
545a7c7dc5SEnji CooperTo perform a scripted installation,
555a7c7dc5SEnji Cooperthese subtargets can be invoked separately by an installation script.
56bc4a673fSDevin Teske.Sh OPTIONS
57bc4a673fSDevin Teske.Nm
58bc4a673fSDevin Teskesupports the following options, global to all targets:
59bc4a673fSDevin Teske.Bl -tag -width indent+
60bc4a673fSDevin Teske.It Fl D Ar file
61bc4a673fSDevin TeskeProvide a path for the installation log file
62bc4a673fSDevin Teske.Pq overrides Ev BSDINSTALL_LOG .
63bc4a673fSDevin TeskeSee
64bc4a673fSDevin Teske.Sx ENVIRONMENT VARIABLES
65bc4a673fSDevin Teskefor more information on
66bc4a673fSDevin Teske.Ev BSDINSTALL_LOG .
67e2defa52SJoel Dahl.El
6897e0f2b4SNathan Whitehorn.Sh TARGETS
6997e0f2b4SNathan WhitehornMost of the following targets are only useful for scripting the installer.
7097e0f2b4SNathan WhitehornFor interactive use, most users will be interested only in the
7153f01f3aSNathan Whitehorn.Cm auto ,
7253f01f3aSNathan Whitehorn.Cm jail ,
7397e0f2b4SNathan Whitehornand
7453f01f3aSNathan Whitehorn.Cm script
7597e0f2b4SNathan Whitehorntargets.
76a8f5c9d3SMateusz Piotrowski.Bl -tag -width "jail destination"
7797e0f2b4SNathan Whitehorn.It Cm auto
7897e0f2b4SNathan WhitehornRun the standard interactive installation, including disk partitioning.
7997e0f2b4SNathan Whitehorn.It Cm jail Ar destination
8097e0f2b4SNathan WhitehornSets up a new chroot system at
8197e0f2b4SNathan Whitehorn.Pa destination ,
8297e0f2b4SNathan Whitehornsuitable for use with
8397e0f2b4SNathan Whitehorn.Xr jail 8 .
8497e0f2b4SNathan WhitehornBehavior is generally similar to
8597e0f2b4SNathan Whitehorn.Cm auto ,
8697e0f2b4SNathan Whitehornexcept that disk partitioning and network setup are skipped and a kernel is
8797e0f2b4SNathan Whitehornnot installed into the new system.
8853f01f3aSNathan Whitehorn.It Cm script Ar script
8953f01f3aSNathan WhitehornRuns the installation script at
9053f01f3aSNathan Whitehorn.Pa script .
9153f01f3aSNathan WhitehornSee
9253f01f3aSNathan Whitehorn.Sx SCRIPTING
9353f01f3aSNathan Whitehornfor more information on this target.
9497e0f2b4SNathan Whitehorn.It Cm keymap
9597e0f2b4SNathan WhitehornIf the current controlling TTY is a
9697e0f2b4SNathan Whitehorn.Xr syscons 4
97f071b64eSStefan Eßeror
98f071b64eSStefan Eßer.Xr vt 4
9997e0f2b4SNathan Whitehornconsole, asks the user to set the current keymap, and saves the result to the
10097e0f2b4SNathan Whitehornnew system's
10197e0f2b4SNathan Whitehorn.Pa rc.conf .
10297e0f2b4SNathan Whitehorn.It Cm hostname
10397e0f2b4SNathan WhitehornPrompts the user for a host name for the new system and saves the result to the
10497e0f2b4SNathan Whitehornnew system's
10597e0f2b4SNathan Whitehorn.Pa rc.conf .
10697e0f2b4SNathan WhitehornIf
10797e0f2b4SNathan Whitehorn.Ev BSDINSTALL_CONFIGCURRENT
10897e0f2b4SNathan Whitehornis set, also sets the host name of the current system.
10997e0f2b4SNathan Whitehorn.It Cm netconfig
11097e0f2b4SNathan WhitehornInteractively configures network interfaces (first invoking
11197e0f2b4SNathan Whitehorn.Cm wlanconfig
11297e0f2b4SNathan Whitehornon wireless interfaces), saving the result to the new system's
11397e0f2b4SNathan Whitehorn.Pa rc.conf
11497e0f2b4SNathan Whitehornand
11597e0f2b4SNathan Whitehorn.Pa resolv.conf .
11697e0f2b4SNathan WhitehornIf
11797e0f2b4SNathan Whitehorn.Ev BSDINSTALL_CONFIGCURRENT
11897e0f2b4SNathan Whitehornis set, also configures the network interfaces of the current system to match.
11997e0f2b4SNathan Whitehorn.It Cm autopart
12097e0f2b4SNathan WhitehornProvides the installer's interactive guided disk partitioner for single-disk
1215a7c7dc5SEnji Cooperinstallations.
1225a7c7dc5SEnji CooperDefaults to UFS.
12389be2c1eSMateusz Piotrowski.It Cm bootconfig
12489be2c1eSMateusz PiotrowskiDetects an appropriate partition and installs UEFI boot loader files.
1256ef5a07eSDevin Teske.It Cm zfsboot
126d512033eSBen WoodsProvides a ZFS-only automatic interactive disk partitioner.
1276ef5a07eSDevin TeskeCreates a single
1286ef5a07eSDevin Teske.Ic zpool
1295b9ee78dSNathan Whitehornwith separate datasets for
1303bb92304SMike Karels.Pa /home ,
1315b9ee78dSNathan Whitehorn.Pa /tmp ,
1325b9ee78dSNathan Whitehorn.Pa /usr ,
1335b9ee78dSNathan Whitehorn.Pa /usr/ports ,
1345b9ee78dSNathan Whitehorn.Pa /usr/src ,
1356ef5a07eSDevin Teskeand
1365b9ee78dSNathan Whitehorn.Pa /var .
1375b9ee78dSNathan WhitehornOptionally can set up
1385b9ee78dSNathan Whitehorn.Xr geli 8
1395b9ee78dSNathan Whitehornto encrypt the disk.
14097e0f2b4SNathan Whitehorn.It Cm partedit
1415b9ee78dSNathan WhitehornProvides the installer's interactive manual disk partitioner with an interface
1425b9ee78dSNathan Whitehornidentical to
1435b9ee78dSNathan Whitehorn.Xr sade 8 .
1445a7c7dc5SEnji CooperSupports multiple disks as well as UFS, ZFS, and FAT file systems.
1455a7c7dc5SEnji CooperZFS is set up with one pool and dataset per partition.
14653f01f3aSNathan Whitehorn.It Cm scriptedpart Ar parameters
14753f01f3aSNathan WhitehornSets up disks like
14853f01f3aSNathan Whitehorn.Cm autopart
14953f01f3aSNathan Whitehornand
15053f01f3aSNathan Whitehorn.Cm partedit ,
15153f01f3aSNathan Whitehornbut non-interactively according to the disk setup specified in
15253f01f3aSNathan Whitehorn.Ar parameters .
15353f01f3aSNathan WhitehornEach disk setup is specified by a three-part argument:
15453f01f3aSNathan Whitehorn.Pp
155aeff2fb3SNathan Whitehorn.Ar disk
156aeff2fb3SNathan Whitehorn.Op Ar scheme
157aeff2fb3SNathan Whitehorn.Op Ar {partitions}
15853f01f3aSNathan Whitehorn.Pp
1595a7c7dc5SEnji CooperMultiple disk setups are separated by semicolons.
1605a7c7dc5SEnji CooperThe
16153f01f3aSNathan Whitehorn.Ar disk
16253f01f3aSNathan Whitehornargument specifies the disk on which to operate (which will be erased),
1635140034cSNathan Whitehornor the special value
1645140034cSNathan Whitehorn.Em DEFAULT ,
1655140034cSNathan Whitehornwhich will result in either a selection window (as in
1665140034cSNathan Whitehorn.Cm autopart )
1675140034cSNathan Whitehornfor the destination disk or, if there is only one possible disk, will
1685140034cSNathan Whitehornautomatically select it.
1695140034cSNathan WhitehornThe
17053f01f3aSNathan Whitehorn.Ar scheme
17153f01f3aSNathan Whitehornargument specifies the
17253f01f3aSNathan Whitehorn.Xr gpart 8
1735a7c7dc5SEnji Cooperpartition scheme to apply to the disk.
1745a7c7dc5SEnji CooperIf
17553f01f3aSNathan Whitehorn.Ar scheme
17653f01f3aSNathan Whitehornis unspecified,
17753f01f3aSNathan Whitehorn.Cm scriptedpart
17853f01f3aSNathan Whitehornwill apply the default bootable scheme on your platform.
17953f01f3aSNathan WhitehornThe
18053f01f3aSNathan Whitehorn.Ar partitions
18153f01f3aSNathan Whitehornargument is also optional and specifies how to partition
18253f01f3aSNathan Whitehorn.Ar disk .
18353f01f3aSNathan WhitehornIt consists of a comma-separated list of partitions to create enclosed in
1845a7c7dc5SEnji Coopercurly braces.
1855a7c7dc5SEnji CooperEach partition declaration takes the form
18653f01f3aSNathan Whitehorn.Pp
187aeff2fb3SNathan Whitehorn.Ar size
188aeff2fb3SNathan Whitehorn.Ar type
189aeff2fb3SNathan Whitehorn.Op Ar mount point
19053f01f3aSNathan Whitehorn.Pp
19153f01f3aSNathan Whitehorn.Ar size
19253f01f3aSNathan Whitehornspecifies the partition size to create in bytes (K, M, and G suffixes
19353f01f3aSNathan Whitehorncan be appended to specify kilobytes, megabytes, and gigabytes respectively),
19453f01f3aSNathan Whitehornwhile the
19553f01f3aSNathan Whitehorn.Em auto
1965a7c7dc5SEnji Cooperkeyword causes the partition to take all the remaining space on the disk.
1975a7c7dc5SEnji CooperThe
19853f01f3aSNathan Whitehorn.Ar type
19953f01f3aSNathan Whitehornoption chooses the
20053f01f3aSNathan Whitehorn.Xr gpart 8
2015a7c7dc5SEnji Cooperfilesystem type, e.g., freebsd-ufs, freebsd-zfs, or freebsd-swap.
20253f01f3aSNathan WhitehornThe optional
20353f01f3aSNathan Whitehorn.Ar mount point
20453f01f3aSNathan Whitehornargument sets where the created partition is to be mounted in the installed
2055a7c7dc5SEnji Coopersystem.
2065a7c7dc5SEnji CooperAs an example, a typical invocation looks like:
20753f01f3aSNathan Whitehorn.Pp
20853f01f3aSNathan Whitehornbsdinstall scriptedpart ada0 { 20G freebsd-ufs /, 4G freebsd-swap, 20G freebsd-ufs /var, auto freebsd-ufs /usr }
2095b9ee78dSNathan Whitehorn.Pp
210e8b4c5a6SNathan WhitehornNote that the list of partitions should
211e8b4c5a6SNathan Whitehorn.Em not
212e8b4c5a6SNathan Whitehorninclude boot partitions (e.g. EFI system partitions), which will be created automatically on whatever disk includes /.
213e8b4c5a6SNathan Whitehorn.Pp
2145b9ee78dSNathan WhitehornA shorter invocation to use the default partitioning (as
2155b9ee78dSNathan Whitehorn.Cm autopart
2165b9ee78dSNathan Whitehornwould have used) on the same disk:
2175b9ee78dSNathan Whitehorn.Pp
2185b9ee78dSNathan Whitehornbsdinstall scriptedpart ada0
2195140034cSNathan Whitehorn.Pp
2205140034cSNathan Whitehornor, even shorter:
2215140034cSNathan Whitehorn.Pp
2225140034cSNathan Whitehornbsdinstall scriptedpart DEFAULT
22397e0f2b4SNathan Whitehorn.It Cm mount
22497e0f2b4SNathan WhitehornMounts the file systems previously configured by
22553f01f3aSNathan Whitehorn.Cm autopart ,
22653f01f3aSNathan Whitehorn.Cm partedit ,
22797e0f2b4SNathan Whitehornor
22853f01f3aSNathan Whitehorn.Cm scriptedpart
22997e0f2b4SNathan Whitehornunder
23097e0f2b4SNathan Whitehorn.Ev BSDINSTALL_CHROOT .
23197e0f2b4SNathan Whitehorn.It Cm distfetch
23297e0f2b4SNathan WhitehornFetches the distributions in
23397e0f2b4SNathan Whitehorn.Ev DISTRIBUTIONS
23497e0f2b4SNathan Whitehornto
23597e0f2b4SNathan Whitehorn.Ev BSDINSTALL_DISTDIR
23697e0f2b4SNathan Whitehornfrom
23797e0f2b4SNathan Whitehorn.Ev BSDINSTALL_DISTSITE .
23897e0f2b4SNathan Whitehorn.It Cm checksum
23997e0f2b4SNathan WhitehornVerifies the checksums of the distributions listed in
24097e0f2b4SNathan Whitehorn.Ev DISTRIBUTIONS
24197e0f2b4SNathan Whitehornagainst the distribution manifest.
24297e0f2b4SNathan Whitehorn.It Cm distextract
24397e0f2b4SNathan WhitehornExtracts the distributions listed in
24497e0f2b4SNathan Whitehorn.Ev DISTRIBUTIONS
24597e0f2b4SNathan Whitehorninto
24697e0f2b4SNathan Whitehorn.Ev BSDINSTALL_CHROOT .
247*bbe2a1daSBjoern A. Zeeb.It Cm firmware
248*bbe2a1daSBjoern A. Zeebexecutes
249*bbe2a1daSBjoern A. Zeeb.Xr fwget 8
250*bbe2a1daSBjoern A. Zeebinside the
251*bbe2a1daSBjoern A. Zeeb.Ev BSDINSTALL_CHROOT
252*bbe2a1daSBjoern A. Zeebto install any needed and available firmware for the new system.
25397e0f2b4SNathan Whitehorn.It Cm rootpass
25497e0f2b4SNathan WhitehornInteractively invokes
25597e0f2b4SNathan Whitehorn.Xr passwd 1
25697e0f2b4SNathan Whitehornin the new system to set the root user's password.
25797e0f2b4SNathan Whitehorn.It Cm adduser
25897e0f2b4SNathan WhitehornInteractively invokes
25997e0f2b4SNathan Whitehorn.Xr adduser 8
26097e0f2b4SNathan Whitehornin the new system.
26197e0f2b4SNathan Whitehorn.It Cm time
26297e0f2b4SNathan WhitehornInteractively sets the time, date, and time zone of the new system.
26397e0f2b4SNathan Whitehorn.It Cm services
26497e0f2b4SNathan WhitehornQueries the user for the system daemons to begin at system startup,
26597e0f2b4SNathan Whitehornwriting the result into the new system's
26697e0f2b4SNathan Whitehorn.Pa rc.conf .
2675b9ee78dSNathan Whitehorn.It Cm entropy
2685b9ee78dSNathan WhitehornReads a small amount of data from
2695b9ee78dSNathan Whitehorn.Pa /dev/random
2705b9ee78dSNathan Whitehornand stores it in a file in the new system's root directory.
27197e0f2b4SNathan Whitehorn.It Cm config
2725a7c7dc5SEnji CooperInstalls the configuration files destined for the new system, e.g.,
2735a7c7dc5SEnji Cooper.Xr rc.conf 5
27497e0f2b4SNathan Whitehornfragments generated by
27597e0f2b4SNathan Whitehorn.Cm netconfig ,
27697e0f2b4SNathan Whitehornetc.) onto the new system.
27797e0f2b4SNathan Whitehorn.El
27897e0f2b4SNathan Whitehorn.Sh ENVIRONMENT VARIABLES
27997e0f2b4SNathan WhitehornThe following environment variables control various aspects of the installation
2805a7c7dc5SEnji Cooperprocess.
2815a7c7dc5SEnji CooperMany are used internally during installation and have reasonable default values
2825a7c7dc5SEnji Cooperfor most installation scenarios.
2835a7c7dc5SEnji CooperOthers are set by various interactive user prompts, and can be usefully
2845a7c7dc5SEnji Cooperoverridden when making scripted or customized installers.
285a8f5c9d3SMateusz Piotrowski.Bl -tag -width "BSDINSTALL_DISTSITE"
286a107ddbbSRebecca Cran.It Ev TMPDIR
287a107ddbbSRebecca CranThe directory to use for temporary files.
288a107ddbbSRebecca CranDefault:
289a107ddbbSRebecca Cran.Dq Pa /tmp
29097e0f2b4SNathan Whitehorn.It Ev DISTRIBUTIONS
2916e02be63SMateusz PiotrowskiThe set of distributions to install, e.g., "base.txz kernel.txz ports.txz".
2925475ce62SMateusz PiotrowskiDefault: unset
29389be2c1eSMateusz Piotrowski.It Ev PARTITIONS
29489be2c1eSMateusz PiotrowskiThe partitioning of the disk onto which the system is being installed.
29589be2c1eSMateusz PiotrowskiSee
29689be2c1eSMateusz Piotrowski.Cm scriptedpart
29789be2c1eSMateusz Piotrowskiof
29889be2c1eSMateusz Piotrowskithe
29989be2c1eSMateusz Piotrowski.Sx TARGETS
3005140034cSNathan Whitehornsection for format details. If this variable is unset, the installer will
3015140034cSNathan Whitehornuse the default partitioning as in
3025140034cSNathan Whitehorn.Cm autopart .
30389be2c1eSMateusz PiotrowskiDefault: unset
30497e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_DISTDIR
30597e0f2b4SNathan WhitehornThe directory in which the distribution files can be found (or to which they
3065a7c7dc5SEnji Coopershould be downloaded).
3075a7c7dc5SEnji CooperDefault:
3085475ce62SMateusz Piotrowski.Dq Pa /usr/freebsd-dist
309aeff2fb3SNathan Whitehorn.It Ev BSDINSTALL_DISTSITE
310aeff2fb3SNathan WhitehornURL from which the distribution files should be downloaded if they are not
311aeff2fb3SNathan Whitehornalready present in the directory defined by
312aeff2fb3SNathan Whitehorn.Ev BSDINSTALL_DISTDIR .
313aeff2fb3SNathan WhitehornThis should be a full path to the files, including architecture and release
3145a7c7dc5SEnji Coopernames.
3155a7c7dc5SEnji CooperMost targets, e.g.,
316aeff2fb3SNathan Whitehorn.Cm auto
317aeff2fb3SNathan Whitehornand
3185a7c7dc5SEnji Cooper.Cm jail ,
319aeff2fb3SNathan Whitehornthat prompt for a
320aeff2fb3SNathan Whitehorn.Fx
321aeff2fb3SNathan Whitehornmirror will skip that step if this variable is already defined in the
3225a7c7dc5SEnji Cooperenvironment.
3235a7c7dc5SEnji CooperExample:
324aa35037bSMateusz Piotrowski.Pa https://download.freebsd.org/ftp/releases/powerpc/powerpc64/13.1-RELEASE/
325aa35037bSMateusz Piotrowskior
326aa35037bSMateusz Piotrowski.Pa http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/12.2-RELEASE/ .
32797e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_CHROOT
32897e0f2b4SNathan WhitehornThe directory into which the distribution files should be unpacked and the
32997e0f2b4SNathan Whitehorndirectory at which the root file system of the new system should be mounted.
33097e0f2b4SNathan WhitehornDefault:
3315475ce62SMateusz Piotrowski.Dq Pa /mnt
33297e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_LOG
3335a7c7dc5SEnji CooperPath to a log file for the installation.
3345a7c7dc5SEnji CooperDefault:
335a107ddbbSRebecca Cran.Dq Pa $TMPDIR/bsdinstall_log
336*bbe2a1daSBjoern A. Zeeb.It Ev BSDINSTALL_SKIP_FIRMWARE
337*bbe2a1daSBjoern A. ZeebIf not empty, the
338*bbe2a1daSBjoern A. Zeeb.Cm auto
339*bbe2a1daSBjoern A. Zeebtarget
340*bbe2a1daSBjoern A. Zeebwill not invoke the
341*bbe2a1daSBjoern A. Zeeb.Cm firmware
342*bbe2a1daSBjoern A. Zeebtarget.
343fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_HARDENING
344fea2cffbSMateusz PiotrowskiIf not empty, the
345fea2cffbSMateusz Piotrowski.Cm auto
346fea2cffbSMateusz Piotrowskitarget
347fea2cffbSMateusz Piotrowskiwill not invoke the
348fea2cffbSMateusz Piotrowski.Cm hardening
349fea2cffbSMateusz Piotrowskitarget.
350fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_HOSTNAME
351fea2cffbSMateusz PiotrowskiIf not empty, the
352fea2cffbSMateusz Piotrowski.Cm auto
353fea2cffbSMateusz Piotrowskitarget
354fea2cffbSMateusz Piotrowskiwill not invoke the
355fea2cffbSMateusz Piotrowski.Cm hostname
356fea2cffbSMateusz Piotrowskitarget.
357fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_KEYMAP
358fea2cffbSMateusz PiotrowskiIf not empty, the
359fea2cffbSMateusz Piotrowski.Cm auto
360fea2cffbSMateusz Piotrowskitarget
361fea2cffbSMateusz Piotrowskiwill not invoke the
362fea2cffbSMateusz Piotrowski.Cm keymap
363fea2cffbSMateusz Piotrowskitarget.
364fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_MANUAL
365fea2cffbSMateusz PiotrowskiIf not empty, the
366fea2cffbSMateusz Piotrowski.Cm auto
367fea2cffbSMateusz Piotrowskitarget will not offer to open a shell in the new system
368fea2cffbSMateusz Piotrowskifor final manual modifications.
369fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_SERVICES
370fea2cffbSMateusz PiotrowskiIf not empty, the
371fea2cffbSMateusz Piotrowski.Cm auto
372fea2cffbSMateusz Piotrowskitarget
373fea2cffbSMateusz Piotrowskiwill not invoke the
374fea2cffbSMateusz Piotrowski.Cm services
375fea2cffbSMateusz Piotrowskitarget.
376fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_TIME
377fea2cffbSMateusz PiotrowskiIf not empty, the
378fea2cffbSMateusz Piotrowski.Cm auto
379fea2cffbSMateusz Piotrowskitarget
380fea2cffbSMateusz Piotrowskiwill not invoke the
381fea2cffbSMateusz Piotrowski.Cm time
382fea2cffbSMateusz Piotrowskitarget.
383fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_USERS
384fea2cffbSMateusz PiotrowskiIf not empty, the
385fea2cffbSMateusz Piotrowski.Cm auto
386fea2cffbSMateusz Piotrowskitarget
387fea2cffbSMateusz Piotrowskiwill not invoke the
388fea2cffbSMateusz Piotrowski.Cm adduser
389fea2cffbSMateusz Piotrowskitarget.
390fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_FINALCONFIG
391fea2cffbSMateusz PiotrowskiIf not empty, the
392fea2cffbSMateusz Piotrowski.Cm auto
393fea2cffbSMateusz Piotrowskitarget will not show the final configuration dialog,
394fea2cffbSMateusz Piotrowskiwhere earlier configuration choices can be revisited.
39597e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_TMPETC
39697e0f2b4SNathan WhitehornDirectory where files destined for the new system's
39797e0f2b4SNathan Whitehorn.Pa /etc
39897e0f2b4SNathan Whitehornwill be stored until the
39997e0f2b4SNathan Whitehorn.Cm config
4005a7c7dc5SEnji Coopertarget is executed.
4015a7c7dc5SEnji CooperIf this directory does not already exist, it will be created.
4025a7c7dc5SEnji CooperDefault:
403a107ddbbSRebecca Cran.Dq Pa $TMPDIR/bsdinstall_etc
404ff134040SDevin Teske.It Ev BSDINSTALL_TMPBOOT
405ff134040SDevin TeskeDirectory where files destined for the new system's
406ff134040SDevin Teske.Pa /boot
407ff134040SDevin Teskewill be stored until the
408ff134040SDevin Teske.Cm config
4095a7c7dc5SEnji Coopertarget is executed.
4105a7c7dc5SEnji CooperIf this directory does not already exist, it will be created.
4115a7c7dc5SEnji CooperDefault:
412a107ddbbSRebecca Cran.Dq Pa $TMPDIR/bsdinstall_boot
4133e1101f2SBrad Davis.It Ev ROOTPASS_ENC
4143e1101f2SBrad DavisEncrypted string to set the root password to in the format expected by
4153e1101f2SBrad Davis.Xr pw 8
4163e1101f2SBrad Davis.Fl H Ar 0 .
4173e1101f2SBrad DavisThis option is used if both it and
4183e1101f2SBrad Davis.Ev ROOTPASS_PLAIN
4193e1101f2SBrad Davisare set.
4203e1101f2SBrad Davis.It Ev ROOTPASS_PLAIN
4213e1101f2SBrad DavisPlain text string to set the root password to.
4225475ce62SMateusz Piotrowski.It Ev ZFSBOOT_POOL_NAME
4235475ce62SMateusz PiotrowskiName for the pool containing the base system.
4245475ce62SMateusz PiotrowskiDefault:
4255475ce62SMateusz Piotrowski.Dq zroot
4265475ce62SMateusz Piotrowski.It Ev ZFSBOOT_POOL_CREATE_OPTIONS
4275475ce62SMateusz PiotrowskiOptions to be used when creating the base system's pool.
4288422d54fSJens SchweikhardtEach option must be preceded by the -O flag to be taken into consideration
4295475ce62SMateusz Piotrowskior the pool will not be created due to errors using the command
4305475ce62SMateusz Piotrowski.Cm zpool .
4315475ce62SMateusz PiotrowskiDefault:
4325475ce62SMateusz Piotrowski.Dq Li "-O compress=lz4 -O atime=off"
4335475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BEROOT_NAME
4345475ce62SMateusz PiotrowskiName for the boot environment parent dataset.
4355475ce62SMateusz PiotrowskiThis is a non-mountable dataset meant to be a parent dataset where different
4365475ce62SMateusz Piotrowskiboot environment are going to be created.
4375475ce62SMateusz PiotrowskiDefault:
4385475ce62SMateusz Piotrowski.Dq ROOT
4395475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOTFS_NAME
4405475ce62SMateusz PiotrowskiName for the primary boot environment, which will be the default boot
4415475ce62SMateusz Piotrowskienvironment for the system.
4425475ce62SMateusz PiotrowskiDefault:
4435475ce62SMateusz Piotrowski.Dq default
4445475ce62SMateusz Piotrowski.It Ev ZFSBOOT_VDEV_TYPE
4455475ce62SMateusz PiotrowskiThe type of pool to be created for the base system.
446e0e236baSMarc FonvieilleThis variable can take one of this values: stripe (No redundancy),
4475475ce62SMateusz Piotrowskimirror (n-Way mirroring), raid10 (RAID 1+0 - n x 2-Way Mirrors),
4484a3c7e67SMaxim Konovalovraidz1 (RAID-Z1 - Single Redundancy RAID), raidz2 (RAID-Z2 - Double Redundancy RAID)
4494a3c7e67SMaxim Konovalovor raidz3 (RAID-Z3 Triple Redundancy RAID).
4505475ce62SMateusz PiotrowskiDefault:
4515475ce62SMateusz Piotrowski.Dq stripe
4525475ce62SMateusz Piotrowski.It Ev ZFSBOOT_FORCE_4K_SECTORS
45384f77303SJohn BaldwinControls the minimum sector size of the pool.
45484f77303SJohn BaldwinIf this variable is not empty, the minimum sector size is 4K.
45584f77303SJohn BaldwinIf this variable is empty, the minimum sector size is 512.
45684f77303SJohn BaldwinNote that the sector size of the pool will always be at least
45784f77303SJohn Baldwinthe sector size of the backing disks.
4585475ce62SMateusz PiotrowskiDefault:
4595475ce62SMateusz Piotrowski.Dq 1
4605475ce62SMateusz Piotrowski.It Ev ZFSBOOT_GELI_ENCRYPTION
4615475ce62SMateusz PiotrowskiIf this variable is not empty, it will use
4625475ce62SMateusz Piotrowski.Xr geli 8
4635475ce62SMateusz Piotrowskito encrypt the root pool, enabling automatically the
4645475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL
4655475ce62SMateusz Piotrowskivariable.
4665475ce62SMateusz PiotrowskiDefault:
4675475ce62SMateusz Piotrowski.Dq ""
4685475ce62SMateusz Piotrowski.It Ev ZFSBOOT_GELI_KEY_FILE
4695475ce62SMateusz PiotrowskiPath to the
4705475ce62SMateusz Piotrowski.Xr geli 8
4715475ce62SMateusz Piotrowskikeyfile used to encrypt the pool where the base system is stored.
4725475ce62SMateusz PiotrowskiDefault:
4735475ce62SMateusz Piotrowski.Dq Pa /boot/encryption.key
4745475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL
4758422d54fSJens SchweikhardtIf set, a separated boot pool will be created for the kernel of the
4765475ce62SMateusz Piotrowskisystem and
4775475ce62SMateusz Piotrowski.Xr loader 8 .
4785475ce62SMateusz PiotrowskiDefault: unset
4795475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL_CREATE_OPTIONS
4805475ce62SMateusz PiotrowskiOptions to use when creating the boot pool, when enabled (See
4815475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL ).
4825475ce62SMateusz PiotrowskiDefault: unset
4835475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL_NAME
4845475ce62SMateusz PiotrowskiName for the optional boot pool when it is enabled, (See
4855475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL ).
4865475ce62SMateusz PiotrowskiDefault:
4875475ce62SMateusz Piotrowski.Dq bootpool
4885475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL_SIZE
4895475ce62SMateusz PiotrowskiSize of the boot pool when it is enabled (See
4905475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL ).
4915475ce62SMateusz PiotrowskiDefault:
4925475ce62SMateusz Piotrowski.Dq 2g
4935475ce62SMateusz Piotrowski.It Ev ZFSBOOT_DISKS
4945475ce62SMateusz PiotrowskiDisks to be used for the base system, including the boot pool.
4955475ce62SMateusz PiotrowskiThis variable must only be used on a scripted installation.
4965475ce62SMateusz PiotrowskiSee
4975475ce62SMateusz Piotrowski.Sx SCRIPTING
4985475ce62SMateusz Piotrowskifor more information.
4995475ce62SMateusz PiotrowskiDefault: unset
5005475ce62SMateusz Piotrowski.It Ev ZFSBOOT_SWAP_SIZE
5015475ce62SMateusz PiotrowskiSize of the swap partition on each block device.
5025475ce62SMateusz PiotrowskiThis variable will be passed to
5035475ce62SMateusz Piotrowski.Xr gpart 8 ;
5045475ce62SMateusz Piotrowskiwhich supports SI unit suffixes.
5055475ce62SMateusz PiotrowskiDefault:
5065475ce62SMateusz Piotrowski.Dq 2g
5075475ce62SMateusz Piotrowski.It Ev ZFSBOOT_SWAP_ENCRYPTION
5085475ce62SMateusz PiotrowskiIf set, enables the encryption of the swap partition using
5095475ce62SMateusz Piotrowski.Xr geli 8 .
510ace67128SMateusz PiotrowskiDefault: ""
5115475ce62SMateusz Piotrowski.It Ev ZFSBOOT_SWAP_MIRROR
5125475ce62SMateusz PiotrowskiIf set, enables a swap mirroring using
5135475ce62SMateusz Piotrowski.Xr gmirror 8 .
5145475ce62SMateusz PiotrowskiDefault:
5155475ce62SMateusz Piotrowskiunset
5165475ce62SMateusz Piotrowski.It Ev ZFSBOOT_DATASETS
5175475ce62SMateusz PiotrowskiZFS datasets to be created on the root zpool, it requires the
5185475ce62SMateusz Piotrowskifollowing datasets:
5195475ce62SMateusz Piotrowski.Pa /tmp ,
5205475ce62SMateusz Piotrowski.Pa /var/tmp ,
5215475ce62SMateusz Piotrowski.Pa /$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME .
5225475ce62SMateusz PiotrowskiSee
5235475ce62SMateusz Piotrowski.Sx ZFS DATASETS
5248422d54fSJens Schweikhardtfor more information about how to populate this variable and
5258422d54fSJens Schweikhardtits default value.
5265475ce62SMateusz Piotrowski.It Ev ZFSBOOT_CONFIRM_LAYOUT
5275475ce62SMateusz PiotrowskiIf set and the installation is interactive, allow the user to confirm
5285475ce62SMateusz Piotrowskithe layout before continuing with the installation.
5295475ce62SMateusz PiotrowskiDefault:
5305475ce62SMateusz Piotrowski.Dq 1
53197e0f2b4SNathan Whitehorn.El
53253f01f3aSNathan Whitehorn.Sh SCRIPTING
53353f01f3aSNathan Whitehorn.Nm
5343b20b988SNathan Whitehornsupports unattended, or minimally-attended, installations using scripting.
5353b20b988SNathan WhitehornThis can be used with either modified physical installation media or with
5363b20b988SNathan Whitehorn.Xr diskless 8
5373b20b988SNathan Whitehorninstallations over the network; information on preparing such media can be
5383b20b988SNathan Whitehornfound in
5393b20b988SNathan Whitehorn.Sx BUILDING AUTOMATIC INSTALL MEDIA
5403b20b988SNathan Whitehorn.Pp
5413b20b988SNathan WhitehornScripted installations follow an essentially identical path to interactive
5423b20b988SNathan Whitehorninstallations, though with some minor feature differences (for example,
5433b20b988SNathan Whitehornscripted installations do not support fetching of remote distribution files
5443b20b988SNathan Whitehornsince scripted installations normally install the same files and the distributions
5453b20b988SNathan Whitehorncan be added directly to the installation media).
5463b20b988SNathan Whitehorn.Nm
54753f01f3aSNathan Whitehornscripts consist of two parts: a
54853f01f3aSNathan Whitehorn.Em preamble
54953f01f3aSNathan Whitehornand a
55053f01f3aSNathan Whitehorn.Em setup script .
55153f01f3aSNathan WhitehornThe preamble sets up the options for the installation (how to partition the
5523193ad88SNathan Whitehorndisk[s], which distributions to install, etc.) and the optional second part is
5533193ad88SNathan Whitehorna shell script run under
5543193ad88SNathan Whitehorn.Xr chroot 8
5553193ad88SNathan Whitehornin the newly installed system before
55653f01f3aSNathan Whitehorn.Nm
5575a7c7dc5SEnji Cooperexits.
5585a7c7dc5SEnji CooperThe two parts are separated by the usual script header (#!), which also sets
5595a7c7dc5SEnji Cooperthe interpreter for the setup script.
56053f01f3aSNathan Whitehorn.Pp
561b8639a10SNathan WhitehornA typical bsdinstall script, using the default filesystem layout and the UFS
562b8639a10SNathan Whitehornfilesystem, looks like this:
56353f01f3aSNathan Whitehorn.Bd -literal -offset indent
5645140034cSNathan WhitehornPARTITIONS=DEFAULT
56553f01f3aSNathan WhitehornDISTRIBUTIONS="kernel.txz base.txz"
56653f01f3aSNathan Whitehorn
56753f01f3aSNathan Whitehorn#!/bin/sh
568f91026bfSNathan Whitehornsysrc ifconfig_DEFAULT=DHCP
569fb4f0dcaSNathan Whitehornsysrc sshd_enable=YES
57053f01f3aSNathan Whitehornpkg install puppet
57153f01f3aSNathan Whitehorn.Ed
57253f01f3aSNathan Whitehorn.Pp
573b8639a10SNathan WhitehornFor a scripted installation involving a ZFS pool spanning multiple disks,
574b8639a10SNathan Whitehornthe script instead looks like this:
5755475ce62SMateusz Piotrowski.Bd -literal -offset indent
5765475ce62SMateusz PiotrowskiDISTRIBUTIONS="kernel.txz base.txz"
5775475ce62SMateusz Piotrowskiexport ZFSBOOT_VDEV_TYPE=stripe
578b8639a10SNathan Whitehornexport ZFSBOOT_DISKS="ada0 ada1"
5795475ce62SMateusz Piotrowskiexport nonInteractive="YES"
5805475ce62SMateusz Piotrowski
5815475ce62SMateusz Piotrowski#!/bin/sh
582f91026bfSNathan Whitehornecho "ifconfig_DEFAULT=DHCP" >> /etc/rc.conf
5835475ce62SMateusz Piotrowskiecho "sshd_enable=YES" >> /etc/rc.conf
5845475ce62SMateusz Piotrowskipkg install puppet
5855475ce62SMateusz Piotrowski.Ed
5865475ce62SMateusz Piotrowski.Pp
58753f01f3aSNathan WhitehornOn
58853f01f3aSNathan Whitehorn.Fx
58953f01f3aSNathan Whitehornrelease media, such a script placed at
59053f01f3aSNathan Whitehorn.Pa /etc/installerconfig
59153f01f3aSNathan Whitehornwill be run at boot time and the system will be rebooted automatically after
5925a7c7dc5SEnji Cooperthe installation has completed.
5935a7c7dc5SEnji CooperThis can be used for unattended network installation of new systems; see
59453f01f3aSNathan Whitehorn.Xr diskless 8
59553f01f3aSNathan Whitehornfor details.
59653f01f3aSNathan Whitehorn.Ss PREAMBLE
5975a7c7dc5SEnji CooperThe preamble consists of installer settings.
5985a7c7dc5SEnji CooperThese control global installation parameters (see
59953f01f3aSNathan Whitehorn.Sx ENVIRONMENT VARIABLES )
6005a7c7dc5SEnji Cooperas well as disk partitioning.
6015a7c7dc5SEnji CooperThe preamble is interpreted as a
60253f01f3aSNathan Whitehorn.Xr sh 1
6035a7c7dc5SEnji Cooperscript run at the very beginning of the install.
6045a7c7dc5SEnji CooperIf more complicated behavior than setting these variables is desired,
6055a7c7dc5SEnji Cooperarbitrary commands can be run here to extend the installer.
6065a7c7dc5SEnji CooperIn addition to the variables in
60753f01f3aSNathan Whitehorn.Sx ENVIRONMENT VARIABLES ,
60853f01f3aSNathan Whitehornin particular
60953f01f3aSNathan Whitehorn.Ev DISTRIBUTIONS ,
61053f01f3aSNathan Whitehornthe preamble can contain a variable
61153f01f3aSNathan Whitehorn.Ev PARTITIONS
61253f01f3aSNathan Whitehornwhich is passed to the
61353f01f3aSNathan Whitehorn.Cm scriptedpart
61453f01f3aSNathan Whitehorntarget to control disk setup.
615b8639a10SNathan Whitehorn.Pp
6166ef5a07eSDevin TeskeAlternatively,
6175b9ee78dSNathan Whitehornto use
6185b9ee78dSNathan Whitehorn.Cm zfsboot
6196ef5a07eSDevin Teskeinstead of
6205b9ee78dSNathan Whitehorn.Cm partedit ,
6216ef5a07eSDevin Teskethe preamble can contain the variable
6226ef5a07eSDevin Teske.Ev ZFSBOOT_DATASETS
6235b9ee78dSNathan Whitehorninstead of
624b8639a10SNathan Whitehorn.Ev PARTITIONS
625b8639a10SNathan Whitehorn(see below).
6268422d54fSJens SchweikhardtIf using
6278422d54fSJens Schweikhardt.Cm zfsboot ,
6288422d54fSJens Schweikhardtthe variables
6295475ce62SMateusz Piotrowski.Ev ZFSBOOT_DISKS
6305475ce62SMateusz Piotrowskiand
6315475ce62SMateusz Piotrowski.Ev ZFSBOOT_VDEV_TYPE
632b8639a10SNathan Whitehornmust be set to create the pool of disks for the base system.
6338422d54fSJens SchweikhardtUsually, for a mirrored booting disk, these two variables look like this:
6345475ce62SMateusz Piotrowski.Bd -literal -offset indent
6355475ce62SMateusz PiotrowskiZFSBOOT_DISKS="ada0 ada1"
6365475ce62SMateusz PiotrowskiZFSBOOT_VDEV_TYPE=mirror
6375475ce62SMateusz Piotrowski.Ed
6385475ce62SMateusz Piotrowski.Pp
6394a3c7e67SMaxim KonovalovRemember to export all the variables for the
6405475ce62SMateusz Piotrowski.Cm zfsboot
641b8639a10SNathan Whitehorncommand, otherwise installation will fail.
64253f01f3aSNathan Whitehorn.Ss SETUP SCRIPT
643aeff2fb3SNathan WhitehornFollowing the preamble is an optional shell script, beginning with a #!
6445a7c7dc5SEnji Cooperdeclaration.
6455a7c7dc5SEnji CooperThis script will be run at the end of the installation process inside a
64653f01f3aSNathan Whitehorn.Xr chroot 8
64753f01f3aSNathan Whitehornenvironment in the newly installed system and can be used to set up
6485a7c7dc5SEnji Cooperconfiguration files, install packages, etc.
6495a7c7dc5SEnji CooperNote that newly configured system services, e.g., networking have not
6505a7c7dc5SEnji Cooperbeen started in the installed system at this time and only installation
6515a7c7dc5SEnji Cooperhost services are available.
6525475ce62SMateusz Piotrowski.Ss ZFS DATASETS
653b8639a10SNathan WhitehornIf using
6545475ce62SMateusz Piotrowski.Cm zfsboot
655b8639a10SNathan Whitehornin an installation script, the
656b8639a10SNathan Whitehorn.Cm zfsboot
657b8639a10SNathan Whitehornpartitioning tool takes the
6585475ce62SMateusz Piotrowski.Ev ZFSBOOT_DATASETS
659b8639a10SNathan Whitehornvariable to create the ZFS datasets on the base system.
660b8639a10SNathan WhitehornThis variable definition can become large if the pool contains many datasets.
6618422d54fSJens SchweikhardtThe default value of
6625475ce62SMateusz Piotrowski.Ev ZFSBOOT_DATASETS
663b8639a10SNathan Whitehornis:
6645475ce62SMateusz Piotrowski.Bd -literal -offset indent
6655475ce62SMateusz Piotrowski# DATASET	OPTIONS (comma or space separated; or both)
6665475ce62SMateusz Piotrowski
6675475ce62SMateusz Piotrowski# Boot Environment [BE] root and default boot dataset
6685475ce62SMateusz Piotrowski/$ZFSBOOT_BEROOT_NAME				mountpoint=none
6695475ce62SMateusz Piotrowski/$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME	mountpoint=/
6705475ce62SMateusz Piotrowski
6713bb92304SMike Karels# Home directories separated so they are common to all BEs
6723bb92304SMike Karels/home		mountpoint=/home
6733bb92304SMike Karels
6745475ce62SMateusz Piotrowski# Compress /tmp, allow exec but not setuid
6755475ce62SMateusz Piotrowski/tmp		mountpoint=/tmp,exec=on,setuid=off
6765475ce62SMateusz Piotrowski
6775475ce62SMateusz Piotrowski# Do not mount /usr so that 'base' files go to the BEROOT
6785475ce62SMateusz Piotrowski/usr		mountpoint=/usr,canmount=off
6795475ce62SMateusz Piotrowski
6805475ce62SMateusz Piotrowski# Ports tree
6815475ce62SMateusz Piotrowski/usr/ports	setuid=off
6825475ce62SMateusz Piotrowski
6835475ce62SMateusz Piotrowski# Source tree (compressed)
6845475ce62SMateusz Piotrowski/usr/src
6855475ce62SMateusz Piotrowski
6865475ce62SMateusz Piotrowski# Create /var and friends
6875475ce62SMateusz Piotrowski/var		mountpoint=/var,canmount=off
6885475ce62SMateusz Piotrowski/var/audit	exec=off,setuid=off
6895475ce62SMateusz Piotrowski/var/crash	exec=off,setuid=off
6905475ce62SMateusz Piotrowski/var/log	exec=off,setuid=off
6915475ce62SMateusz Piotrowski/var/mail	atime=on
6925475ce62SMateusz Piotrowski/var/tmp	setuid=off
6935475ce62SMateusz Piotrowski.Ed
6945475ce62SMateusz Piotrowski.Pp
695b8639a10SNathan WhitehornThe first column is the name of the dataset to be created as part of the
6965475ce62SMateusz Piotrowski.Ev ZFSBOOT_POOL_NAME
697b8639a10SNathan Whitehornpool and the remainder of each line contains the options to be set on each dataset.
698b8639a10SNathan WhitehornIf multiple options are given, they can be separated by either commas or whitespace;
699b8639a10SNathan Whitehorneverything following a pound/hash character is ignored as a comment.
700c8923d19SNathan Whitehorn.Ss BUILDING AUTOMATIC INSTALL MEDIA
701c8923d19SNathan WhitehornIf building automatic install media, use tar to extract a release ISO:
702c8923d19SNathan Whitehorn.Dl mkdir release-media
7034b1e2c2fSFarhan Khan.Dl tar -C release-media -xvf FreeBSD-13.0-RELEASE-amd64-disc1.iso
704c8923d19SNathan Whitehorn.Pp
705c8923d19SNathan WhitehornThen place a script as above in
706c8923d19SNathan Whitehorn.Pa etc/installerconfig
707c8923d19SNathan Whitehorn.Pp
708c8923d19SNathan WhitehornThis directory can then be used directly as an NFS root for
709c8923d19SNathan Whitehorn.Xr diskless 8
710c8923d19SNathan Whitehorninstallations or it can be rebuilt into an ISO image using the release scripts in
711c8923d19SNathan Whitehorn.Pa /usr/src/release .
712c8923d19SNathan WhitehornFor example, on amd64:
713c8923d19SNathan Whitehorn.Dl sh /usr/src/release/amd64/mkisoimages.sh -b '13_0_RELEASE_AMD64_CD' output.iso release-media
71497e0f2b4SNathan Whitehorn.Sh HISTORY
71597e0f2b4SNathan WhitehornThis version of
71697e0f2b4SNathan Whitehorn.Nm
71797e0f2b4SNathan Whitehornfirst appeared in
71897e0f2b4SNathan Whitehorn.Fx 9.0 .
71997e0f2b4SNathan Whitehorn.Sh AUTHORS
72001c2b8acSBaptiste Daroussin.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org
721b8639a10SNathan Whitehorn.An Devin Teske Aq Mt dteske@FreeBSD.org
722b8639a10SNathan Whitehorn.An Allan Jude Aq Mt allanjude@FreeBSD.org
723