Date: Tue, 19 May 2015 14:34:15 +0200 (CEST) From: Claus Andersen <clan@wheel.dk> To: Miroslav Lachman <000.fbsd@quip.cz> Cc: freebsd-stable@freebsd.org Subject: Re: Unattended install using bsdinstall and ZFS Message-ID: <alpine.BSF.2.20.1505191427120.63121@freesbee.wheel.dk> In-Reply-To: <555B141A.3000901@quip.cz> References: <alpine.BSF.2.20.1505191102100.63121@freesbee.wheel.dk> <555B141A.3000901@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 19 May 2015, Miroslav Lachman wrote: > I didn't use bsdinstall script, but I look in to code and I think you should > not set ZFSINTERACTIVE at all (or leave it empty?). > If it is set, you get Interactive install. > > You just need to set NONINTERACTIVE Thanks! This makes sense - but does not work for me. I have tried to set NONINTERACTIVE but I get the same result: The "ZFS Configuration" dialog. On a side note I would expect NONINTERACTIVE to be set in "script" - but I digress. When I follow the source as you suggest I see: /usr/libexec/bsdinstall/script calls "bsdinstall zfsboot" because ZFSBOOT_DISKS is set. Looking in /usr/libexec/bsdinstall/zfsboot the interesting bit here seems to be: # # If interactive and the user has not explicitly chosen a vdev type or disks, # make the user confirm scripted/default choices when proceeding to install. # : ${ZFSBOOT_CONFIRM_LAYOUT:=1} But I have set both vdev type and disks. I have even tried setting ZFSBOOT_CONFIRM_LAYOUT=0 - but most of my tests are without setting this. And this seems to control a later confimation step - and not the initial "ZFS Configuration" dialog. This bit kills me if I have ZFSINTERACTIVE set. But I have not (anymore): # User may have specifically requested ZFS-related operations be interactive ! f_interactive && f_zfsinteractive && unset $VAR_NONINTERACTIVE So when I examine the code with my limited capabilities everything looks correct. But it still fails for me. I do the following in a new clean and pristine VM booting the 10.1 CD. # export ZFSBOOT_DISKS="da0 da1" # export ZFSBOOT_VDEV_TYPE="mirror" # bsdinstall script install.txt But this still gives me the menu "ZFS Configuration". In the menu I can see that it has picked up ZFSBOOT_DISKS and ZFSBOOT_VDEV_TYPE. I have tried the following invariant: # export ZFSBOOT_DISKS="da0 da1" # export ZFSBOOT_VDEV_TYPE="mirror" # export NONINTERACTIVE="YES" # bsdinstall script install.txt With the same result. The minimal "install.txt" contains: DISTRIBUTIONS="kernel.txz base.txz" RELEASE="10.1" NONINTERACTIVE="YES" #!/bin/sh echo "Installation complete, running in host system" Anything obvious I am doing wrong? Or even the not-so-obvious would be welcome :-) Rgds, Claus
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1505191427120.63121>