Table of Contents

Debian 10 Preseed

Not much has changed since the Debian 9 preseed that I can tell.

This is a basic implementation of what is possible with preseeding.


Gathering Information

Investigating to see what can be preseeded was quite the learning experience! You quickly find out that there isn't much recent info readily available to figure these things out.


Filter Script

I created this script to help me sort through the dat files (and to test my awk and sed skills).

You can find it in my gitlab repo as well.


Passwords


Partitioning

Preseed partitioning is still a thorn in my side. Every time I think I have it figured out, it slaps me around for a few hours and puts me back in my place. I'll put all the links and info I've gathered below.

Please note that some of these links have moved on me from time to time and they were just a few clicks away from where I had originally bookmarked them.


You can also browse the default recipes located inside the installer.

Try performing the install over ssh which will allow you to select and copy the text to a file to your local machine


Installing Additional Applications

Here's a couple ways to install some additional programs.

I'm sure there are other ways, but those two are what has worked for me so far.


Running Commands

You can also run commands on the target system. Here's some examples:

d-i preseed/late_command string \
  mkdir -p -m 700 /target/home/chuck/.ssh; \
  echo "ssh-ed25519 YOURxwxPUBLICxxxSSHxyxKEYxzx" > /target/home/chuck/.ssh/authorized_keys; \
  in-target chown --recursive chuck:chuck /home/chuck/.ssh; \
  in-target chmod 0644 /home/chuck/.ssh/authorized_keys; \
  in-target update-alternatives --set editor /usr/bin/vim.basic; \
  in-target passwd --expire chuck

Notes


Using the Preseed file

There's a few ways to use the preseed file.

I'll cover the first 2 for now.


Add it to the ISO

https://wiki.debian.org/DebianInstaller/Preseed/EditIso

I used the following packages to complete these steps:

Steps


Script it!

After doing that a couple of times when making changes, it got a little old. I figured why not create a bash script to handle most of it for me? You can check it out at my git repo.

Install using the ISO

Take the generated iso (preseed-debian.iso if you’re using the commands from above) and write it to a USB jump drive or upload it to Proxmox.

Boot the computer/VM from it and at the menu, select Advanced Options > Automated Install.

Wait a few seconds and it should start the installation process!

If you don't feel like navigating the menu and selecting the Automated Install, follow the zero interaction steps!


Host it Locally

Make sure your firewall ports are open to allow access to port 8000 (or whatever port you have the http.server set to). You should see the GET request on the computer hosting the file if it all worked out.


Zero Interaction

You can configure the iso file so all you have to do is boot the machine with the iso inserted.

It will automatically select the Automated Install option from the menu and proceed with the install.

Steps

This should be done before generating the md5sums in the above steps of adding the preseed to the iso.