Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jul 2015 09:45:40 +0200
From:      "Patrick M. Hausen" <hausen@punkt.de>
To:        Claus Andersen <clan@wheel.dk>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: [SOLVED][BUG??] Unattended install using bsdinstall and ZFS
Message-ID:  <E761F68F-D0E5-4E72-85C2-10EDCD694441@punkt.de>
In-Reply-To: <alpine.BSF.2.20.1505291912550.66999@freesbee.wheel.dk>
References:  <alpine.BSF.2.20.1505191102100.63121@freesbee.wheel.dk> <555B141A.3000901@quip.cz> <alpine.BSF.2.20.1505291912550.66999@freesbee.wheel.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Claus,

> Am 29.05.2015 um 19:17 schrieb Claus Andersen <clan@wheel.dk>:
>=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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E761F68F-D0E5-4E72-85C2-10EDCD694441>