Skip to content

How To Configure PXE Boot on CentOS 5

 

The other day I blogged about how to extract the kernel and ramdisk from the DBAN downloadable image.  These two files would be useful in the situation where you might want to PXE (network) boot a machine and have it wiped.  (Something like this may be common prior to dispositioning a machine at work, or before you give an old machine away.)  Whatever your reasons might be, I thought I would outline the steps that I have taken to install and configure PXE on a CentOS 5 installation.

Installation

yum install tftp-server

DBAN Configuration

After following my previous instructions on how to extract the DBAN PXE images, copy the two files (kernel.bzi and initrd.gz) to the /tftpboot/ directory.

mkdir -p /tftpboot/dban<br /> cp kernel.bzi /tftpboot/<br /> cp initrd.gz /tftpboot/<br />

PXE Configuration

You’ll also need to configure the PXE system to know what to launch/run when a specific command is given at boot.  In this case we’ll only have the DBAN option, which we could run by using the ‘dban’ command:

/tftpboot/pxelinux.cfg/default

display msgs/boot.msg

prompt 1

## dban

label dban

kernel dban/kernel.bzi

append load_ramdisk=1 initrd=dban/initrd.gz root=/dev/ram0 init=/rc quiet nuke=”dwipe” –autonuke –method dodshort”

The first line in that file, “display” tells it to display a file as a menu prompt at boot time.  The second step in this section is creating that menu prompt:

/tftpboot/msgs/boot.msg

**WARNING** TYPE ‘dban’ TO AUTO-WIPE THE PXE BOOTED MACHINE.  **WARNING**

Start The Service

Now that we have everything configured we’ll go ahead and start the service:

service xinetd restart

Related Posts

  1. DBAN via PXE: Automagically Wipe a Drive via Network Boot