Install a server unattended from an answer file, and prove it matches

short · 60 min · Objective 2.1

Task

Install a Linux server with no questions asked, from an autoinstall or kickstart file you wrote, and prove the result matches the file: the hostname, the user, the packages and the disk layout are what you specified, not what the installer would have chosen. An unattended install is how servers are built identically, and it only helps if you check that it did what you asked.

Steps

  1. Write the answer file: hostname auto-srv, one admin user, a static or DHCP address on the host-only network, the OpenSSH server, and two extra packages of your choice. Save a copy as lab/install/answer-file.txt.
  2. Record in lab/install/expected.csv with header property,value the hostname, user, and each extra package you asked for.
  3. Boot the new VM from the installation ISO with the answer file available, and let it install without touching the keyboard. Note the start and end times in lab/install/timing.txt.
  4. Log in and save hostnamectl, id <user> and the package manager's list of installed packages to lab/install/actual.txt.
  5. Record in lab/install/scale.txt which method you would use to build fifty of these -- PXE, a template or image, or the same answer file -- and why.

Verify

These checks run in a POSIX shell: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. A stock Windows PowerShell or Command Prompt has no awk or grep, so there the first line fails.

grep -c 'auto-srv' lab/install/actual.txt
awk -F, 'NR>1 {print $2}' lab/install/expected.csv | while read v; do grep -q -- "$v" lab/install/actual.txt && echo "found $v" || echo "MISSING $v"; done
grep -c . lab/install/timing.txt
grep -Eic 'pxe|template|image|answer' lab/install/scale.txt

Every expected value must print found. A MISSING line means the installer silently used a default for something you specified -- often a mistyped key in the answer file -- which is exactly the kind of drift that makes fifty supposedly identical servers different.

Notes

Windows Server does the same with an autounattend.xml answer file, produced with the Windows System Image Manager. At scale, organisations combine methods: PXE to boot, an answer file to install, and configuration management afterwards.

This is an independent study companion for CompTIA Server+ SK0-005 and is not produced by or endorsed by CompTIA.