Installing a server with PXEBOOT

Reacties Geen

PXE boot procedure

[ DHCP server | Loopback filesystem | TFTP server ]

This page will descibe how I did manage to install a rackmount server without a local CD-ROM drive.
This page will describe the installation of a Centos 4.4 machine from a CD image but it can propably be used to learn how to do this with other distributions that support this way of installation as well.
Make sure that your server supports a netboot. (Older hardware can be a menace in this regard.)

I will do plenty of assumptions here.
If you have never installed a DHCP server or TFTP server then you need to learn those skill elsewhere.

DHCP server

I assume you know how to install a DHCP server.
This server will need a special entry to boot your server.
Insert and adapt the following lines:

group {
        host    balin {
                hardware ethernet       00:19:d1:3e:18:b3;
                fixed-address ;
                filename                "/pxeboot/pxelinux.0";
                next-server   ;

  • balin The hostname for this machine. (Pick your new machine’s hostname here.)
  • 00:19:d1:3e:18:b3 The mac address of your new server.
  • The IP addres of this new server during the installation.
  • pxelinux.0 This is a fixed name. We will get back on this later!
  • The hostname of the TFTP server from which you will boot. (The latest ISC implementations require this paramater even when you DHCP server is also your TFTP server!)
Loopback filesystem

Suppose your ISO image lives in /home/software and is named CentOS-4.4.ServerCD-i386.iso and you want to install from /install/Centos4.4.

Create the directory:
mkdir -p /install/Centos4.4

Edit the /etc/fstab file and add the following line:

/home/software/CentOS-4.4.ServerCD-i386.iso    /install/Centos4.4      noauto,loop,defaults    0 0

Mount the directory with the command:
mount /install/Centos-4.4

Changing noauto to auto will ensure this will be reboot proof and mount the ISO image at each reboot.

TFTP server

Copy the pxeboot directory from the images directory from the CD and copy it to the /tftpboot directory.

Copy the pxelinux.0 file from /usr/lib/syslinux to the /tftpboot/pxeboot directory.
(This will propably require you to run Centos 4 as well.
Or steal it from the syslinux package.)

Create the /tftpboot/pxeboot/pxelinux.cfg directory.
Create a file called default with the following content:

default centos4

label centos4
kernel vmlinuz
append load initrd=initrd.img devfs=nomount

sell diamonds

Categorie ,


Op dit artikel kan niet gereageerd worden.

← Ouder Nieuwer →