16.14. Automating Debian Installations with Preseed Files
Problem
You want a fairly simple way to automate network installation of new Debian PCs, and to create custom installations for different roles, such as web servers, workstations, file servers, and so forth.
Solution
Create a preseed, or preconfiguration file, that answers the installer questions, and does your package selections for you. First, study the example preseed file at http://d-i.alioth.debian.org/manual/example-preseed.txt Then, create one from your own Debian system by running these two commands:
# debconf-get-selections --installer > preseed.txt
# debconf-get-selections >> file preseed.txtYour own preseed.txt is going to look different from the example-preseed.txt; it's messier and has a lot more entries. You can't use your own preseed.txt as-is, but you can see exactly what was done on your system, and you can copy anything you want to duplicate to example-preseed.txt.
The tasksel command selects package groups. You can see a list of these:
$ tasksel --list-tasks
u desktop Desktop environment
i web-server Web server
u print-server Print server
u dns-server DNS server
[...]u means uninstalled, and
i means installed. Display
individual packages with this command:
$ tasksel --task-packages desktop
twm
gimp-print
xresprobe
openoffice.org
[...]Use tasksel to select package groups in your preseed file like this:
#tasksel tasksel/desktop multiselect kde-desktop, xfce-desktop #tasksel tasksel/first multiselect standard, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access