Tuesday, November 18, 2008

Headless Debian install

This is how I did a headless Debian install on my Fujitsu-Siemens Futuro S400 thin terminal. It runs as a disk server and has no monitor, mouse, or keyboard. Thus, I had to do the install via the serial port.

1. Prepared a USB stick to boot from. For this I followed the path given by the Debian install manual. This included:
1.1. Re-formatted it with fdisk and made it bootable. (1 WIN95 FAT partition)
1.2. Downloaded a Debian boot image. (boot.img.gz)
1.3. Wrote it to the first partition. In my case the USB stick was mounted as /dev/sdc. 
Note: the Debian install instructions tells you to write the boot.img directly to /dev/sdc not /dev/sdc1. However, this did not work for me so I has to put the image on the 1st partition instead.
# zcat boot.img.gz > /dev/sdc1
1.4. Unplugged the stick and inserted it again to get it mounted.
1.5. Copied the debian-40r5-i386-netinst.iso to the root directory of the USB stick.

So far I was following the normal Debian install. Howerver, to get it running over the serial line I needed to change the following:

1. Edit syslinux.cfg and add the following at the top to get SYSLINUX to run over the serial line. The configuration below is for 115200 baud, no parity, 8 data bits.
serial 0 115200
Also, add serial console commads to the linux command line:
DEFAULT install

LABEL install
kernel linux
append vga=normal initrd=initrd.gz console=ttyS0,115200n8 -- 
2. All done.