Install from a Network Boot Server
Boot your computer directly off a network server and install Ubuntu without using a CD.
Prepare the PXE Boot Server
The first step is to prepare the PXE boot server that will dish up the Ubuntu install image to your client. The easiest way to set this up is with an existing Linux server you have kicking around.
This boot server stores the install image and provides DHCP and TFTP (trivial FTP) services so that computers on the network can find and load the image when they start up. The whole process is triggered by the client connecting to the DHCP server and receiving special instructions telling it to fetch its boot image from the TFTP server instead of from the local hard disk.
Configure DHCP
If you don't already have a DHCP server on your network, start by installing the dhcp-server package on the machine that will be your PXE Boot server:
$ sudo apt-get install dhcp-server
Then edit /etc/dhcp3/dhcpd/dhcpd.conf and add a stanza similar to this:
host pxeinstall {
hardware ethernet 00:00:00:00:00:00:00;
filename "pxelinux.0";
}
Substitute the hardware MAC address of your client's Ethernet card in place of the string of zeros. Strictly speaking, you don't need the hardware line at all, but if you include it, your DHCP server will serve up the boot image only to that specific machine, so you won't need to worry about other random machines picking it up and reinstalling Ubuntu over their existing systems. On the other hand, if you're going to do installs on a lot of machines, you can just leave out that line, and every machine that netboots will be able to run the installer. Once you have updated the config restart the DHCP server:
$ sudo /etc/init.d/dhcpd restart
Configure TFTP
Install a TFTP server:
$ sudo apt-get install tftpd-hpa
Check /etc/inetd.conf and make sure it has a line like this:
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd
-s /var/lib/tftpboot
Next, restart inetd:
$ sudo /etc/init.d/inetd restart
Now you need to fetch the netboot install image (type the following all on one line):
$ sudo lftp -c "open http://archive.ubuntu.com/ubuntu/dists/dapper/main/installer-i386/current/images/; mirror netboot/"
You will then have a directory called netboot with a number of files in it that need to be placed where the TFTP server can find them. The inetd config line listed earlier shows the path that tftp-hpa uses to store boot imagestypically /var/lib/tftpbootso copy the files there and extract the boot image:
$ sudo cp -a netboot/* /var/lib/tftpboot
$ sudo cd /var/lib/tftpboot
$ sudo tar zxf netboot.tar.gz
Boot the Client
In order to start the install process, your client machine needs to be able to perform a PXE network boot. Most modern machines can do this directly with a BIOS setting, although some older machines may need a special netboot floppy image to start the process.
Start up your client machine, use whatever key sequence is necessary to enter the BIOS setup menu, and locate the setting for boot devices. (The key sequence to enter the BIOS is usually something like F2 or Esc.) Set the first boot device to be PXE Boot, Network Boot, or the equivalent; save and exit the BIOS; and let the machine boot up again.
0 Comments