Automated server install reference

Thank you very much @kbrannen for your initial idea to get interactivity in this installer. I implemented this and it worked great but was not what I wanted. Today I remembered my firstboot script which I use to get around a gnome flaw and it is working wonderful:

How to get interactivity during autoinstall using whiptail

First create a script which contains your commands:

- |
  cat <<'EOF' | tee -a /
  #Change to tty3 to display the dialog
  if ! chvt 3 &>/dev/null; then

  export TERM=linux
  export NCURSES_NO_UTF8_ACS=1

  printf "\ec"

  # Hostname dialog
  custom_hostname=$(whiptail --inputbox "Please enter a Hostname:\n\nDefault: [$default_hostname]" 9 30 --clear --nocancel --ok-button "Enter" 3>&1 1>&2 2>&3)

  if [[ -z $custom_hostname ]]; then

  sed -i 's/focal-autoinstall/'"$custom_hostname"'/' /autoinstall.yaml

  #Change back to tty1
  if ! chvt 1 &>/dev/null; then


Then call the script the following way to block the installer from continuing:

- bash / <> /dev/tty3 >&0 2>&1

Preinsert whatever you want to replace or however you want it:

  # User section
    hostname: focal-autoinstall

Have fun with nice whiptail dialogs :slight_smile:

EDIT: Not tested but might work for late-commands, too

While update is defined, it doesn’t look like updates is. This appears to only have the option of security (default) or all pertaining to which updates are ran post install. It may be worth defining the declaration. This was a fairly recent addition:

1 Like

Throws a syntax error at @. Additionally, I can find no rsyslog class in cloudinit/reporting/