Build of ISOs and execution of the debian-installer in qemu up to ssh connection when the machine is ready:

travis-badge

Build of ISOs, execution of the debian-installer in qemu and deployment with Ansible:

azure-badge


 repository: debian_stable_preseed

Debian Preseed

Debian Preseed is a mean to completely automate the debian-installer steps. There are several ways to setup the debian installer “preseeding”. The one I choose is to edit the netboot ISO image in order to include my installer configuration.

The preseed.cfg creates a hands off installation with the following features:
  • Swiss keyboard and locale
  • GPT partioning
  • No swap
  • Sudo without password for users in the sudo group

Feel free to adapt to your needs!

To rebuild the ISO images, make sure you’ve Docker installed and type:

make
This will download the debian installer ISO image, modify it and provide 2 ISO:
  • buster-server.iso -> the available disk space is assigned mostly to /var
  • buster-standard.iso -> the available disk space is assigned mostly to /

To use the ISO:

sudo dd if=buster-server.iso of=<put the device matching the USB key you just plugged>

Warning

this will erase the entire content of the USB key.

Warning

the debian installer will not ask any question -> it will erase completely the first drive of the machine to install debian.

Testing the iso locally

To test the iso, first make sure you have KVM / Qemu and a vncviewer installed. You can then run:
  • make test_iso in one terminal: this will start QEMU in background and wait for the full installation to finish by connecting with SSH inside the resulting installation
  • vncviewer localhost:59000 to see the process in action
Grub menu Partitioning Installation Running Preseed

Ansible

Ansible is the ultimate IT automation tool. test_ansible.sh fetches the roles using ansible-galaxy. Then, it calls ansible-playbook on the freshly installed debian image.

As a demonstration, the following roles are applied (see task.yml):

This is just an example how easy it is to deploy fully automatically a debian system.

Have fun!