Monday, August 30, 2010

Installing Linux without CD, Floppy Disk or USB

Recently I got hold of a laptop without a CD or floppy drive, and which BIOS wouldn't boot from USB (is a pretty old laptop). I wanted to install Linux on it, so what were my options? Well, so far I have come across two options:

1. Network Install

If the laptop's BIOS can boot from the internal NIC (network card), you can set up a DHCP and TFTP server and do a netboot. This will load the installer's image from your server at laptop's boot time. There are many guides out there on how to do this, but the one I followed is this one. Substitute Etch for your distribution. I installed Debian Lenny.
The HOWTO is quite self-explanatory. Perhaps one thing worth mentioning is that I decided to create a private network with a different network switch rather than using my regular wireless home router. I did this because I didn't want to stop the DHCP server from the router while I was doing the installation, because I had other machines running using the Internet. If you are also doing this, remember to 1) assign a static IP to your DHCP server so you can configure the server itself properly (I used 192.168.1.1, obviously the same as the TFTP server and also the default gateway) and so your server can start properly (otherwise it will probably fail or complaint about something when you try to start it from /etc/init.d) and 2) once your laptop has boot from the network card, plug your network card to the actual router so it can install via the Internet.

2. Set up the image from an existing operating system

If you already have Linux or Windows installed in the laptop, you can set up a boot loader so it will boot the installer image from the hard disk instead of retrieving it from the TFTP server. I have tried this with Grub and when you have Linux installed, it is quite straight forward because the boot loader is already installed: you just need to put the installer image on your hard dish and modify the Grub menu so it will show an option to boot from that image. This small tutorial gives you a flavor of how to do both from Linux and Windows. Just skip the boot.ini part if you are doing it from Linux.

Happy installation!