From owner-freebsd-sysinstall@FreeBSD.ORG Tue Jan 22 03:07:56 2013 Return-Path: Delivered-To: freebsd-sysinstall@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4EFE8844 for ; Tue, 22 Jan 2013 03:07:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 13174F45 for ; Tue, 22 Jan 2013 03:07:55 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from wanderer.tachypleus.net (adsl-76-208-68-53.dsl.mdsnwi.sbcglobal.net [76.208.68.53]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MH000M6MBCY1J10@smtpauth3.wiscmail.wisc.edu> for freebsd-sysinstall@FreeBSD.org; Mon, 21 Jan 2013 21:07:49 -0600 (CST) X-Spam-PmxInfo: Server=avs-3, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.1.22.25716, SenderIP=76.208.68.53 X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.208.68.53 X-Wisc-Sender: whitehorn@wisc.edu Message-id: <50FE0282.3020007@freebsd.org> Date: Mon, 21 Jan 2013 21:07:46 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130112 Thunderbird/17.0.2 To: freebsd-sysinstall@FreeBSD.org Subject: Scripting in bsdinstall X-BeenThere: freebsd-sysinstall@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Sysinstall Work List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2013 03:07:56 -0000 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