diff --git a/share/man/man5/autoinstall.conf.5 b/share/man/man5/autoinstall.conf.5 new file mode 100644 index 00000000..c4da4cd7 --- /dev/null +++ b/share/man/man5/autoinstall.conf.5 @@ -0,0 +1,121 @@ +.Dd April 9, 2023 +.Dt AUTOINSTALL.CONF 5 +.Os +.Sh NAME +.Nm autoinstall.conf +.Nd automatic installation configuration +.Sh SYNOPSIS +.Nm /etc/autoinstall.conf +.Sh DESCRIPTION +.Nm +configures +.Xr sysinstall 8 +to do an automatic operating system +.Xr installation 7 . +.Pp +The system administrator can automate operating system installations by +following +.Xr release-iso-modification 7 +to embed the +.Pa /etc/autoinstall.conf +file into the release cdrom filesystem. +Existing installations can similarly be automatically upgraded using +.Xr autoupgrade.conf 5 . +.Pp +Each line is formatted as +.Ar question Ns = Ns Ar answer +which provides an +.Ar answer +to a +.Ar question +asked during installation. +Alternatively +.Ar question Ns += Ns Ar answer +appends to an existing answer (if any) separated by a space, and +.Ar question Ns ++= Ns Ar answer +appends another line to an existing answer (if any). +Empty lines and lines starting with +.Sq # +are comments and are ignored. +Otherwise whitespace is significant. +The empty answer accepts the default answer (if any) and is different from no +answer, which makes +.Xr sysinstall 8 +ask the question normally. +Installations can be made fully non-interactive using +.Sy accept_defaults . +.Pp +The questions in chronological order are as follows: +.Bl -tag -width "12345678" +.It Sy accept_defaults Ns "=" Ns Oo Sy no "|" yes Oc ( default Sy no ) +Accept the default answer (if any) to questions that were not +configured in +.Nm . +This feature makes installations entirely automated even if unexpected questions +are asked, although the essential questions must be answered. +.It Sy countdown Ns "=" Ns Ar seconds No ( default Li 10 ) +Count down for this many +.Ar seconds +with a warning that an automated installation is about to happen. +The countdown happens if the +.Sy ready +question is answered and either the +.Sy disked +or +.Sy confirm_install +questions are answered. +.It Sy ignore_missing_programs Ns "=" Ns Oo Sy no "|" yes Oc ( default Sy no ) +Ignore if the installer environment does not have the needed ports installed. +This situation ordinarily does not happen. +ready +.It Sy ready Ns "=" Ns Ar affirmation +A human readable positive affirmation of your choice that you're ready to +install, useful for fully automated installations. +Not answering this question is useful for semi-automated installations where one +would acknowledge the installation before it's begun. +It also provides the opportunity to escape to a shell before installing. +.It Sy kblayout Ns "=" Ns Oo Sy default "|" Ar layout Oc ( default Sy default ) +Switch to this keyboard +.Ar layout +using +.Xr chkblayout 1 . +The choice is set as the system default in +.Xr kblayout 5 . +.It Sy videomode Ns "=" Ns Oo Sy no "|" Sy yes "|" Ar WIDTH Ns x Ns Ar HEIGHT Ns x Ns Ar BPP Oc ( default Sy yes ) +Interactively select a graphics resolution using +.Xr chvideomode 1 +or non-interactively set it to the specified resolution. +The choice is set as the system default in +.Xr videomode 5 . +.El +.Sh FILES +.Bl -tag -width "/etc/autoinstall.conf" -compact +.It Pa /etc/autoinstall.conf +Automatic installation configuration. +.El +.Sh EXAMPLES +.Bd -literal +accept_defaults=yes +ready=Automatically +kblayout=us +videomode=1280x720x32 +grub=yes +grub_password=no +disked++=mktable mbr +disked++=mkpart +disked++=0% +disked++=100% +disked++=ext2 +disked++=/ +confirm_install=yes +hostname=dragon +password_hash_root= +finally=reboot +.Ed +.Sh SEE ALSO +.Xr autoupgrade.conf 5 , +.Xr upgrade.conf 5 , +.Xr release-iso-modification 7 , +.Xr upgrade 7 , +.Xr sysupgrade 8 , +.Xr tix 8 diff --git a/share/man/man5/upgrade.conf.5 b/share/man/man5/upgrade.conf.5 index c2b35e8c..0929324b 100644 --- a/share/man/man5/upgrade.conf.5 +++ b/share/man/man5/upgrade.conf.5 @@ -183,6 +183,8 @@ src = no system = yes .Ed .Sh SEE ALSO +.Xr autoinstall.conf 5 , +.Xr autoupgrade.conf 5 , .Xr upgrade 7 , .Xr sysupgrade 8 , .Xr tix 8 diff --git a/sysinstall/sysinstall.8 b/sysinstall/sysinstall.8 index e40ada20..94378fb8 100644 --- a/sysinstall/sysinstall.8 +++ b/sysinstall/sysinstall.8 @@ -20,5 +20,6 @@ must be run as root with stdin, stdout and stderr all pointing to the terminal. It is intended to be run from a live environment and not from an actual installation. .Sh SEE ALSO +.Xr autoinstall.conf 5 , .Xr installation 7 , .Xr sysupgrade 8 diff --git a/sysinstall/sysinstall.c b/sysinstall/sysinstall.c index 11f8ba0b..b9cc6a55 100644 --- a/sysinstall/sysinstall.c +++ b/sysinstall/sysinstall.c @@ -1425,7 +1425,7 @@ int main(void) !access_or_die("/etc/sshd_config", F_OK); while ( true ) { - prompt(input, sizeof(input), "enable_ssh", + prompt(input, sizeof(input), "enable_sshd", "Enable ssh server? (yes/no)", might_want_sshd ? "yes" : "no"); if ( strcasecmp(input, "no") == 0 ) @@ -1478,7 +1478,7 @@ int main(void) bool enable_sshd_password = false; while ( true ) { - prompt(input, sizeof(input), "enable_ssh_password", + prompt(input, sizeof(input), "enable_sshd_password", "Enable sshd password authentication? (yes/no)", "no"); if ( strcasecmp(input, "no") == 0 ) break; @@ -1496,7 +1496,7 @@ int main(void) } while ( enable_sshd_password ) { - prompt(input, sizeof(input), "enable_ssh_root_password", + prompt(input, sizeof(input), "enable_sshd_root_password", "Enable sshd password authentication for root? (yes/no)", "no"); if ( strcasecmp(input, "no") == 0 ) diff --git a/sysinstall/sysupgrade.8 b/sysinstall/sysupgrade.8 index 5a15c2db..f860f07e 100644 --- a/sysinstall/sysupgrade.8 +++ b/sysinstall/sysupgrade.8 @@ -22,5 +22,6 @@ must be run as root with stdin, stdout and stderr all pointing to the terminal. It is intended to be run from a live environment and not from an actual installation. .Sh SEE ALSO +.Xr autoupgrade.conf 5 , .Xr upgrade 7 , .Xr sysinstall 8