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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[email protected]"
