This is a step-by-step guide to install Debian 6.0.6 32-bit on a headless appliance. This is slightly different by previous guide published for CentOs and Ubuntu.
So…let’s start , we will prepare an ISO image with Serial Console output using 9600 as speed and 8,N,1 as config.
1) Download Debian 6.0.6 ISO image on your hard drive (I prefer torrent download but you can choose the method you prefer)
2) Â Now create a temporary workspace. In this guide I will use /tmp. If you are an Ubuntu user please pay attention: tmp folder will be cleaned after reboot !
Â mkdir /tmp/debiancd (this will be used to mount ISO image)
mkdir /tmp/serialdebian (this will be used to modifiy ISO files)
3) Mount Debian ISO image on previous created directory:
Â sudo mount -o loop -t iso9660 /tmp/debiancd
4) Copy all files and dirs from mounted ISO to a new dir, in order to have a mirror copy. We will use this copy to modify isolinux config files.
Â sudo cp -Rv /tmp/debiancd/* /tmp/serialdebian/
Â sudo cp -Rv /tmp/debiancd/.disk/ /tmp/serialdebian/
5) In order to check that the mirror is the same than ISO image run the diff command
Â sudo diff /tmp/serialdebian/ /tmp/debiancd/Â
6) Change file permissions on the mirror dir in order to have write access on configuration files
Â sudo chmod -R 777 /tmp/serialdebian/*
7) Now we need to modify two configuration files under isolinux dir: txt.cfg and isolinux.cfg in order to send all data to serial console
Â cd ./serialdebian/isolinux
Â vi isolinux.cfg
We have to add “serial 0 9600 0Ã—003” as first line and change timeout from 0 to 5. Your new file will look like this:
# D-I config version 2.0
SERIAL 0 9600 0
Save the file and exit.
Now we need to change parameters in isolinux.cfg file. To do this run the following command:
Â sed 's/vga=788/console=ttyS0,9600n8/' txt.cfg > tmp
Â mv tmp txt.cfg
Your new isolinux files will be like this:
menu label ^Install
append vga=788 initrd=/install.386/initrd.gz -- console=ttyS0,9600n8
8) Fix the MD5sum for the new files using:
Â cd /tmp/serialdebian
Â md5sum `find -follow -type f` > md5sum.txt
9) We have completed changes and we need to rebuild an ISO image to be installed:
Â cd /tmp
Â mkisofs -o ./serialdebian605.iso -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b Â isolinux/isolinux.bin -c isolinux/boot.cat ./serialdebian
10) When finished you can use your burning software to create Setup CD or, if you prefer, continue using cdrecord tool.
Â sudo cdrecord -v dev=1,0,0 /tmp/serialdebian605.iso
Please pay attention to use your device (1,0,0 is related to my hardware configuration). If you don’t know which device to use please run the followin command:
Â cdrecord -scanbus
Enjoy your installation using serial console 😉