Monday, 20 August 2012

Installing and Configuring PXEBOOT for CentOS



Installing and Configuring PXEBOOT for CentOS

PART 1


What is PXE?

PXE is short for Preboot Execution Envionment. A short and simple explanation of PXE is that it allows you to boot a computer over a network without requiring a harddrive or cdrom. You can do this with as few as 2 computers (1 server, 1 client) or you can do it with as many as can get your hands on. 

PXE boot server on CentOS 


In this tutorial we are going to be making some assumptions that you can tune if you need to. In my case we are going to start with a clean install of CentOS 5.8 with the minimal package option. The server will have 1 NIC.

Here is a diagram of what that could look like:



What we want at the end of the day is for clients on the  network to call out to the DHCP server, PXE boot and get a menu for install options. I'll also cover at the end how you can spruce this up with a kick start file to automate the process.

We are going to create a CentOS image that we are going to PXE boot, but you can append what ever distro you want as well.

so let's get started..

Prepare the environment:

In this tutorial, I am going to create the PXE Boot Server using VMware Workstation. You can follow these same steps as if you were actually installing on a physical server.

For this VM, the network will run on NAT as shown below.


 When you open up VMware Network Editor (comes bundled with VMware Workstation) and select NAT (default: vmnet8), you can see that it is supplied with its own internal DHCP as well. So we get a large IP Pool for our use.


In the NAT settings window, you can see the Subnet IP, Subnet Mask of the network and the Gateway IP as well. Make a note of the subnet mask and gateway. We will need these values later on. 
NOTE: In case you are performing this activity on a physical PC directly, then consult your Network Administrator for the network's subnet mask and gateway.


In the DHCP settings window, we can see the start and end IPs of this IP Pool. Make a note of the starting IP as well.

 
Once you have set up the base networking, you are now ready to create your VM.

You will need the ISO image of CentOS for this tutorial. You can get the latest from HERE.

I have created a standard CentOS VM with 2 GB RAM, 2 CPU and 1 NIC (NAT, as described above). These values can be changed according to your needs and requirements.

To know how to create a CentOS 5.8 VM on VMware Workstation, CLICK HERE

NOTE: Make sure you have adequate space when you create the VM. Keep at least 30 GB in hand.

If you end up with less space, then HERE is a tutorial on how to Add an External HDD to CentOS VM.


What's Next?










No comments :

Post a Comment