Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Jun 2015 21:57:10 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Claus Andersen <clan@wheel.dk>, freebsd-stable@freebsd.org
Subject:   Re: [SOLVED][BUG??] Re: Unattended install using bsdinstall and ZFS
Message-ID:  <5570AD96.5030802@quip.cz>
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
Claus Andersen wrote on 05/29/2015 19:17:
> Hi!
>
> 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.
>
> The following minimal install script works as expected for UFS:
>
> install-ufs.txt
>      DISTRIBUTIONS="kernel.txz base.txz"
>      RELEASE="10.1"
>      PARTITIONS="da0"
>
>      #!/bin/sh
>      echo "Ready for post installation damage..."
>
> Invoke with:
>      bsdinstall script install-ufs.txt
>
> Now switching to ZFS I would expect the following to work:
>
> install-zfs1.txt
>      DISTRIBUTIONS="kernel.txz base.txz"
>      RELEASE="10.1"
>      ZFSBOOT_DISKS="da0 da1"
>      ZFSBOOT_VDEV_TYPE="mirror"
>
>      #!/bin/sh
>      echo "Ready for post installation damage..."
>
> Invoke with:
>      bsdinstall script install-zfs1.txt
>
> Failure:
>      - ZFSBOOT_DISKS, ZFSBOOT_VDEV_TYPE not picked up
>      - Asks for ZFS configuration interactively
>
> Miroslav Lachman hinted that from looking at the source I should set
> NONINTERACTIVE. This does not work.
>
> Hours later I have figure out the following which works(tm):
>
> install-zfs2.txt
>      DISTRIBUTIONS="kernel.txz base.txz"
>      RELEASE="10.1"
>      export ZFSBOOT_DISKS="da0 da1"
>      export ZFSBOOT_VDEV_TYPE="mirror"
>      export nonInteractive="YES"
>
>      #!/bin/sh
>      echo "Ready for post installation damage..."
>
> Invoke with:
>      bsdinstall script install-zfs2.txt
>
> This works as expected but it does not sit nice with me. But I am no
> guru so I would be very very happy if anyone can confirm if my findings
> are bogus or not? There is a huge number of indirect variables which
> really confuses me! It seems that either someone is putting in a lot of
> indirections but is not done yet - or vice versa. So "proper" usage is
> up in the air.
>
> Findings:
> - CAPITAL letters are used for "input" variables
> - CamelCase is used for "internal" variables.
> - NONINTERACTIVE should be set by default when using "bsdinstall script"
> - Setting NONINTERACTIVE manually is not picked up
> - Setting nonInteractive works but is bad practice and not intended by
> design
> - Doing export as part of the bsdinstall script is not what was intended
> by design
>
> Does these findings sound reasonable? If so - would it be fair to
> consider the current functionality a bug? Or am I too stupid to get the
> feature?
>
> I can file a PR and help out with test and documentation. But the
> current incarnation of bsdinstall is too convoluted for my low level of
> script-fu.


I am out of free time so I cannot go deeper in this problem. But from 
what I see I can confirm your findings - it seems like a bug and it 
would be good if you can file a PR for it so it will not be lost.

Miroslav Lachman




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5570AD96.5030802>