Posted by: Wildan Maulana | July 28, 2007

Setting up PXE Server for Multiple Thinclient Image

This guide shows how to setup PXE (preboot execution environtment) on Ubuntu Feisty. This PXE server allow your client mini pc to choose the ‘thin distro’ that want to boot.

First, you have to install the following package : netkit-inetd , tftpd-hpa, dhcp3-server, lftp . so we run :

apt-get install netkit-inetd tftpd-hpa dhcp3-server lftp

Afterwards, run :

netstat -uap

and check if you see something like this :

wildan@netherland:~$ netstat -uap | grep tftp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
udp 0 0 *:tftp *:* –

If you don’t see the tftp line, please open /etc/inetd.conf and make sure you have the following in it :

jed /etc/inetd.conf

#:BOOT: Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as “boot servers.”
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot

Then restart inetd :

/etc/init.d/inetd restart

Configure the DHCP Server

We need a DHCP server in our local network. If there’s no DHCP server in your local network, just configure and use the one on your future PXE server. Simply edit /etc/dhcp3/dhcpd.conf:

cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_orig
cat /dev/null > /etc/dhcp3/dhcpd.conf
nano  /etc/dhcp3/dhcpd.conf

option domain-name-servers pxe1.dlis-lab.fisika.ui.ac.id ;

default-lease-time 86400;
max-lease-time 604800;

authoritative;

subnet 172.17.1.0 netmask 255.255.255.0 {
range 172.17.1.100 172.17.1.120;
filename “pxelinux.0”;
option subnet-mask 255.255.255.0;
option broadcast-address 172.17.1.255;
option routers 172.17.1.1;
}

This will dynamically assign IP addresses from the range 172.17.1.100 to
172.17.1.120 to your client computers; the gateway is 172.17.1.1.
Of course, you must adjust this configuration to your own environment!

It is important that you have the line

filename “pxelinux.0”;

in your configuration!

Then restart your DHCP server:

/etc/init.d/dhcp3-server restart

If you already have a DHCP server in your network, you must modify its configuration. Let’s assume you have something like :

subnet 172.17.1.0 netmask 255.255.255.0 {
range 172.17.1.100 172.17.1.120;
option subnet-mask 255.255.255.0;
option broadcast-address 172.17.1.255;
option routers 172.17.1.1;
}

in the configuration. You must add
filename “pxelinux.0”;
next-server 172.17.1.10;
to it (where 172.17.1.1 is the IP address of our Ubuntu PXE server) so that it looks like this:

subnet 172.17.1.0 netmask 255.255.255.0 {
range 172.17.1.100 172.17.1.120;
option subnet-mask 255.255.255.0;
option broadcast-address 172.17.1.255;
option routers 172.17.1.1;
filename “pxelinux.0”;
next-server 172.17.1.10;
}

Then restart your DHCP server.

Set Up Thinstation Netboot 


Responses

  1. That’s a great start to playing with PXE. I found your article looking for more PXE tricks to use. I went through some similar PXE experiences. Look at: http://blog.banksnetworking.com/2007/08/28/pxe-for-the-masses/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: