# Unattended install with latest release patches



## einsibjani (Aug 25, 2019)

I want to create a custom ISO with installerconfig script to speed up server installs.

The guides I’ve read start with the release ISO, mount it, insert script and create a new ISO. Is there a way to incluse the latest patchset for the release or will I need to use generate-release.sh to do it?


----------



## SirDice (Aug 26, 2019)

You will need to build your own release(7). You could use sysutils/firstboot-freebsd-update if you use an automated deployment.


----------



## einsibjani (Aug 27, 2019)

SirDice said:


> You will need to build your own release(7). You could use sysutils/firstboot-freebsd-update if you use an automated deployment.



Thanks, that helps. Now I'm trying to add a prompt to the installer for things like hostname and network configuration. A simple echo and read works, but I was wondering if I could use the bsdinstall targets. Preferably I could call the targets I want (hostname, netconfig) but script the rest (partitioning etc.).

Is this possible from a installerconfig script, or will I have to create a custom release, replacing the auto script with my own script?


----------



## T-Daemon (Aug 27, 2019)

einsibjani said:


> Is this possible from a installerconfig script


Have a look at bsdinstall(8) and at the .../etc/installerconfig file of the installation image.

The _installerconfig_ installation script consists of two parts, a _preample_ and a _setup script_. In _preample_ all partitioning is done, ufs, zfs filesystems. If you web search for installerconfig and zfs you can find elaborate partitioning examples, in bsdinstall(8) more simple. For ufs examples look at _scriptedpart_.

In the _setup script_ part the setups like hostname, network, or wathever you want to configure is done, or postinstall tasks like installing packages, sending an email that the installation has finished, etc.


----------



## SirDice (Aug 27, 2019)

Also note that there are a number of other "firstboot" scripts that are extremely useful for automated installations. 

sysutils/firstboot-pkgs Installs packages at 'firstboot'
sysutils/firstboot-growfs Expand filesystems at 'firstboot'

The 'firstboot' trigger is the existence of a /firstboot file. When you create a base image make sure to create this file in order to trigger these scripts.


----------

