From owner-freebsd-stable@FreeBSD.ORG Tue May 19 12:34:27 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6974CFFF for ; Tue, 19 May 2015 12:34:27 +0000 (UTC) Received: from freesbee.wheel.dk (freesbee.wheel.dk [IPv6:2001:6c8:130::97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freesbee.wheel.dk", Issuer "RapidSSL SHA256 CA - G3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 26F441393 for ; Tue, 19 May 2015 12:34:26 +0000 (UTC) Received: by freesbee.wheel.dk (Postfix, from userid 1023) id C3F58324613; Tue, 19 May 2015 14:34:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wheel.dk; s=20131204; t=1432038855; bh=GochkIl6JD5PBU6EiOYmycdIxfun9irlILvDu4Iy7Gc=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=DMcc51NN9+S7yNJrhQIWZKMF99mBHpcr+x9GxNK64IUDFYpouaiVNZYQOb5IxRijY TKFPbqU5ikCWCKlQSDweyqG32kQfs7jOREMblyOCWHW5ZWZ+nIo/XcN6sX/91dyqjM hUBklUHAp2+br9hDIEASbYhSpEWGuTZXSmrHzVEQa8LUo7xCelO1leOTmFGeYzhJTe zF8tRVDV1oC3hnBefxCwF/5/ATfiKZ4ieD8wKTrQnYOTccbvu7ghZE0EzdihFeoxGu A+T46/38jAZfL/23Sl0kQ3J4G1lCwgyTSLd2gXQe2l6IcMPd2Meznxe24pZI0rXnn2 FGe4oUAFwdWNQ== Received: from localhost (localhost [127.0.0.1]) by freesbee.wheel.dk (Postfix) with ESMTP id C2F3A3243FE; Tue, 19 May 2015 14:34:15 +0200 (CEST) Date: Tue, 19 May 2015 14:34:15 +0200 (CEST) From: Claus Andersen To: Miroslav Lachman <000.fbsd@quip.cz> cc: freebsd-stable@freebsd.org Subject: Re: Unattended install using bsdinstall and ZFS In-Reply-To: <555B141A.3000901@quip.cz> Message-ID: References: <555B141A.3000901@quip.cz> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed 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: Tue, 19 May 2015 12:34:27 -0000 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