Home > Enterprise Linux Tips > Administrator > How to install CentOS 5.2 via a Preboot Execution Environment
Enterprise Linux Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ADMINISTRATOR

How to install CentOS 5.2 via a Preboot Execution Environment


Austin Jorden, Contributor
01.19.2009
Rating: -4.00- (out of 5)


Enterprise IT tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Using a Preboot Execution Environment (PXE) server to install an operating system (OS) improves the OS installation experience. We all know how tedious OS installs can be -- wouldn't it be great to do them remotely? Imagine sitting at a desk instead of swapping CDs at a server chassis somewhere inside a data center while listening to the sound of HVACs. In this article, we'll learn how to install CentOS 5.2 via PXE.

Experience with trivial file transfer protocol (TFTP), hypertext transfer protocol (HTTP) and dynamic host configuration protocol (DHCP) will come in handy for this process. Experience with a network file system (NFS) and other types of PXE systems will enhance the experience.

Pre-install setup for PXE server
PXE is a stage that a computer goes into just after booting BIOS. It's booted using a network interface. It is completely separate from any internal devices (such as a hard-disk or CD-ROM). It's like booting into a temporary OS via the network.

The client machine will need to have the BIOS set up. Ensure that the Onboard BootROM is set to Enabled and that the first boot device shows as Network. This will ensure that the system boots up and uses the onboard BootROM/Network interface to boot to the network.

To set up on the PXE server, you'll need DHCP, HTTP and TFTP. NFS is optional. Here's how PXE operates:

  1. System boots up and requests DHCP.

  2. PXE server (DHCP server) replies back negotiating an IP address between server/client.

  3. Once the IP address is settled, the DHCP server replies back with a file called pxelinux.0. That tells the server to boot a temporary kernel and driver disk in a specific directory. In our case, it will be Yes, even though it says .cfg, it's still a directory, not a file.

  4. The system looks under via the TFTP server for a file named (or whatever its MAC address is).

The file's example contents are:

In this file, it te...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Linux Web and application servers
What do you know about Linux administration tools?
Choice and customization lead Linux and IT marketplace
Red Hat debuts flexible JBoss platform additions
Siemens signs with Synnex for OpenScape distribution
Ubuntu certification on HP ProLiant servers in the works
Lucid Imagination adds support for Apache search tools
Open source growth dims LAMP stack to symbolic status
At ApacheCon, Microsoft jumps on open source bandwagon
Canonical's Ubuntu 8.10 server enhances virtualization
Red Hat gives JBoss stronger network management capabilities

Other enterprise Linux server distributions
CentOS users remain faithful despite developer shakeup
MySQL fears dominate open source reaction to Oracle-Sun deal
Is OpenSolaris on IBM z yet?
When to use Solaris vs. Linux: Operating system comparison
OpenSolaris 2008.11 update woos Linux users
Has the sun set on Sun Microsystems? Analysts say no
Red Hat Linux trumps Unix on TPC price/performance test
Oracle Enterprise Linux displaces Red Hat at publishing company
Linux shop adds Solaris for performance boost
Sun gives OpenSolaris commercial support for first time

Administrator
Troubleshooting Linux networking problems
Creating virtual appliances with Novell SUSE Studio
Access and repair an ext3 file system with the superblock
Solving Linux server hangs stemming from kernel issues
How to solve logical volume management issues
Troubleshooting Logical Volume Manager boot problems
Linux provisioning automation with Cobbler
How to fix master boot record partition table problems
Five Linux commands you have (probably) never heard of
How to install and get started with OpenQRM

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
FreeBSD  (SearchEnterpriseLinux.com)
MEPIS  (SearchEnterpriseLinux.com)
Puppy Linux  (SearchEnterpriseLinux.com)
skinny Linux  (SearchEnterpriseLinux.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


lls the system to boot to the temporary kernel located at and the driver disk located at

The PXE server also communicates that it wants to install CentOS via text mode (no graphics). Graphics tend to use more RAM, which slows down the installation process. It tells the system where the kickstart file is going to be. The kickstart file tells Anaconda's or Red Hat's or CentOS's installer what to install and which partitions to set up. Next, you must configure the DHCP server. Here's an example of a DHCP server configuration:

This DHCP configuration allows subnets 172.22.0.50 to 172.22.0.254 to be given to clients. It also directs the clients to the file pxelinux.0, as previously stated.

Earlier, I showed you that the bootloader file directs the Anaconda installer to a kickstart file. This file directs the installer through a series of questions. Here is an example of a kickstart file, followed by an explanation:

  • Instructs the client to install using "text" mode.
  • Install in English (U.S.).
  • The network lines simply configure the interface(s) for the IP information. Erasing both of those lines will enable DHCP by default.
  • The NFS line tells the system to install from an NFS mount, which I'll address later in this tip.
  • It also tells it to install by clearing all master boot records (zerombr yes), to clear all partitions currently existing on the hard-disk (clearpart –all) and to install using the default partitioning scheme (autopart).
  • It tells the installer to install iptables (firewall) but to enable SSH.
  • Disable SELinux, and set the time zone to its proper place.
  • Then set the "rootpw" line to whatever you'd like. I used swordfish.
  • Everything past the line tells the system which specific packages to install.

Now, let's go back to the NFS option I mentioned earlier. This line simply represents how the installer will obtain the CentOS media -- whether it's from an NFS mount, a CentOS mirror, a CD or an FTP server. In order to utilize an NFS mount, you can use the line in the kickstart example above. However, if you don't have the experience to properly set up an NFS daemon/server, then I strongly suggest that you use a Red Hat/CentOS media mirror and simply replace the line with

Installing CentOS 5.2
Once you have ensured that the BIOS isset up, DHCP is configured, TFTP is sharing the directory and that HTTP is configured to hand out the kickstart file, then you should be able to reboot the machine and watch the install process.

While the installation runs, you can use two tty's (terminal windows) to make sure everything is going according to plan. To view them, hold down ALT and hit F1 or F3.

TTY3 (ALT+F3) will show more back-end things going on, such as "parsing kickstart." TTY1 (ALT+F1), on the other hand, will feed you more eye candy and give you status bars.

Was this tip helpful? Email the editors and let them know what you think.

ABOUT THE AUTHOR: Austin Jorden is a systems and network administrator for a large wireless Internet service provider located in Dallas, Texas. He has a genuine love for Linux, networking and wireless technologies.

Rate this Tip
To rate tips, you must be a member of SearchEnterpriseLinux.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Enterprise Linux Web Server & Application Server
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts