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> 4bbe2a1daSBjoern A. Zeeb.\" Copyright (c) 2024 The FreeBSD Foundation 5bbe2a1daSBjoern A. Zeeb.\" 6bbe2a1daSBjoern A. Zeeb.\" Portions of this documentation were written by Björn Zeeb 7bbe2a1daSBjoern 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.\" 30bbe2a1daSBjoern 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*ee9cfd72SIsaac Freund.It Cm pkgbase Op Fl --no-kernel 248*ee9cfd72SIsaac FreundFetch and install base system packages to 249*ee9cfd72SIsaac Freund.Ev BSDINSTALL_CHROOT . 250*ee9cfd72SIsaac FreundPackages are fetched according to repository configuration in 251*ee9cfd72SIsaac Freund.Ev BSDINSTALL_PKG_REPOS_DIR 252*ee9cfd72SIsaac Freundif set, or 253*ee9cfd72SIsaac Freund.Lk pkg.freebsd.org 254*ee9cfd72SIsaac Freundotherwise. 255*ee9cfd72SIsaac FreundIf the 256*ee9cfd72SIsaac Freund.Fl --no-kernel 257*ee9cfd72SIsaac Freundoption is passed, no kernel is installed. 258bbe2a1daSBjoern A. Zeeb.It Cm firmware 259bbe2a1daSBjoern A. Zeebexecutes 260bbe2a1daSBjoern A. Zeeb.Xr fwget 8 261bbe2a1daSBjoern A. Zeebinside the 262bbe2a1daSBjoern A. Zeeb.Ev BSDINSTALL_CHROOT 263bbe2a1daSBjoern A. Zeebto install any needed and available firmware for the new system. 26497e0f2b4SNathan Whitehorn.It Cm rootpass 26597e0f2b4SNathan WhitehornInteractively invokes 26697e0f2b4SNathan Whitehorn.Xr passwd 1 26797e0f2b4SNathan Whitehornin the new system to set the root user's password. 26897e0f2b4SNathan Whitehorn.It Cm adduser 26997e0f2b4SNathan WhitehornInteractively invokes 27097e0f2b4SNathan Whitehorn.Xr adduser 8 27197e0f2b4SNathan Whitehornin the new system. 27297e0f2b4SNathan Whitehorn.It Cm time 27397e0f2b4SNathan WhitehornInteractively sets the time, date, and time zone of the new system. 27497e0f2b4SNathan Whitehorn.It Cm services 27597e0f2b4SNathan WhitehornQueries the user for the system daemons to begin at system startup, 27697e0f2b4SNathan Whitehornwriting the result into the new system's 27797e0f2b4SNathan Whitehorn.Pa rc.conf . 2785b9ee78dSNathan Whitehorn.It Cm entropy 2795b9ee78dSNathan WhitehornReads a small amount of data from 2805b9ee78dSNathan Whitehorn.Pa /dev/random 2815b9ee78dSNathan Whitehornand stores it in a file in the new system's root directory. 28297e0f2b4SNathan Whitehorn.It Cm config 2835a7c7dc5SEnji CooperInstalls the configuration files destined for the new system, e.g., 2845a7c7dc5SEnji Cooper.Xr rc.conf 5 28597e0f2b4SNathan Whitehornfragments generated by 28697e0f2b4SNathan Whitehorn.Cm netconfig , 28797e0f2b4SNathan Whitehornetc.) onto the new system. 28897e0f2b4SNathan Whitehorn.El 28997e0f2b4SNathan Whitehorn.Sh ENVIRONMENT VARIABLES 29097e0f2b4SNathan WhitehornThe following environment variables control various aspects of the installation 2915a7c7dc5SEnji Cooperprocess. 2925a7c7dc5SEnji CooperMany are used internally during installation and have reasonable default values 2935a7c7dc5SEnji Cooperfor most installation scenarios. 2945a7c7dc5SEnji CooperOthers are set by various interactive user prompts, and can be usefully 2955a7c7dc5SEnji Cooperoverridden when making scripted or customized installers. 296a8f5c9d3SMateusz Piotrowski.Bl -tag -width "BSDINSTALL_DISTSITE" 297a107ddbbSRebecca Cran.It Ev TMPDIR 298a107ddbbSRebecca CranThe directory to use for temporary files. 299a107ddbbSRebecca CranDefault: 300a107ddbbSRebecca Cran.Dq Pa /tmp 30197e0f2b4SNathan Whitehorn.It Ev DISTRIBUTIONS 3026e02be63SMateusz PiotrowskiThe set of distributions to install, e.g., "base.txz kernel.txz ports.txz". 3035475ce62SMateusz PiotrowskiDefault: unset 30489be2c1eSMateusz Piotrowski.It Ev PARTITIONS 30589be2c1eSMateusz PiotrowskiThe partitioning of the disk onto which the system is being installed. 30689be2c1eSMateusz PiotrowskiSee 30789be2c1eSMateusz Piotrowski.Cm scriptedpart 30889be2c1eSMateusz Piotrowskiof 30989be2c1eSMateusz Piotrowskithe 31089be2c1eSMateusz Piotrowski.Sx TARGETS 3115140034cSNathan Whitehornsection for format details. If this variable is unset, the installer will 3125140034cSNathan Whitehornuse the default partitioning as in 3135140034cSNathan Whitehorn.Cm autopart . 31489be2c1eSMateusz PiotrowskiDefault: unset 31597e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_DISTDIR 31697e0f2b4SNathan WhitehornThe directory in which the distribution files can be found (or to which they 3175a7c7dc5SEnji Coopershould be downloaded). 3185a7c7dc5SEnji CooperDefault: 3195475ce62SMateusz Piotrowski.Dq Pa /usr/freebsd-dist 320aeff2fb3SNathan Whitehorn.It Ev BSDINSTALL_DISTSITE 321aeff2fb3SNathan WhitehornURL from which the distribution files should be downloaded if they are not 322aeff2fb3SNathan Whitehornalready present in the directory defined by 323aeff2fb3SNathan Whitehorn.Ev BSDINSTALL_DISTDIR . 324aeff2fb3SNathan WhitehornThis should be a full path to the files, including architecture and release 3255a7c7dc5SEnji Coopernames. 3265a7c7dc5SEnji CooperMost targets, e.g., 327aeff2fb3SNathan Whitehorn.Cm auto 328aeff2fb3SNathan Whitehornand 3295a7c7dc5SEnji Cooper.Cm jail , 330aeff2fb3SNathan Whitehornthat prompt for a 331aeff2fb3SNathan Whitehorn.Fx 332aeff2fb3SNathan Whitehornmirror will skip that step if this variable is already defined in the 3335a7c7dc5SEnji Cooperenvironment. 3345a7c7dc5SEnji CooperExample: 335aa35037bSMateusz Piotrowski.Pa https://download.freebsd.org/ftp/releases/powerpc/powerpc64/13.1-RELEASE/ 336aa35037bSMateusz Piotrowskior 337aa35037bSMateusz Piotrowski.Pa http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/12.2-RELEASE/ . 338*ee9cfd72SIsaac Freund.It Ev BSDINSTALL_PKG_REPOS_DIR 339*ee9cfd72SIsaac FreundDirectory containing 340*ee9cfd72SIsaac Freund.Xr pkg 8 341*ee9cfd72SIsaac Freundrepository configuration files used by the 342*ee9cfd72SIsaac Freund.Cm pkgbase 343*ee9cfd72SIsaac Freundtarget. 344*ee9cfd72SIsaac FreundSee 345*ee9cfd72SIsaac Freund.Sx REPOSITORY CONFIGURATION 346*ee9cfd72SIsaac Freundin 347*ee9cfd72SIsaac Freund.Xr pkg.conf 5 . 348*ee9cfd72SIsaac FreundDefault: unset 34997e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_CHROOT 35097e0f2b4SNathan WhitehornThe directory into which the distribution files should be unpacked and the 35197e0f2b4SNathan Whitehorndirectory at which the root file system of the new system should be mounted. 35297e0f2b4SNathan WhitehornDefault: 3535475ce62SMateusz Piotrowski.Dq Pa /mnt 35497e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_LOG 3555a7c7dc5SEnji CooperPath to a log file for the installation. 3565a7c7dc5SEnji CooperDefault: 357a107ddbbSRebecca Cran.Dq Pa $TMPDIR/bsdinstall_log 358bbe2a1daSBjoern A. Zeeb.It Ev BSDINSTALL_SKIP_FIRMWARE 359bbe2a1daSBjoern A. ZeebIf not empty, the 360bbe2a1daSBjoern A. Zeeb.Cm auto 361bbe2a1daSBjoern A. Zeebtarget 362bbe2a1daSBjoern A. Zeebwill not invoke the 363bbe2a1daSBjoern A. Zeeb.Cm firmware 364bbe2a1daSBjoern A. Zeebtarget. 365fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_HARDENING 366fea2cffbSMateusz PiotrowskiIf not empty, the 367fea2cffbSMateusz Piotrowski.Cm auto 368fea2cffbSMateusz Piotrowskitarget 369fea2cffbSMateusz Piotrowskiwill not invoke the 370fea2cffbSMateusz Piotrowski.Cm hardening 371fea2cffbSMateusz Piotrowskitarget. 372fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_HOSTNAME 373fea2cffbSMateusz PiotrowskiIf not empty, the 374fea2cffbSMateusz Piotrowski.Cm auto 375fea2cffbSMateusz Piotrowskitarget 376fea2cffbSMateusz Piotrowskiwill not invoke the 377fea2cffbSMateusz Piotrowski.Cm hostname 378fea2cffbSMateusz Piotrowskitarget. 379fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_KEYMAP 380fea2cffbSMateusz PiotrowskiIf not empty, the 381fea2cffbSMateusz Piotrowski.Cm auto 382fea2cffbSMateusz Piotrowskitarget 383fea2cffbSMateusz Piotrowskiwill not invoke the 384fea2cffbSMateusz Piotrowski.Cm keymap 385fea2cffbSMateusz Piotrowskitarget. 386fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_MANUAL 387fea2cffbSMateusz PiotrowskiIf not empty, the 388fea2cffbSMateusz Piotrowski.Cm auto 389fea2cffbSMateusz Piotrowskitarget will not offer to open a shell in the new system 390fea2cffbSMateusz Piotrowskifor final manual modifications. 391fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_SERVICES 392fea2cffbSMateusz PiotrowskiIf not empty, the 393fea2cffbSMateusz Piotrowski.Cm auto 394fea2cffbSMateusz Piotrowskitarget 395fea2cffbSMateusz Piotrowskiwill not invoke the 396fea2cffbSMateusz Piotrowski.Cm services 397fea2cffbSMateusz Piotrowskitarget. 398fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_TIME 399fea2cffbSMateusz PiotrowskiIf not empty, the 400fea2cffbSMateusz Piotrowski.Cm auto 401fea2cffbSMateusz Piotrowskitarget 402fea2cffbSMateusz Piotrowskiwill not invoke the 403fea2cffbSMateusz Piotrowski.Cm time 404fea2cffbSMateusz Piotrowskitarget. 405fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_USERS 406fea2cffbSMateusz PiotrowskiIf not empty, the 407fea2cffbSMateusz Piotrowski.Cm auto 408fea2cffbSMateusz Piotrowskitarget 409fea2cffbSMateusz Piotrowskiwill not invoke the 410fea2cffbSMateusz Piotrowski.Cm adduser 411fea2cffbSMateusz Piotrowskitarget. 412fea2cffbSMateusz Piotrowski.It Ev BSDINSTALL_SKIP_FINALCONFIG 413fea2cffbSMateusz PiotrowskiIf not empty, the 414fea2cffbSMateusz Piotrowski.Cm auto 415fea2cffbSMateusz Piotrowskitarget will not show the final configuration dialog, 416fea2cffbSMateusz Piotrowskiwhere earlier configuration choices can be revisited. 41797e0f2b4SNathan Whitehorn.It Ev BSDINSTALL_TMPETC 41897e0f2b4SNathan WhitehornDirectory where files destined for the new system's 41997e0f2b4SNathan Whitehorn.Pa /etc 42097e0f2b4SNathan Whitehornwill be stored until the 42197e0f2b4SNathan Whitehorn.Cm config 4225a7c7dc5SEnji Coopertarget is executed. 4235a7c7dc5SEnji CooperIf this directory does not already exist, it will be created. 4245a7c7dc5SEnji CooperDefault: 425a107ddbbSRebecca Cran.Dq Pa $TMPDIR/bsdinstall_etc 426ff134040SDevin Teske.It Ev BSDINSTALL_TMPBOOT 427ff134040SDevin TeskeDirectory where files destined for the new system's 428ff134040SDevin Teske.Pa /boot 429ff134040SDevin Teskewill be stored until the 430ff134040SDevin Teske.Cm config 4315a7c7dc5SEnji Coopertarget is executed. 4325a7c7dc5SEnji CooperIf this directory does not already exist, it will be created. 4335a7c7dc5SEnji CooperDefault: 434a107ddbbSRebecca Cran.Dq Pa $TMPDIR/bsdinstall_boot 4353e1101f2SBrad Davis.It Ev ROOTPASS_ENC 4363e1101f2SBrad DavisEncrypted string to set the root password to in the format expected by 4373e1101f2SBrad Davis.Xr pw 8 4383e1101f2SBrad Davis.Fl H Ar 0 . 4393e1101f2SBrad DavisThis option is used if both it and 4403e1101f2SBrad Davis.Ev ROOTPASS_PLAIN 4413e1101f2SBrad Davisare set. 4423e1101f2SBrad Davis.It Ev ROOTPASS_PLAIN 4433e1101f2SBrad DavisPlain text string to set the root password to. 4445475ce62SMateusz Piotrowski.It Ev ZFSBOOT_POOL_NAME 4455475ce62SMateusz PiotrowskiName for the pool containing the base system. 4465475ce62SMateusz PiotrowskiDefault: 4475475ce62SMateusz Piotrowski.Dq zroot 4485475ce62SMateusz Piotrowski.It Ev ZFSBOOT_POOL_CREATE_OPTIONS 4495475ce62SMateusz PiotrowskiOptions to be used when creating the base system's pool. 4508422d54fSJens SchweikhardtEach option must be preceded by the -O flag to be taken into consideration 4515475ce62SMateusz Piotrowskior the pool will not be created due to errors using the command 4525475ce62SMateusz Piotrowski.Cm zpool . 4535475ce62SMateusz PiotrowskiDefault: 4545475ce62SMateusz Piotrowski.Dq Li "-O compress=lz4 -O atime=off" 4555475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BEROOT_NAME 4565475ce62SMateusz PiotrowskiName for the boot environment parent dataset. 4575475ce62SMateusz PiotrowskiThis is a non-mountable dataset meant to be a parent dataset where different 4585475ce62SMateusz Piotrowskiboot environment are going to be created. 4595475ce62SMateusz PiotrowskiDefault: 4605475ce62SMateusz Piotrowski.Dq ROOT 4615475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOTFS_NAME 4625475ce62SMateusz PiotrowskiName for the primary boot environment, which will be the default boot 4635475ce62SMateusz Piotrowskienvironment for the system. 4645475ce62SMateusz PiotrowskiDefault: 4655475ce62SMateusz Piotrowski.Dq default 4665475ce62SMateusz Piotrowski.It Ev ZFSBOOT_VDEV_TYPE 4675475ce62SMateusz PiotrowskiThe type of pool to be created for the base system. 468e0e236baSMarc FonvieilleThis variable can take one of this values: stripe (No redundancy), 4695475ce62SMateusz Piotrowskimirror (n-Way mirroring), raid10 (RAID 1+0 - n x 2-Way Mirrors), 4704a3c7e67SMaxim Konovalovraidz1 (RAID-Z1 - Single Redundancy RAID), raidz2 (RAID-Z2 - Double Redundancy RAID) 4714a3c7e67SMaxim Konovalovor raidz3 (RAID-Z3 Triple Redundancy RAID). 4725475ce62SMateusz PiotrowskiDefault: 4735475ce62SMateusz Piotrowski.Dq stripe 4745475ce62SMateusz Piotrowski.It Ev ZFSBOOT_FORCE_4K_SECTORS 47584f77303SJohn BaldwinControls the minimum sector size of the pool. 47684f77303SJohn BaldwinIf this variable is not empty, the minimum sector size is 4K. 47784f77303SJohn BaldwinIf this variable is empty, the minimum sector size is 512. 47884f77303SJohn BaldwinNote that the sector size of the pool will always be at least 47984f77303SJohn Baldwinthe sector size of the backing disks. 4805475ce62SMateusz PiotrowskiDefault: 4815475ce62SMateusz Piotrowski.Dq 1 4825475ce62SMateusz Piotrowski.It Ev ZFSBOOT_GELI_ENCRYPTION 4835475ce62SMateusz PiotrowskiIf this variable is not empty, it will use 4845475ce62SMateusz Piotrowski.Xr geli 8 4855475ce62SMateusz Piotrowskito encrypt the root pool, enabling automatically the 4865475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL 4875475ce62SMateusz Piotrowskivariable. 4885475ce62SMateusz PiotrowskiDefault: 4895475ce62SMateusz Piotrowski.Dq "" 4905475ce62SMateusz Piotrowski.It Ev ZFSBOOT_GELI_KEY_FILE 4915475ce62SMateusz PiotrowskiPath to the 4925475ce62SMateusz Piotrowski.Xr geli 8 4935475ce62SMateusz Piotrowskikeyfile used to encrypt the pool where the base system is stored. 4945475ce62SMateusz PiotrowskiDefault: 4955475ce62SMateusz Piotrowski.Dq Pa /boot/encryption.key 4965475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL 4978422d54fSJens SchweikhardtIf set, a separated boot pool will be created for the kernel of the 4985475ce62SMateusz Piotrowskisystem and 4995475ce62SMateusz Piotrowski.Xr loader 8 . 5005475ce62SMateusz PiotrowskiDefault: unset 5015475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL_CREATE_OPTIONS 5025475ce62SMateusz PiotrowskiOptions to use when creating the boot pool, when enabled (See 5035475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL ). 5045475ce62SMateusz PiotrowskiDefault: unset 5055475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL_NAME 5065475ce62SMateusz PiotrowskiName for the optional boot pool when it is enabled, (See 5075475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL ). 5085475ce62SMateusz PiotrowskiDefault: 5095475ce62SMateusz Piotrowski.Dq bootpool 5105475ce62SMateusz Piotrowski.It Ev ZFSBOOT_BOOT_POOL_SIZE 5115475ce62SMateusz PiotrowskiSize of the boot pool when it is enabled (See 5125475ce62SMateusz Piotrowski.Ev ZFSBOOT_BOOT_POOL ). 5135475ce62SMateusz PiotrowskiDefault: 5145475ce62SMateusz Piotrowski.Dq 2g 5155475ce62SMateusz Piotrowski.It Ev ZFSBOOT_DISKS 5165475ce62SMateusz PiotrowskiDisks to be used for the base system, including the boot pool. 5175475ce62SMateusz PiotrowskiThis variable must only be used on a scripted installation. 5185475ce62SMateusz PiotrowskiSee 5195475ce62SMateusz Piotrowski.Sx SCRIPTING 5205475ce62SMateusz Piotrowskifor more information. 5215475ce62SMateusz PiotrowskiDefault: unset 5225475ce62SMateusz Piotrowski.It Ev ZFSBOOT_SWAP_SIZE 5235475ce62SMateusz PiotrowskiSize of the swap partition on each block device. 5245475ce62SMateusz PiotrowskiThis variable will be passed to 5255475ce62SMateusz Piotrowski.Xr gpart 8 ; 5265475ce62SMateusz Piotrowskiwhich supports SI unit suffixes. 5275475ce62SMateusz PiotrowskiDefault: 5285475ce62SMateusz Piotrowski.Dq 2g 5295475ce62SMateusz Piotrowski.It Ev ZFSBOOT_SWAP_ENCRYPTION 5305475ce62SMateusz PiotrowskiIf set, enables the encryption of the swap partition using 5315475ce62SMateusz Piotrowski.Xr geli 8 . 532ace67128SMateusz PiotrowskiDefault: "" 5335475ce62SMateusz Piotrowski.It Ev ZFSBOOT_SWAP_MIRROR 5345475ce62SMateusz PiotrowskiIf set, enables a swap mirroring using 5355475ce62SMateusz Piotrowski.Xr gmirror 8 . 5365475ce62SMateusz PiotrowskiDefault: 5375475ce62SMateusz Piotrowskiunset 5385475ce62SMateusz Piotrowski.It Ev ZFSBOOT_DATASETS 5395475ce62SMateusz PiotrowskiZFS datasets to be created on the root zpool, it requires the 5405475ce62SMateusz Piotrowskifollowing datasets: 5415475ce62SMateusz Piotrowski.Pa /tmp , 5425475ce62SMateusz Piotrowski.Pa /var/tmp , 5435475ce62SMateusz Piotrowski.Pa /$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME . 5445475ce62SMateusz PiotrowskiSee 5455475ce62SMateusz Piotrowski.Sx ZFS DATASETS 5468422d54fSJens Schweikhardtfor more information about how to populate this variable and 5478422d54fSJens Schweikhardtits default value. 5485475ce62SMateusz Piotrowski.It Ev ZFSBOOT_CONFIRM_LAYOUT 5495475ce62SMateusz PiotrowskiIf set and the installation is interactive, allow the user to confirm 5505475ce62SMateusz Piotrowskithe layout before continuing with the installation. 5515475ce62SMateusz PiotrowskiDefault: 5525475ce62SMateusz Piotrowski.Dq 1 55397e0f2b4SNathan Whitehorn.El 55453f01f3aSNathan Whitehorn.Sh SCRIPTING 55553f01f3aSNathan Whitehorn.Nm 5563b20b988SNathan Whitehornsupports unattended, or minimally-attended, installations using scripting. 5573b20b988SNathan WhitehornThis can be used with either modified physical installation media or with 5583b20b988SNathan Whitehorn.Xr diskless 8 5593b20b988SNathan Whitehorninstallations over the network; information on preparing such media can be 5603b20b988SNathan Whitehornfound in 5613b20b988SNathan Whitehorn.Sx BUILDING AUTOMATIC INSTALL MEDIA 5623b20b988SNathan Whitehorn.Pp 5633b20b988SNathan WhitehornScripted installations follow an essentially identical path to interactive 5643b20b988SNathan Whitehorninstallations, though with some minor feature differences (for example, 5653b20b988SNathan Whitehornscripted installations do not support fetching of remote distribution files 5663b20b988SNathan Whitehornsince scripted installations normally install the same files and the distributions 5673b20b988SNathan Whitehorncan be added directly to the installation media). 5683b20b988SNathan Whitehorn.Nm 56953f01f3aSNathan Whitehornscripts consist of two parts: a 57053f01f3aSNathan Whitehorn.Em preamble 57153f01f3aSNathan Whitehornand a 57253f01f3aSNathan Whitehorn.Em setup script . 57353f01f3aSNathan WhitehornThe preamble sets up the options for the installation (how to partition the 5743193ad88SNathan Whitehorndisk[s], which distributions to install, etc.) and the optional second part is 5753193ad88SNathan Whitehorna shell script run under 5763193ad88SNathan Whitehorn.Xr chroot 8 5773193ad88SNathan Whitehornin the newly installed system before 57853f01f3aSNathan Whitehorn.Nm 5795a7c7dc5SEnji Cooperexits. 5805a7c7dc5SEnji CooperThe two parts are separated by the usual script header (#!), which also sets 5815a7c7dc5SEnji Cooperthe interpreter for the setup script. 58253f01f3aSNathan Whitehorn.Pp 583b8639a10SNathan WhitehornA typical bsdinstall script, using the default filesystem layout and the UFS 584b8639a10SNathan Whitehornfilesystem, looks like this: 58553f01f3aSNathan Whitehorn.Bd -literal -offset indent 5865140034cSNathan WhitehornPARTITIONS=DEFAULT 58753f01f3aSNathan WhitehornDISTRIBUTIONS="kernel.txz base.txz" 58853f01f3aSNathan Whitehorn 58953f01f3aSNathan Whitehorn#!/bin/sh 590f91026bfSNathan Whitehornsysrc ifconfig_DEFAULT=DHCP 591fb4f0dcaSNathan Whitehornsysrc sshd_enable=YES 59253f01f3aSNathan Whitehornpkg install puppet 59353f01f3aSNathan Whitehorn.Ed 59453f01f3aSNathan Whitehorn.Pp 595b8639a10SNathan WhitehornFor a scripted installation involving a ZFS pool spanning multiple disks, 596b8639a10SNathan Whitehornthe script instead looks like this: 5975475ce62SMateusz Piotrowski.Bd -literal -offset indent 5985475ce62SMateusz PiotrowskiDISTRIBUTIONS="kernel.txz base.txz" 5995475ce62SMateusz Piotrowskiexport ZFSBOOT_VDEV_TYPE=stripe 600b8639a10SNathan Whitehornexport ZFSBOOT_DISKS="ada0 ada1" 6015475ce62SMateusz Piotrowskiexport nonInteractive="YES" 6025475ce62SMateusz Piotrowski 6035475ce62SMateusz Piotrowski#!/bin/sh 604f91026bfSNathan Whitehornecho "ifconfig_DEFAULT=DHCP" >> /etc/rc.conf 6055475ce62SMateusz Piotrowskiecho "sshd_enable=YES" >> /etc/rc.conf 6065475ce62SMateusz Piotrowskipkg install puppet 6075475ce62SMateusz Piotrowski.Ed 6085475ce62SMateusz Piotrowski.Pp 60953f01f3aSNathan WhitehornOn 61053f01f3aSNathan Whitehorn.Fx 61153f01f3aSNathan Whitehornrelease media, such a script placed at 61253f01f3aSNathan Whitehorn.Pa /etc/installerconfig 61353f01f3aSNathan Whitehornwill be run at boot time and the system will be rebooted automatically after 6145a7c7dc5SEnji Cooperthe installation has completed. 6155a7c7dc5SEnji CooperThis can be used for unattended network installation of new systems; see 61653f01f3aSNathan Whitehorn.Xr diskless 8 61753f01f3aSNathan Whitehornfor details. 61853f01f3aSNathan Whitehorn.Ss PREAMBLE 6195a7c7dc5SEnji CooperThe preamble consists of installer settings. 6205a7c7dc5SEnji CooperThese control global installation parameters (see 62153f01f3aSNathan Whitehorn.Sx ENVIRONMENT VARIABLES ) 6225a7c7dc5SEnji Cooperas well as disk partitioning. 6235a7c7dc5SEnji CooperThe preamble is interpreted as a 62453f01f3aSNathan Whitehorn.Xr sh 1 6255a7c7dc5SEnji Cooperscript run at the very beginning of the install. 6265a7c7dc5SEnji CooperIf more complicated behavior than setting these variables is desired, 6275a7c7dc5SEnji Cooperarbitrary commands can be run here to extend the installer. 6285a7c7dc5SEnji CooperIn addition to the variables in 62953f01f3aSNathan Whitehorn.Sx ENVIRONMENT VARIABLES , 63053f01f3aSNathan Whitehornin particular 63153f01f3aSNathan Whitehorn.Ev DISTRIBUTIONS , 63253f01f3aSNathan Whitehornthe preamble can contain a variable 63353f01f3aSNathan Whitehorn.Ev PARTITIONS 63453f01f3aSNathan Whitehornwhich is passed to the 63553f01f3aSNathan Whitehorn.Cm scriptedpart 63653f01f3aSNathan Whitehorntarget to control disk setup. 637b8639a10SNathan Whitehorn.Pp 6386ef5a07eSDevin TeskeAlternatively, 6395b9ee78dSNathan Whitehornto use 6405b9ee78dSNathan Whitehorn.Cm zfsboot 6416ef5a07eSDevin Teskeinstead of 6425b9ee78dSNathan Whitehorn.Cm partedit , 6436ef5a07eSDevin Teskethe preamble can contain the variable 6446ef5a07eSDevin Teske.Ev ZFSBOOT_DATASETS 6455b9ee78dSNathan Whitehorninstead of 646b8639a10SNathan Whitehorn.Ev PARTITIONS 647b8639a10SNathan Whitehorn(see below). 6488422d54fSJens SchweikhardtIf using 6498422d54fSJens Schweikhardt.Cm zfsboot , 6508422d54fSJens Schweikhardtthe variables 6515475ce62SMateusz Piotrowski.Ev ZFSBOOT_DISKS 6525475ce62SMateusz Piotrowskiand 6535475ce62SMateusz Piotrowski.Ev ZFSBOOT_VDEV_TYPE 654b8639a10SNathan Whitehornmust be set to create the pool of disks for the base system. 6558422d54fSJens SchweikhardtUsually, for a mirrored booting disk, these two variables look like this: 6565475ce62SMateusz Piotrowski.Bd -literal -offset indent 6575475ce62SMateusz PiotrowskiZFSBOOT_DISKS="ada0 ada1" 6585475ce62SMateusz PiotrowskiZFSBOOT_VDEV_TYPE=mirror 6595475ce62SMateusz Piotrowski.Ed 6605475ce62SMateusz Piotrowski.Pp 6614a3c7e67SMaxim KonovalovRemember to export all the variables for the 6625475ce62SMateusz Piotrowski.Cm zfsboot 663b8639a10SNathan Whitehorncommand, otherwise installation will fail. 66453f01f3aSNathan Whitehorn.Ss SETUP SCRIPT 665aeff2fb3SNathan WhitehornFollowing the preamble is an optional shell script, beginning with a #! 6665a7c7dc5SEnji Cooperdeclaration. 6675a7c7dc5SEnji CooperThis script will be run at the end of the installation process inside a 66853f01f3aSNathan Whitehorn.Xr chroot 8 66953f01f3aSNathan Whitehornenvironment in the newly installed system and can be used to set up 6705a7c7dc5SEnji Cooperconfiguration files, install packages, etc. 6715a7c7dc5SEnji CooperNote that newly configured system services, e.g., networking have not 6725a7c7dc5SEnji Cooperbeen started in the installed system at this time and only installation 6735a7c7dc5SEnji Cooperhost services are available. 6745475ce62SMateusz Piotrowski.Ss ZFS DATASETS 675b8639a10SNathan WhitehornIf using 6765475ce62SMateusz Piotrowski.Cm zfsboot 677b8639a10SNathan Whitehornin an installation script, the 678b8639a10SNathan Whitehorn.Cm zfsboot 679b8639a10SNathan Whitehornpartitioning tool takes the 6805475ce62SMateusz Piotrowski.Ev ZFSBOOT_DATASETS 681b8639a10SNathan Whitehornvariable to create the ZFS datasets on the base system. 682b8639a10SNathan WhitehornThis variable definition can become large if the pool contains many datasets. 6838422d54fSJens SchweikhardtThe default value of 6845475ce62SMateusz Piotrowski.Ev ZFSBOOT_DATASETS 685b8639a10SNathan Whitehornis: 6865475ce62SMateusz Piotrowski.Bd -literal -offset indent 6875475ce62SMateusz Piotrowski# DATASET OPTIONS (comma or space separated; or both) 6885475ce62SMateusz Piotrowski 6895475ce62SMateusz Piotrowski# Boot Environment [BE] root and default boot dataset 6905475ce62SMateusz Piotrowski/$ZFSBOOT_BEROOT_NAME mountpoint=none 6915475ce62SMateusz Piotrowski/$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME mountpoint=/ 6925475ce62SMateusz Piotrowski 6933bb92304SMike Karels# Home directories separated so they are common to all BEs 6943bb92304SMike Karels/home mountpoint=/home 6953bb92304SMike Karels 6965475ce62SMateusz Piotrowski# Compress /tmp, allow exec but not setuid 6975475ce62SMateusz Piotrowski/tmp mountpoint=/tmp,exec=on,setuid=off 6985475ce62SMateusz Piotrowski 6995475ce62SMateusz Piotrowski# Do not mount /usr so that 'base' files go to the BEROOT 7005475ce62SMateusz Piotrowski/usr mountpoint=/usr,canmount=off 7015475ce62SMateusz Piotrowski 7025475ce62SMateusz Piotrowski# Ports tree 7035475ce62SMateusz Piotrowski/usr/ports setuid=off 7045475ce62SMateusz Piotrowski 7055475ce62SMateusz Piotrowski# Source tree (compressed) 7065475ce62SMateusz Piotrowski/usr/src 7075475ce62SMateusz Piotrowski 7085475ce62SMateusz Piotrowski# Create /var and friends 7095475ce62SMateusz Piotrowski/var mountpoint=/var,canmount=off 7105475ce62SMateusz Piotrowski/var/audit exec=off,setuid=off 7115475ce62SMateusz Piotrowski/var/crash exec=off,setuid=off 7125475ce62SMateusz Piotrowski/var/log exec=off,setuid=off 7135475ce62SMateusz Piotrowski/var/mail atime=on 7145475ce62SMateusz Piotrowski/var/tmp setuid=off 7155475ce62SMateusz Piotrowski.Ed 7165475ce62SMateusz Piotrowski.Pp 717b8639a10SNathan WhitehornThe first column is the name of the dataset to be created as part of the 7185475ce62SMateusz Piotrowski.Ev ZFSBOOT_POOL_NAME 719b8639a10SNathan Whitehornpool and the remainder of each line contains the options to be set on each dataset. 720b8639a10SNathan WhitehornIf multiple options are given, they can be separated by either commas or whitespace; 721b8639a10SNathan Whitehorneverything following a pound/hash character is ignored as a comment. 722c8923d19SNathan Whitehorn.Ss BUILDING AUTOMATIC INSTALL MEDIA 723c8923d19SNathan WhitehornIf building automatic install media, use tar to extract a release ISO: 724c8923d19SNathan Whitehorn.Dl mkdir release-media 7254b1e2c2fSFarhan Khan.Dl tar -C release-media -xvf FreeBSD-13.0-RELEASE-amd64-disc1.iso 726c8923d19SNathan Whitehorn.Pp 727c8923d19SNathan WhitehornThen place a script as above in 728c8923d19SNathan Whitehorn.Pa etc/installerconfig 729c8923d19SNathan Whitehorn.Pp 730c8923d19SNathan WhitehornThis directory can then be used directly as an NFS root for 731c8923d19SNathan Whitehorn.Xr diskless 8 732c8923d19SNathan Whitehorninstallations or it can be rebuilt into an ISO image using the release scripts in 733c8923d19SNathan Whitehorn.Pa /usr/src/release . 734c8923d19SNathan WhitehornFor example, on amd64: 735c8923d19SNathan Whitehorn.Dl sh /usr/src/release/amd64/mkisoimages.sh -b '13_0_RELEASE_AMD64_CD' output.iso release-media 73697e0f2b4SNathan Whitehorn.Sh HISTORY 73797e0f2b4SNathan WhitehornThis version of 73897e0f2b4SNathan Whitehorn.Nm 73997e0f2b4SNathan Whitehornfirst appeared in 74097e0f2b4SNathan Whitehorn.Fx 9.0 . 74197e0f2b4SNathan Whitehorn.Sh AUTHORS 74201c2b8acSBaptiste Daroussin.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org 743b8639a10SNathan Whitehorn.An Devin Teske Aq Mt dteske@FreeBSD.org 744b8639a10SNathan Whitehorn.An Allan Jude Aq Mt allanjude@FreeBSD.org 745