- Boot linux from pxe
- 4.2.2.2 Configuring the TFTP Server
- 4.2.2.3 Configuring the NFS Server
- 4.2.3 Installing Linux on a Server Blade from a Linux PXE Boot Server
- 4.3.1 Files Relevant to PXE Boot Installation
- 4.3.2 Preparing to Install Linux
- 4.3.3 Configuring the PXE Boot Servers
- 4.3.3.1 Configuring the DHCP Server
- 4.3.3.2 Configuring the NFS Server
Boot linux from pxe
CODE EXAMPLE 4-1 shows a sample /etc/dhcpd.conf file
The important areas in this example are the address of the TFTP server
( next-server 172.16.11.8 ) and the filename of the stage 1 bootloader image ( filename «/
/sun/pxelinux.bin» ).
Note — Nameserver and web server software is provided with the Red Hat Enterprise Linux distribution. Installation and configuration of these applications is outside the scope of this document.
Note — If no Nameserver is configured, change get-lease-hostnames to off .
4.2.2.2 Configuring the TFTP Server
The TFTP server supplies the PXE boot with the stage 1 bootloader image. This image loads the installation kernel which performs the actual installation on the hard disk through the use of the custom initrd.img supplied by Red Hat.
Use the tftp-server package provided with your Linux distribution to provide TFTP services.
1. Create the TFTP directory. Ensure that all users have read/execute access to the TFTP directory:
2. Modify the /etc/xinetd.d/tftp file (for Red Hat) or the /etc/inetd.conf file (for SuSE) to allow TFTP services:
If you are installing Red Hat, update the /etc/xinetd.d/tftp file. You need to change the server_args entry to -s /tftp . (The /tftp path is the directory in which the PXE images are copied.)
If you are installing SuSE, update the /etc/inetd.conf file by inserting the following line:
3. If you are installing SuSE skip to Step 4. If you are installing Red Hat, configure the TFTP server to be enabled at installation.
Change the disable entry to disable= no .
Note — At installation the TFTP server is disabled by default ( disable = yes ).
4. Enable the TFTP server.
For Red Hat, type:
Note — No output is returned if the command succeeds.
5. Restart xinetd (for Red Hat) or inetd (for SuSE):
For Red Hat, type:
6. Validate the configuration:
The output should be:
Example of the tftp File for Red Hat
shows an example of the /etc/xinetd.d/tftp file for Red Hat:
Example /etc/xinetd.d/tftp file for Red Hat
4.2.2.3 Configuring the NFS Server
The NFS server is used by the installation kernel to read all of the packages necessary to the installation process. The NFS server therefore needs to provide access to the directory structure containing the PXE images.
1. Update the /etc/exports file to include the export for the NFS server.
Insert the following line into file /etc/exports :
2. Enable the NFS server.
For Red Hat, type:
Note — No output is returned if the command succeeds.
3. Restart the NFS server.
For Red Hat, type::
4. Validate the configuration:
The output should include the line:
4.2.3 Installing Linux on a Server Blade from a Linux PXE Boot Server
Note — IMPORTANT: Before installing Linux, ensure that the boot directory on the PXE server (/ tftp ) has enough space to accommodate the version of Linux you are installing. You will require about 6 Gbytes of free space.
Note — The PXE boot server should be running Enterprise Linux version AS 2.1 or EL 3.0, or SuSE Linux Enterprise Server 8, service pack 3.
|
1. If you have configured a firewall, make sure that the TFTP, NFS, and DHCP protocols are not filtered on the server to be used as the PXE boot server.
2. Alternatively, disable the firewall and prevent it from running on subsequent reboots.
To do this, for Red Hat, type:
Note — These examples assume that you are using iptable firewalls. iptable firewalls are not installed by default on SuSE.
3. Ensure that the DHCP server, NFS server and TFTP server have been configured correctly.
4. Install the PXE images onto the TFTP server:
Note — If you are running SuSE on your PXE boot server, replace /mnt/cdrom with /media/cdrom in the instructions below. For example, mount /mnt/cdrom would be mount /media/cdrom .
a. Copy the required Linux directory from the root of the Sun Fire B1600 Platform Documentation, Drivers, and Installation CD to the /tftp directory on your PXE boot server:
where Linux_dir > is as-2.1u2 , el-3.O or sles-8sp3 , depending on the version of Linux you are installing.
Note — The Linux directory contains the files required to perform a PXE installation.
b. Install the Linux installation CDs to the /tftp directory on your PXE boot server.
For Red Hat, you need to install the CDs in reverse order. If you have two Red Hat installation CDs, install Disk 2 first; if you have four, install Disk 4 first. After inserting each CD, type the following command:
where Linux_dir > is as-2.1u2 or el-3.O , depending on the version of Linux you are installing.
For SuSE Linux Enterprise Server 8 service pack 3, you need to load each image into its own directory rather than into the same directory. This allows the SuSE installer to select the correct packages from each ISO image. Use the following commands:
After inserting the SLES-8 disk:
After inserting the first UnitedLinux 1.0 disk:
After inserting the second UnitedLinux 1.0 disk:
After inserting the third UnitedLinux 1.0 disk:
After inserting the first United Linux 1.0 SP 3 disk:
Note — The first SP 3 disk contains hard-linked directories. Do not use the cp, cpio or tar commands to copy this disk as these commands will fail to copy the directories correctly. The directory hierarchy created by pax requires about 2Gb of disk space.
After inserting the second UnitedLinux 1.0 SP 3 disk:
When you have copied all the disks, tie the ISO images together:
5. Modify the configuration file to specify the address of your NFS server.
For Red Hat, modify the / tftp/ Linux_dir >/sun/install/ks.cfg file. For example:
where Linux_dir > is as-2.1u2 or el-3.O , depending on the version of Red Hat you are installing.
Note — ks.cfg is a read-only file. You must change its permissions to read-write before making modifications.
For SuSE, modify the /tftp/sles-8sp3/sun/install/autoyast.xml file to set the NFS server address. A sample command is as follows:
6. Set your own root password in the Linux configuration file.
Note — If you do not change the root password, you will be prompted to enter the root password each time you run a PXE boot installation.
For Red Hat, modify the / tftp/ Linux_dir >/sun/install/ks.cfg file by removing the comment symbol (#) in the rootpw entry and then overwriting changeme with your own password:
where nnnnnnn is your root password.
For SuSE, specify the root password in the autoyast.xml file ( /tftp/sles-8sp3/sun/install/autoyast.xml ) by scrolling to the user password section of the file, removing the existing text between the key words, typing the password you want to use:
Note — It is only possible to specify passwords for SuSE in an encrypted form.
Note — The default password is changeme .
7. Modify the /tftp/ Linux_dir /sun/pxelinux.cfg/default file to include the path to the kernel to be installed, and the location of the PXE server.
The line of the default file containing the IP address of the PXE server and the path to the kernel software is the wrapped line beginning with the word «kernel» and ending » /initrd.img «:
where Linux_dir > is as-2.1u2 or el-3.O , depending on the version of Red Hat you are installing. If you are installing SuSE Linux Enterprise Server 8 service pack 3, the Linux directory will be sles-8sp3 .
Note — By default the PXE device is eth0 ( ksdevice=eth0 ). This means that the PXE boot is performed via the SSC in slot 0. If you want to PXE boot via SSC 1, you can change this parameter to ksdevice=eth1 .
Note — The default file is a read-only file. You must change its permissions to read-write before making modifications.
8. Log into the B1600 System Controller.
See the Sun fire B1600 Blade System Chassis Software Setup Guide for further details.
Note — The following steps assume that the blade is already installed in the system chassis. For information on installing blades, see Chapter 3.
9. Boot the blade to begin the PXE boot from the SC prompt.
where n is the slot number of the server blade on which you want to install the operating system.
10. Access the blade’s console to monitor the progress of the installation.
At the SC prompt, type:
where n is the number of the slot containing the blade.
Note — If you are installing SuSE, the system will become idle for about 40 seconds during the boot and subsequent reboots. During this idle time a blank screen is displayed. This behavior is due to an old version of the bootloader that ships with SuSE, and does not indicate that there is a problem with booting the blade.
When the installation is complete the blade automatically reboots.
Note — For information on troubleshooting the PXE boot installation see Chapter 9.
This section tells you how to install Linux on a server blade from a PXE boot server running Solaris.
Note — IMPORTANT: Before installing Linux, ensure that the boot directory on the PXE server (/ tftpboot ) has enough space to accommodate the version of Linux you are installing. You will require about 6 Gbytes of free space.
4.3.1 Files Relevant to PXE Boot Installation
A summary of the files required by the Solaris PXE boot server during PXE boot installation and their purpose is provided in TABLE 4-3.