How to automate installation for Debian 12 with Preseed

I always wanted to try automate installation of Debian using Preseed.

Today is the day!

Where to get Preseed Configuration

There are many good example of Pressed configurations out there but I wanted to start with official one.

So I made a copy on my own server.

$ curl -L https://www.debian.org/releases/bookworm/example-preseed.txt -o bookworm.cfg

Then, I just wanted to see bare minimal information without any comment

$ cat bookworm.cfg | grep -v \# | sed '/^$/d' > t00.cfg

Where to test Preseed Configuration

Since I have a macOS 13 and I thought using VMWare Fusion 13 might be the best place to test Preseed Configuration.

As of this writing, Debian 12 is NOT officially supported in VMWare Fusion 13 but you can use Debian 11 to create Debian 12 VM.

VMware Compatibility Guide

First Try

Since this is my first try, I'm going to call it t00.cfg.

If successful, I'm going to make some changes and call it t01.cfg

Step-by-Step Instructions

It turns out the example I found on the official site works great!

So, here is step by step instruction with some screenshot

preseed-01.png

1) Choose "Advanced options"

preseed-02.png

2) Choose "Automated install"

preseed-03.png

3) Type in location of Preseed Configuration file.

In my case, https://tchung.org/d-i/t01.cfg

preseed-04.png

4) After the installation is completed, login as root from VMWare Fusion Console.

Create a user account with home directory and sudo privilege.

# useradd -m -G sudo tchung
# passwd tchung

preseed-05.png

5) find out IP assigned from Virtual Machine Library.

Now, you should be able to ssh from your macOS to Debian 12 Virtual Machine.

% ssh tchung@192.168.83.232