How-to : Basic PXE infrastructure #1 – Introduction



Hi folks ! I here start a series i have been wanting to launch for quite some time now : How-to build a PXE infrastructure.

The goal of this series is to setup a minimalist working PXE infrastructure, we will see an advanced setup that uses kickstart and complex automated installation later, let’s start by the beginning !

I will cover every required aspect, from DHCP to distribution share going through TFTP. This is for the basic setup, once this will be done we’ll see how to customize a PXE client installation using kickstart, and other sweeties like adding a brand new or an updated version of a driver to the initrd or running custom post-installation script to make the client just as we want it to be.

But for now let’s first have a look on the benefit of running a PXE infrastructure, either you do it at home or at work…


The other post from this series


1) Why is PXE so useful ?

There are a lot of good answers to this question, let’s see some of them :

  1. It is fast (assuming you have a standard network)
  2. It is easier for new optical drive free laptop (although you can use usb keys…)
  3. Using this you will have an homogeneous IT environment
  4. Fix most of “not-booting” and other kind of computer issues by setting up a bootable rescue dvd (gparted etc…)
  5. Gives you total control over your installation and as many choices as you want regarding the distribution flavor

And even more, you are welcome to add your own point of view in the comment section.


2) What is the plan ?

Here is the way we achieve this PXE infrastructure setup.

2.1 Pre-requisite

There is not much of it…

  1. Having, at least, a working computer we will be using as PXE server (you can have more than one if you wish to host functionality over several server, DHCP server here, TFTP server there etc…)
  2. A client to test and validate our PXE infrastructure (a virtual machine looks very “a propos” here)
  3. A network connection between those two boxes
  4. root access to server(s) and so on…


2.2 The master plan

Here are the different steps to achieve our today task.

  1. Update your server (if you want to do so, this is not a mandatory step but it is always a good idea to keep servers up-to-date, IMO)
  2. Setup the DHCP server
  3. Setup the TFTP server
  4. Setup the NFS server


2.3 The main role for each part of the process

Here are listed the roles of each part / service / daemon involved in a PXE boot and installation process.

2.3.1 DHCP server role

The DHCP server role is to provide client with an IP address as well as the tftp server address (from which the client will download required files for its process)

2.3.2 TFTP server role

The TFTP server role is to provide the client with boot and installation files, such as pxelinux.0, vmlinuz and other initrd files.

2.3.3 NFSĀ  server role

NFS server role is to provide the client with distributions files (through an NFS share), NFS server information (IP address and shared directory path) are usually provided by kickstart files, or manually.


3) The server base setup

This is the server configuration before anything was done :

For this purpose i used a Virtual Box (check this post out to install VirtualBox) hosted virtual machine.

  • OS : CentOS 6.2 x86_64 (but this should work with any fedora based distro)
  • Kernel version : 2.6.32-279.22.1.el6.x86_64

A quick (or not) update to ensure you are running the latest packages :

yum update

That pretty much what we need to know about this server-to-be.

That’s it, let’s do it !

Jump to the next step : Setup the DHCP server





More “How-to” posts

Tagged on: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site supports SyntaxHighlighter via WP SyntaxHighlighter. It can highlight your code.
How to highlight your code: Paste your code in the comment form, select it and then click the language link button below. This will wrap your code in a <pre> tag and format it when submitted.