Table of Contents
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 :
- It is fast (assuming you have a standard network)
- It is easier for new optical drive free laptop (although you can use usb keys…)
- Using this you will have an homogeneous IT environment
- Fix most of “not-booting” and other kind of computer issues by setting up a bootable rescue dvd (gparted etc…)
- 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.
There is not much of it…
- 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…)
- A client to test and validate our PXE infrastructure (a virtual machine looks very “a propos” here)
- A network connection between those two boxes
- root access to server(s) and so on…
2.2 The master plan
Here are the different steps to achieve our today task.
- 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)
- Setup the DHCP server
- Setup the TFTP server
- 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 :
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
- How-to : Fix the W: Possible missing firmware /lib/firmware/bnx2/bnx2-mips-09-6.2.1a.fw for module bnx2
- How-to : Comment multiple lines using vi
- Bash tips : Adding time stamps to history command output
- How-to : Expand a RAID array using omconfig / omreport CLI
- How-to : Create a RAID array using omconfig / omreport CLI
- How-to : Check if a device is supported by any of the modules currently installed on your system
- How-to : Add RAW files support to [RHel-CentOS] 6.x
- How-to : Add / update a driver in an [CentOS-RHel]5 initrd.img
- Bash snippets & functions : Make a variable readable/reachable from outside a pipe + loop (AKA process substitution)
- How-To : Replace dead / faulty drive in Dell PERC RAID array
- Linux command tips : df
- How-to : Basic PXE infrastructure #2 – DHCP server installation and setup on CentOS