[Howto] Auto boot and install CD

Tux
Recently I was faced with the task to set up a server which had no keyboard and no monitor. Luckily, together with tools like kickstart this is no problem at all.

A total blind install – you could say keyboardless and monitorless – is something which happens almost never in private live. However, I only have a notebook and now I got back an old machine which I would like to set up as a server. But since I had no keyboard and no external monitor I wasn’t sure what to do at first.

But luckily Linux is often installed on servers or in corporate environments where you cannot afford to do every step by hand on a computer. Tools like kickstart and autoyast exist already and provide exactly what I needed.

Basically, all you have to do is to create a configure file which is burned on a boot CD together with the necessary boot stuff. After that, the computer takes over.

The easiest way to do so is to use the service provided by Instalinux.com. There you can create a customary boot CD which will install your preferred Linux distribution on a server – almost without any interaction. Several distributions can be installed that way: Fedora and CentOS/Scientific, Suse, Debian, Ubuntu – and all in different versions.
However, the service creates only a small boot image – you have to have a internet connection since the main software is downloaded via internet.

Anyway, that’s not a problem for me – but the almost above was the problem: the instalinux-CDs require that you – only once – input “install” into the prompt, to start the installation. This is for security reasons because a fully auto-install CD can harm you very much.

Nevertheless I needed the function to totally work automatically – so I first used the Instalinux service to create a boot image and afterwards modified it to boot without the additional keyboard input. The steps necessary were:

  • create the ks.cfg file at isolinux.com (of course without a reboot option)
  • create a customary boot image at instalinux.com
  • mount it, and copy the content to some directory
  • modify the file isolinux.cfg and add a timeout
  • copy the ks.cfg file to the isolinux directory
  • create the new boot image

The last task is accomplished by the command

mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot \
-boot-load-size 4 -boot-info-table -R -J -v -T isolinux/

After that, try the new boot image first in a virtual machine like VirtualBox.

More kickstart and iso-creation information can be found in various in the Red Hat docs, more information about the boot image config files can also be found here.

This way worked for me – at least in the virtual machine. The real server doesn’t register with the DHCP of my router and therefore doesn’t start for some reason. Maybe this is due to a bios option which refuses to boot while there is no keyboard/monitor connected:/

2 thoughts on “[Howto] Auto boot and install CD”

  1. Did you ever figure out a solution to the problem where the InstaLinux disc will get an address over DHCP on the virtual machine, but not when used on the actual server?

    I’m running into the same exact situation and am knocking my head against the wall!

Comments are closed.