From owner-freebsd-stable@freebsd.org Wed Jul 29 07:54:16 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEFCF9ABB9A for ; Wed, 29 Jul 2015 07:54:16 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64B8ABA6 for ; Wed, 29 Jul 2015 07:54:15 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [217.29.44.10]) by gate2.intern.punkt.de with ESMTP id t6T7jb6x094140; Wed, 29 Jul 2015 09:45:37 +0200 (CEST) Received: from [217.29.44.217] ([217.29.44.217]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id t6T7jbam061843; Wed, 29 Jul 2015 09:45:37 +0200 (CEST) (envelope-from hausen@punkt.de) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: [SOLVED][BUG??] Unattended install using bsdinstall and ZFS From: "Patrick M. Hausen" In-Reply-To: Date: Wed, 29 Jul 2015 09:45:40 +0200 Cc: freebsd-stable@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <555B141A.3000901@quip.cz> To: Claus Andersen X-Mailer: Apple Mail (2.2102) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2015 07:54:16 -0000 Hi, Claus, > Am 29.05.2015 um 19:17 schrieb Claus Andersen : >=20 > Hi! >=20 > A quick re-cap: Want to do an unattended FreeBSD install using = bsdinstall and ZFS. I now have a workaround and consider crying = wol^H^H^Hbug. >=20 > The following minimal install script works as expected for UFS: > [...] > Hours later I have figure out the following which works(tm): >=20 > install-zfs2.txt > DISTRIBUTIONS=3D"kernel.txz base.txz" > RELEASE=3D"10.1" > export ZFSBOOT_DISKS=3D"da0 da1" > export ZFSBOOT_VDEV_TYPE=3D"mirror" > export nonInteractive=3D"YES" >=20 > #!/bin/sh > echo "Ready for post installation damage..." Thanks for your detailled report. I can confirm your findings and I was = able to do an unattended install using these settings: DISTRIBUTIONS=3D"base.txz doc.txz games.txz kernel.txz lib32.txz" INTERFACES=3D"em0" export ZFSBOOT_DISKS=3D"da0 da1" export ZFSBOOT_VDEV_TYPE=3D"mirror" export ZFSBOOT_FORCE_4K_SECTORS=3D"1" export ZFSBOOT_SWAP_SIZE=3D"8g" export ZFSBOOT_SWAP_MIRROR=3D"1" export ZFSBOOT_POOL_CREATE_OPTIONS=3D"-O compress=3Dlz4 -O = checksum=3Dfletcher4" export nonInteractive=3D"YES" Yet, there are still 2 things that prevent a truly unattended = installation. First, at least for me, the installer alway displays a dialog with debug messages which needs to = be explicitly confirmed at the end of the installation. This is not the case if I use = UFS. With UFS it just reboots into the freshly installed system. I could work around that one by explicitly calling "reboot" at the end = of the shell script part of installerconfig. Second, if you do remote installation via IPMI and serial console over = IP, the standard install environment copied from CD calls this code in /etc/rc.local: [...] else # Serial or other console echo echo "Welcome to FreeBSD!" echo echo "Please choose the appropriate terminal type for your system." echo "Common console types are:" echo " ansi Standard ANSI terminal" echo " vt100 VT100 or compatible terminal" echo " xterm xterm terminal emulator (or compatible)" echo " cons25w cons25w terminal" echo echo -n "Console type [vt100]: " read TERM TERM=3D${TERM:-vt100} fi=20 IMHO hardwiring this is not a good idea. Can be solved by simply = commenting out the unwanted parts, but this should be configurable in installerconfig. Currently it = quite defeats the purpose of *unattended* installations. At least I expect "power on, get some = coffee, login via ssh into newly installed system" ;-) Kind regards Patrick M. Hausen Leiter Netzwerke und Sicherheit --=20 punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe Tel. 0721 9109 0 * Fax 0721 9109 100 info@punkt.de http://www.punkt.de Gf: J=C3=BCrgen Egeling AG Mannheim 108285