# Avoiding The Needless Multiplication Of Forms

Dr Andrew Moss

2015-10-11

## Part 3: Server Preseed

The desktop installer seems to work (its in day-to-day use now). Currently it builds an e17 desktop on-top of Debian, with enough support to rebuild everything in my repositories. It is stable enough to host the build system for remastering a server: the target environment.

## Server overview

The server is a VPS (virtual private server) running in a data-center belonging to the provided. The virtual machine runs inside a KVM hosting environment. Physical access is simulated through VNC - importantly this connects to the host rather than the guest so it remains available during reboot and reinstall. Unfortunately the keymap is a bit screwed up and there is no way to change it. Most(!?!) important punctuation can be found by setting the local keymap to US, but it is a minimal environment.
The simulated CD can only be changed by someone with admin privileges on the host, so it requires a support ticket and 24-48hr turn-around time. For this reason it is left set to a virgin debian installer image.

## Bootstrap of the installation environment

One issue that crops up straight away is that although the netinst image can find the virtual driver for installation - it cannot find it directly at boot. This is not a problem for a simple clean install. But the re-installer will use the hd-media kernel/initrd to boot the cdrom image. And this system cannot find the virtual drive.
KVM uses paravirtualisation, so the kernel will need the virtio drivers (in particular virtio_blk) and these are not in the hd-media images by default. The initial environment will look like this:
Partition 1: 1000MB, ext2, bootable /vmlinuz - default kernel image from hd-media /initrd.gz - modified hd-media initial ramdisk with extra modules for virtio /remaster.iso - preseeded debian installer for the target installer Partition 2: 1000MB, swap Partition 3: Remaining space, ext4, mounted as / Grub installed on the MBR - Standard menuitem to boot /dev/vda3 into the target system. - Extra menuitem to boot kernel/initrd from /dev/vda1
The standard installer is used through VNC to partition the disk and get a working system onto /dev/vda3. To rebuild the initrd we use the following script in the desktop environment. This saves a huge amount of work: the environment created by the jessie installer is the environment that the jessie installer was built inside.