Ubuntu network install (PXE)

sudo apt-get install tftpd-hpa tftp-hpa xinetd dhcp3-server
sudo pico /etc/xinetd.d/tftp

Then write following

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = /var/lib/tftpboot
disable = no
}

Edit TFTP config
sudo pico /etc/default/tftpd-hpa

Make it look something like

#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"

Create TFTP directory and get latest netboot image

sudo mkdir /var/lib/tftpboot
cd /var/lib/tftpboot
sudo wget -np -r http://archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/
sudo mv archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/* .
sudo rm -rf archive.ubuntu.com

Now restart TFTPD
sudo /etc/init.d/tftpd-hpa restart

To check if running@
netstat -uap

For DHCP, make sure you have a fixed ip for your device
pico /etc/dhcp3/dhcpd.conf

I did use firestarter as a DHCP generator since I used my desktop as PXE-server.


# DHCP configuration generated by Firestarter
ddns-update-style interim;
ignore client-updates;
authoritative;

subnet 192.168.66.0 netmask 255.255.255.0 {
option routers 192.168.66.9;
option subnet-mask 255.255.255.0;
option domain-name-servers 130.67.60.68, 193.213.112.4;
option ip-forwarding off;
range dynamic-bootp 192.168.66.10 192.168.66.20;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.66.9; # important for PXE
filename "pxelinux.0"; # important for PXE
}

After the DHCP change we must restart DHCP
sudo /etc/init.d/dhcp3 restart

You should now be able to boot PXE of this machine.

Tags: , , , , , , , ,

Leave a Reply