Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2013 21:07:46 -0600
From:      Nathan Whitehorn <nwhitehorn@freebsd.org>
To:        freebsd-sysinstall@FreeBSD.org
Subject:   Scripting in bsdinstall
Message-ID:  <50FE0282.3020007@freebsd.org>

next in thread | raw e-mail | index | archive | help
After many, many requests, I've finally added a first round of real
scripting support to bsdinstall, which is now documented in some detail
in bsdinstall(8) on -CURRENT.

The basic scheme (some changes still coming) is to make a script that
looks like this:

PARTITIONS=ada0
DISTRIBUTIONS="kernel.txz base.txz"

#!/bin/sh
echo "Installation complete, running in host system"
echo "sshd_enable=YES" >> /etc/rc.conf
echo "Setup done"

This replaces anything on ada0 with a default partitioning scheme (other
partition schemes and layouts can be specified, as well as installations
spanning multiple disks; see the man page), installs a minimal set of
distributions, and then runs the system setup script that is found at
the bottom and can be used to install packages, etc.

Right now, the release(7) infrastructure is set up to autorun a script
like this at /etc/installerconfig, if it exists, which is meant for
unattended PXE installations. You can also run any other script by
running bsdinstall script /path/to/script. In the next week or so, I'm
hoping to hook up PXE image generation to the release infrastructure.

Please let me know if you have any comments about how this works or
feature requests.
-Nathan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50FE0282.3020007>