You are on page 1of 5

R201 Level 2 The District Mall, Ayala Northpoint, Talisay CIty, Philippines

heroes@stratiumsoftware.com +63 34 7070989 / 7070992


INSTALLATION DOCUMENTATION

PXE SERVER SETUP FOR UBUNTU 14.04


Given example
IP 192.168.253.111
Gateway 192.168.253.254
Broadcast 192.168.253.255
DNS 192.168.253.254
Netmask 255.255.255.0

1. Get the IP address, gateway, broadcast and DNS using ifconfig. Open the terminal
and type the following:
ifconfig
route -n
2. Open network interfaces using any editor.
sudo nano /etc/network/interfaces
3. Add/Edit like below
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.253.111
netmask 255.255.255.0
gateway 192.168.253.254
dns-nameservers 192.168.253.254
4. Restart network manager
sudo /etc/init.d/networking restart
5. Update package lists from the repositories and "updates" them to get information
on the newest versions of packages and their dependencies.
sudo apt-get update
6. Install ISC DHCP Server (provides IP address), inetutils-inetd (provides internet
services), tftpd-hpa (required for booting operating systems or configurations over
the network), syslinux (bootloader) and nfs-kernel-Server (allow sharing of
directories and files over a network)
sudo apt-get install isc-dhcp-Server inetutils-inetd tftpd-hpa syslinux
nfs-kernel-Server
R201 Level 2 The District Mall, Ayala Northpoint, Talisay CIty, Philippines

heroes@stratiumsoftware.com +63 34 7070989 / 7070992


7. Open dhcp3-server on any text editor
sudo nano /etc/default/dhcp3-server
8. Add/Edit like below
INTERFACES="eth0"
9. Open dhcpd.conf in text editor
sudo nano /etc/dhcp/dhcpd.conf
10. Add/Edit like below. Change all text in red based on the above given.
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.253.0 netmask 255.255.255.0
{
range 192.168.253.10 192.168.253.250;
option subnet-mask 255.255.255.0;
option routers 192.168.253.111;
option broadcast-address 192.168.253.255;
allow booting;
allow bootp;
option option-128 code 128 = string;
option option-129 code 129 = text;

filename "pxelinux.0";
next-Server 192.168.253.111;
}
11. Start dhcp server
sudo /etc/init.d/isc-dhcp-server start
12. Open inetd.conf in any text editor
sudo nano /etc/inetd.conf
13. Add/Edit like below (1 line)
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot
14. Open tftpd-hpa in text editor
sudo nano /etc/default/tftpd-hpa
15. Add/Edit like below (change red text with the server IP address)
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="192.168.253.111:69"
TFTP_OPTIONS="--secure"
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
R201 Level 2 The District Mall, Ayala Northpoint, Talisay CIty, Philippines

heroes@stratiumsoftware.com +63 34 7070989 / 7070992


16. Enable inetd on boot
sudo update-inetd --enable BOOT
17. Start tftpd-hpa
sudo service tftpd-hpa start
18. check your network configuration and activity
sudo netstat -lu
Sample output:
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 *:tftp *:*
19. Create tftpboot directory
sudo mkdir /var/lib/tftpboot
20. Create pxelinux.cfg
sudo mkdir /var/lib/tftpboot/pxelinux.cfg
21. Create Ubuntu/14.04/amd64 directory
sudo mkdir -p /var/lib/tftpboot/Ubuntu/14.04/amd64/
22. Copy vesamenu.c32 to tftpboot folder
sudo cp /usr/lib/syslinux/vesamenu.c32 /var/lib/tftpboot/
23. Copy pxelinux.0 to tftpboot
sudo cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/
24. Open file in text editor
sudo nano /var/lib/tftpboot/pxelinux.cfg/default
25. Add/Edit the following text and save file (change red text with server’s IP address)
DEFAULT vesamenu.c32
TIMEOUT 100
PROMPT 0
MENU INCLUDE pxelinux.cfg/PXE.conf
NOESCAPE 1
LABEL Try Ubuntu 14.04 Desktop
MENU LABEL Try Ubuntu 14.04 Desktop
kernel Ubuntu/vmlinuz
append boot=casper netboot=nfs
nfsroot=192.168.253.111:/var/lib/tftpboot/Ubuntu/14.04/amd64
initrd=Ubuntu/initrd.lz quiet splash
ENDTEXT
LABEL Install Ubuntu 14.04 Desktop
MENU LABEL Install Ubuntu 14.04 Desktop
kernel Ubuntu/vmlinuz
append boot=casper automatic-ubiquity netboot=nfs
R201 Level 2 The District Mall, Ayala Northpoint, Talisay CIty, Philippines

heroes@stratiumsoftware.com +63 34 7070989 / 7070992


nfsroot=192.168.253.111:/var/lib/tftpboot/Ubuntu/14.04/amd64
initrd=Ubuntu/initrd.lz quiet splash
ENDTEXT
NOTE: Add .efi to vmlinuz
One line from append to splash
26. Open pxe.conf
sudo nano /var/lib/tftpboot/pxelinux.cfg/pxe.conf
27. Add/Edit
MENU TITLE PXE Server
NOESCAPE 1
ALLOWOPTIONS 1
PROMPT 0
MENU WIDTH 80
MENU ROWS 14
MENU TABMSGROW 24
MENU MARGIN 10
MENU COLOR border 30;44 #ffffffff #00000000 std
28. Navigate to mnt folder
sudo cd /mnt
29. Download Ubuntu 14.04
sudo wget http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso
30. Mount Ubuntu 14.04 in /media folder
sudo mount -o loop /mnt/ubuntu-14.04.3-desktop-amd64.iso /media/
31. Copy contents of media folder to amd64
sudo cp -r /media/* /var/lib/tftpboot/Ubuntu/14.04/amd64/
32. Copy contents of .disk to amd64
sudo cp -r /media/.disk /var/lib/tftpboot/Ubuntu/14.04/amd64/
33. Copy initrd.lz and vmlinuz to Ubuntu folder (1 line)
sudo cp /media/casper/initrd.lz /media/casper/vmlinuz /var/lib/tftpboot/Ubuntu/
34. Open exports (controls which file systems are exported to remote hosts)
sudo nano /etc/exports
35. Add/Edit
/var/lib/tftpboot/Ubuntu/14.04/amd64
*(ro,async,no_root_squash,no_subtree_check)
36. Export shares
sudo exportfs -a
37. Start nfs-kernel-server
sudo /etc/init.d/nfs-kernel-server start
R201 Level 2 The District Mall, Ayala Northpoint, Talisay CIty, Philippines

heroes@stratiumsoftware.com +63 34 7070989 / 7070992


38. Configure network boot pxe client
a. Enter BIOS
b. Go to Advanced -> Southbridge -> Enable Network Card
c. F10

You might also like