Installation using PXE

From RockWiki

Jump to: navigation, search

PXE means Preboot eXecution Environment and is a short term used for booting a computer over a network. This chapter describes how an installation of ROCK Linux can be done using PXE.

Contents

Prerequisites

This section shows what configuration steps need to be done in order to get the PXE boot working. Further the necessary steps for a ROCK Linux installation over the network are explained.

PXE setup

For the PXE setup we assume the following network topology:

  • installation server: 192.168.0.1/24 (netmask: 255.255.255.0)
  • installation target: 192.168.0.2/24 (netmask: 255.255.255.0)

DHCP server

In the configuration file for the dhcp server, usually /etc/dhcpd.conf, there should be an entry for the target machine, with the special option filename that points to the PXE file to fetch from the tftp server.

host target {
    hardware ethernet AB:CD:EF:01:23:45;
    fixed-address 192.168.0.2;
    filename "pxelinux.0";
}

tftpboot server

The tftp server is usually started from an internet super server like inetd or xinetd. The configuration for xinetd looks like this:

service tftp
{
        socket_type             = dgram
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -a 192.168.0:69 -s /var/tftpboot
}

For inetd you would use this line in /etc/inetd.conf:

tftp    dgram   udp     nowait  root    /usr/sbin/in.tftpd    in.tftpd -a 192.168.0:69 -s /var/tftpboot

There should be the bootable image at /var/tftpboot/pxelinux.0. If not, look in your tftp distribution and copy it there. The subdirectory /var/tftpboot/pxelinux.cfg/ contains either a file default or a file named with the target machine's IP address in hexadecimal. Not all octets are necessary, only until it is distinguishable from your other tftpboot configuration files. For the IP address of the target machine in our example, 192.168.0.2, the filename would be C0A80002. The contents of this configuration file will be explained in the next section.

ROCK Setup

ROCK bootdisk

Put the vmlinuz and the initrd.gz from the directory build/bootdisk-*/ROCK/bootdisk/isolinux/ to the directory /var/tftpboot/ of your server. Add the following lines to the file /var/tftpboot/pxelinux.cfg/C0A80002 there:

DEFAULT vmlinuz
APPEND initrd=initrd.gz init=/linuxrc devfs=nocompat root=/dev/ram rw ramdisk_size=32000

Second stage

Put the file 2nd_stage.tar.gz from the directory build/bootdisk-*/ROCK/ to a http server that is reachable from the target machine without needing a proxy. For simplicity, we will assume here that the server hosting the http service is the same as the dhcp and tftp server. For our example, the file 2nd_stage.tar.gz is reachable via http://192.168.0.1/2nd_stage.tar.gz

ROCK packages

To supply the ROCK packages to a client machine, you have multiple options. The installation software can download them via ftp, http, nfs or any mechanism that is supported by the basic bootdisk system used for installation. And as ROCKLinux gives you the power to create your own targets, you may also create a modified bootdisk that contains alternative installation methods not covered here.

Boot procedure

  • Boot the target over network using the related BIOS options
  • Select Configure local network device and enter the target ip (192.168.0.2/24 in the example) and a gateway if necessary.
  • Select Load 2nd_Stage from net
  • Give the base url of the 2nd_stage, in our example http://192.168.0.1 (without trailing slash)
  • Give the filename, should be 2nd_stage.tar.gz

If everything works, the 2nd_stage should now be fetched and opened. You will be asked to configure your terminals, hitting enter usually suffices here.

  • Enter stone to start the graphical installation.

Installation

For installation please refer to Installation using CD, as from here on things go similar. Attention: using http or ftp methods to install packages you shouldn't try to read the help text of single packages, as the installer (gasgui) will crash. This bug is known and a solution is waited to be stumbled over.

Links

Personal tools