[Bug 203777] bsdinstall(8) zfsboot script unusable for unattended installs, unless "internal" variable nonInteractive is set

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Nov 24 20:49:54 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203777

Devin Teske <dteske at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dteske at FreeBSD.org

--- Comment #3 from Devin Teske <dteske at FreeBSD.org> ---
You are intended to set this variable in /etc/installerconfig of your scripted
install. Is it ineffectual there? Or are you saying that you wish to not have
to set it?

Some people *want* interactive scripted installs.

For example, I once worked at a company where it was hard to get installation
media out to people. Networks were untrusted and we had to mail installers to
people (be they CD, DVD, USB, etc.). In such a case, leaving interactive
prompts enabled by NOT setting nonInteractive=1 meant that the install media
could be wielded through a combination of telephone and e-mail instructions to
get through the interactive bits.

Concretely, one case was where we had to instruct the installer to get the
distribution sets from an alternate server (if nonInteractive=1 then you simply
get an error and you die, there is no prompt to allow you to select an
alternate media source).

So not every script should be setting nonInteractive=1. I think each script
should make its own decisions.

The standard way of creating a script for me (an author) is to enable
debugging, watch the debug log to see which variables are being prompted-for
when an interactive screen pops up, go code that variable into the answer-file
(/etc/installerconfig), and move on. When all the variables that are required
have been given default values, I may or may-not then disable debug=1 in the
script (I think we turned it on by default some long time ago, anyway).

Either way, nonInteractive=1 is actually not designed to make a script
unattended. To make an install unattended, you have to pre-answer all the
questions. The nonInteractive nob is just to tell the code that nobody is there
to drive an interactive interface (e.g, a menu to select a media source) should
given information not be sufficient.

In other words, nonInteractive is there to tell the code "you cannot ``prompt
for more'' when information is lacking". It does not disable msgbox's when
errors occur, and it does not magically given answers to required questions
(such as "what disk should I partition" -- which would be uber dangerous to
make it answer itself when nonInteractive=1; you'd essentially have an
installer that wreaks havoc on any/all hardware simply by booting it).

For example, as has been the case for over 20 years, you set the network
interface to igb1 but there is no such interface; if nonInteractive is set,
that's the end of your journey (but if unset, you'll get a prompt to select
your network interface).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list