This section covers the configuration tasks needed in complex boot scenarios. It contains ready-to-apply configuration examples for DHCP, PXE boot, TFTP, and Wake on LAN.
There are two ways to set up a DHCP server. For openSUSE, YaST provides a graphical interface to the process. Users can also manually edit the configuration files. For more information about DHCP servers, see also Chapter 24, DHCP.
To announce the TFTP server's location to the network clients and specify the boot image file the installation target should use, add two declarations to your DHCP server configuration.
Log in as root to the machine hosting the DHCP server.
Start ++.
Complete the setup wizard for basic DHCP server setup.
Select and select when warned about leaving the start-up dialog.
In the dialog, select the subnet in which the new system should be located and click .
In the dialog select to add a new option to the subnet's configuration.
Select filename and enter
pxelinux.0 as the value.
Add another option (next-server) and set its value
to the address of the TFTP server.
Select and to complete the DHCP server configuration.
To configure DHCP to provide a static IP address to a specific host,
enter the of the DHCP server
configuration module
(Step 4)
and add a new declaration of the host type. Add the options
hardware and fixed-address to this
host declaration and provide the appropriate values.
All the DHCP server needs to do, apart from providing automatic address allocation to your network clients, is to announce the IP address of the TFTP server and the file that needs to be pulled in by the installation routines on the target machine.
Log in as root to the machine hosting the DHCP server.
Append the following lines to a subnet configuration of your DHCP
server's configuration file located under
/etc/dhcpd.conf:
subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.200 192.168.1.228;
# PXE related stuff
#
# "next-server" defines the tftp server that will be used
next-server ip_tftp_server:
#
# "filename" specifies the pxelinux image on the tftp server
# the server runs in chroot under /srv/tftpboot
filename "pxelinux.0";
}
Replace
ip_of_the_tftp_server with the actual IP
address of the TFTP server. For more information about the options
available in dhcpd.conf, refer to the
dhcpd.conf manual page.
Restart the DHCP server by executing rcdhcpd restart.
If you plan on using SSH for the remote control of a PXE and Wake on LAN installation, explicitly specify the IP address DHCP should provide to the installation target. To achieve this, modify the above-mentioned DHCP configuration according to the following example:
group {
# PXE related stuff
#
# "next-server" defines the tftp server that will be used
next-server ip_tftp_server:
#
# "filename" specifies the pxelinux image on the tftp server
# the server runs in chroot under /srv/tftpboot
filename "pxelinux.0";
host test {
hardware ethernet mac_address;
fixed-address some_ip_address;
}
}
The host statement introduces the hostname of the installation target. To bind the hostname and IP address to a specific host, you must know and specify the system's hardware (MAC) address. Replace all the variables used in this example with the actual values that match your environment.
After restarting the DHCP server, it provides a static IP to the host specified, enabling you to connect to the system via SSH.
Set up a TFTP server with YaST or set it up manually on any other Linux operating system that supports xinetd and tftp. The TFTP server delivers the boot image to the target system once it boots and sends a request for it.
Log in as root.
Install the
yast2-tftp-server package.
Start ++ and install the requested package.
Click to make sure that the server is started and included in the boot routines. No further action from your side is required to secure this. xinetd starts tftpd at boot time.
Click to open the appropriate port in the firewall running on your machine. If there is no firewall running on your server, this option is not available.
Click to browse for the boot image
directory. The default directory /tftpboot is
created and selected automatically.
Click to apply your settings and start the server.
Log in as root and install the packages
tftp and xinetd.
If unavailable, create /srv/tftpboot and
/srv/tftpboot/pxelinux.cfg directories.
Add the appropriate files needed for the boot image as described in Section 1.3.3, “Using PXE Boot”.
Modify the configuration of xinetd located under
/etc/xinetd.d/ to make sure that the TFTP server
is started on boot:
If it does not exist, create a file called
tftp under this directory with touch
tftp. Then run chmod 755 tftp.
Open the file tftp and add the following
lines:
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /srv/tftpboot
disable = no
}
Save the file and restart xinetd with rcxinetd restart.
Some technical background information as well as PXE's complete specifications are available in the Preboot Execution Environment (PXE) Specification (http://www.pix.net/software/pxeboot/archive/pxespec.pdf).
Change to the directory
boot/<architecture>/loader of your
installation repository and copy the linux,
initrd, message,
biostest, and memtest files
to the /srv/tftpboot directory by entering the
following:
cp -a linux initrd message biostest memtest /srv/tftpboot
Install the syslinux package directly from
your installation CDs or DVDs with YaST.
Copy the /usr/share/syslinux/pxelinux.0 file to
the /srv/tftpboot directory by entering the
following:
cp -a /usr/share/syslinux/pxelinux.0 /srv/tftpboot
Change to the directory of your installation repository and copy the
isolinux.cfg file to
/srv/tftpboot/pxelinux.cfg/default by entering the
following:
cp -a boot/<architecture>/loader/isolinux.cfg /srv/tftpboot/pxelinux.cfg/default
Edit the /srv/tftpboot/pxelinux.cfg/default file
and remove the lines beginning with gfxboot,
readinfo, and framebuffer.
Insert the following entries in the append lines of the default
failsafe and apic labels:
insmod=kernel module
By means of this entry, enter the network kernel module needed to
support network installation on the PXE client. Replace
kernel module with the appropriate
module name for your network device.
netdevice=interface
This entry defines the client's network interface that must be used for the network installation. It is only necessary if the client is equipped with several network cards and must be adapted accordingly. In case of a single network card, this entry can be omitted.
install=nfs://ip_instserver/path_to_repository/CD1
This entry defines the NFS server and the repository for the client
installation. Replace
ip_instserver with the actual IP address
of your installation server.
path_to_repository should be replaced
with the actual path to the repository. HTTP, FTP, or SMB
repositories are addressed in a similar manner, except for the
protocol prefix, which should read http,
ftp, or smb.
![]() | |
If you need to pass other boot options to the installation
routines, such as SSH or VNC boot parameters, append them to the
| |
![]() | Changing Kernel and Initrd Filenames |
|---|---|
It is possible to use different filenames for kernel and initrd images. This is useful if you want to provide different operating systems from the same boot server. However, you should be aware that only one dot is permitted in the filenames that are provided by tftp for the pxe boot. | |
An example /srv/tftpboot/pxelinux.cfg/default file
follows. Adjust the protocol prefix for the repository to match your
network setup and specify your preferred method of connecting to the
installer by adding the vnc and
vncpassword or the usessh and
sshpassword options to the
install entry. The lines separated by
\ must be entered as one continuous line without a
line break and without the \.
default harddisk
# default
label linux
kernel linux
append initrd=initrd ramdisk_size=65536 \
install=nfs://ip_instserver/path_to_repository/product/DVD1
# repair
label repair
kernel linux
append initrd=initrd splash=silent repair=1 showopts
# rescue
label rescue
kernel linux
append initrd=initrd ramdisk_size=65536 rescue=1
# bios test
label firmware
kernel linux
append initrd=biostest,initrd splash=silent install=exec:/bin/run_biostest showopts
# memory test
label memtest
kernel memtest
# hard disk
label harddisk
localboot 0
implicit 0
display message
prompt 1
timeout 100
Replace
ip_instserver and
path_to_repository with the values used in
your setup.
The following section serves as a short reference to the PXELINUX
options used in this setup. Find more information about the options
available in the documentation of the
syslinux package located under
/usr/share/doc/packages/syslinux/.
The options listed here are a subset of all the options available for the PXELINUX configuration file.
DEFAULT kernel options...
Sets the default kernel command line. If PXELINUX boots automatically, it acts as if the entries after DEFAULT had been typed in at the boot prompt, except the auto option is automatically added, indicating an automatic boot.
If no configuration file is present or no DEFAULT entry is present in the configuration file, the default is the kernel name “linux” with no options.
APPEND options...
Add one or more options to the kernel command line. These are added for both automatic and manual boots. The options are added at the very beginning of the kernel command line, usually permitting explicitly entered kernel options to override them.
LABEL label KERNEL image
APPEND options...
Indicates that if label is entered as the
kernel to boot, PXELINUX should instead boot
image and the specified
APPEND options should be used instead of the ones
specified in the global section of the file (before the first
LABEL command). The default for
image is the same as
label and, if no APPEND
is given, the default is to use the global entry (if any). Up to 128
LABEL entries are permitted.
Note that GRUB uses the following syntax:
title mytitle kernelmy_kernelmy_kernel_optionsinitrdmyinitrd
PXELINUX uses the following syntax:
labelmylabelkernelmykernelappendmyoptions
Labels are mangled as if they were filenames and they must be unique after mangling. For example, the two labels “v2.1.30” and “v2.1.31” would not be distinguishable under PXELINUX because both mangle to the same DOS filename.
The kernel does not have to be a Linux kernel; it can be a boot sector or a COMBOOT file.
APPEND -
Append nothing. APPEND with a single hyphen as
argument in a LABEL section can be used to override
a global APPEND.
LOCALBOOT type
On PXELINUX, specifying LOCALBOOT 0 instead of a
KERNEL option means invoking this particular label
and causes a local disk boot instead of a kernel boot.
|
Argument |
Description |
|---|---|
|
|
Perform a normal boot |
|
|
Perform a local boot with the Universal Network Driver Interface (UNDI) driver still resident in memory |
|
|
Perform a local boot with the entire PXE stack, including the UNDI driver, still resident in memory |
All other values are undefined. If you do not know what the UNDI or
PXE stacks are, specify 0.
TIMEOUT time-out
Indicates how long to wait at the boot prompt until booting automatically, in units of 1/10 second. The time-out is canceled as soon as the user types anything on the keyboard, assuming the user will complete the command begun. A time-out of zero disables the time-out completely (this is also the default). The maximum possible time-out value is 35996 (just less than one hour).
PROMPT flag_val
If flag_val is 0, displays the boot prompt only if
Shift or
Alt is pressed or Caps
Lock or Scroll Lock is set (this is the
default). If flag_val is 1, always displays the boot
prompt.
F2filenameF1filename..etc... F9filenameF10filename
Displays the indicated file on the screen when a function key is pressed at the boot prompt. This can be used to implement preboot online help (presumably for the kernel command line options). For backward compatibility with earlier releases, F10 can be also entered as F0. Note that there is currently no way to bind filenames to F11 and F12.
Prepare the system's BIOS for PXE boot by including the PXE option in the BIOS boot order.
![]() | BIOS Boot Order |
|---|---|
Do not place the PXE option ahead of the hard disk boot option in the BIOS. Otherwise this system would try to reinstall itself every time you boot it. | |
Wake on LAN (WOL) requires the appropriate BIOS option to be enabled prior to the installation. Also, note down the MAC address of the target system. This data is needed to initiate Wake on LAN.
Wake on LAN allows a machine to be turned on by a special network packet containing the machine's MAC address. Because every machine in the world has a unique MAC identifier, you do not need to worry about accidentally turning on the wrong machine.
![]() | Wake on LAN across Different Network Segments |
|---|---|
If the controlling machine is not located in the same network segment as the installation target that should be awakened, either configure the WOL requests to be sent as multicasts or remotely control a machine on that network segment to act as the sender of these requests. | |