These days getting Linux onto a server, even with no cd drive is not that hard. You can build bootable usb keys, plug in a usb cd drive or use network boot. In the end I went for a network install. I’m going to assume that you have access to a windows machine elsewhere on the network in order to get this working. Before you start a network install you will need a few things on your windows box:
- A DHCP / TFTP server – like this one
- The centos pxe boot files – vmlinuz and initrd.img. You can grab these off any centos mirror – here for example
- pxelinux.0 – this is the key to remote booting. It is in the /core folder of a syslinux distro – which you can get from here
To get the pxe boot to work you need to:
- Turn off any other DHCP server on your network (if you own a router there is almost certainly a dhcp server in there). You can only have one running at once
- Unzip tftpd32 into its own directory (c:\tftp32 for example)
- Copy the vmlinuz, initrd.img and pxelinux.0 files into the tftp directory too
- Inside the tftpd directory create a sub directory called pxelinux.cfg (be careful – it’s a directory not a file)
- Inside the pxelinux.cfg directory create a text file called default (no file extension). Open the file and put the following into it:
- Start tftp32. Go into the settings screen and make the settings look like this:
- Configure the DHCP tab to match your current settings. The router ip is the IP of your real router, but your DNS servers should be the ISP DNS servers (i.e. if your computer says that your gateway and dns server ip’s are the same then you’ll need to find out from your ISP what the real dns server is). You can get the gateway and subnet mask ip from the network settings in control panel in windows or by doing start->run then type cmd. In the command prompt that appears type ipconfig and hit return. It will give you your ip, your subnet and gateway. Make very sure that the ip address your pc has is in the same subnet that the dhcp server will give out – or the network boot will not work. My settings were as follows.
- Turn on your server and go into the bios. Make sure that in the boot order section you have network boot at the top. If all goes well then after a reboot you should see youself in the centos installation program.
Note that the ip address is the ip of my windows machine – yours will be different. The base directory will be set to the directory you installed tftp32 into.