Manage Learn to apply best practices and optimize your operations.

Creating an installation server for SUSE Linux Enterprise Server

When installing multiple SUSE Linux Enterprise servers, using an installation server can facilitate the process. This tip details how to create an installation server for SUSE Linux Enterprise Server 10.

If you just have one server to install, you install it from the installation disk. But if there are several servers...

to install, or if your server doesn't install easily from an optical drive, an installation server is useful. In this article, you'll learn how to set up an installation server for SUSE Linux Enterprise Server (SLES) 10 Service Pack 2 (SP2).

In many cases where installation servers are used, it isn't possible to boot a server from the installation DVD. Therefore, apart from the installation server that offers software installation repositories, you'll also need a PXE boot server. This server ensures that a boot image is handed out to servers that you need to install. In this article, you'll first learn how to create an HTTP-based installation server. After that, you'll learn how to create a PXE boot image that refers to the HTTP-based installation server.

Configuring the HTTP installation server
To create the HTTP installation server, go to your server and start YaST2. YaST2 has a module that allows you easily to create an installation server. The next procedure describes how.

1. Select Miscellaneous > Installation Server. You'll now see the window from Figure 1. Select the protocol your installation server has to use. Choose "Configure as HTTP source," and at the option "directory to contain sources," select the directory /srv/www. Then click next to continue.

Figure 1. Specify which protocol to use for your installation server.

2. Now you need to provide an Apache alias that your installation server will use. By using this alias, you can separate installation files from other files offered by the Apache Web Server. Since this is an installation server for SLES 10 SP2, "sles102" is a reasonable name.

Figure 2. The alias you enter here must be included in the path to your installation repository.

3. You'll now see an empty window where you have to specify which files the installation server will offer. From this window, click Add to continue.

Figure 3. Click Add to add an installation repository.

4. First, enter the source name. The name you enter here will be offered as a subdirectory to the alias that you used in step two of this procedure. Imagine that you use the source name sles102, and that your server is reached on IP address That would make the final URL Not very pretty, but it works, so why bother? Another useful option that you can find here is "Announce as installation service with SLP." If this option is on, the servers you want to install can find your installation server by means of SLP.

Figure 4. The source name you enter here is used in the final URL.

5. Next you have to indicate where the installation files can be found. To do so, use the optical drive of your server, or select "Use ISO images" if the installation DVD is copied to your server as an ISO image. Next, specify in which directory the ISO image is found.

Figure 5. You can use an ISO image to create the installation repository.

6. The contents of the installation DVD are now copied to the directory that you've selected. This process can take a while. Once copying is complete, a window will appear (see Figure 6). The installation server is now added and ready for use. Click Finish to write all settings to your server.

Figure 6. The installation server is now finished and ready for use.

Before we continue, perform a check to identify the path you will need. On your server, go to the directory /srv/www/sles102, and check the contents of this directory. Do you see a subdirectory with the name CD1? That means that the complete path to refer to the installation repository will be http://yourserver/sles102/sles102/CD1. Now it's time to test whether the process really works. You can use a virtual machine, but you can test on a physical machine as well. Boot the machine from the SUSE installation disk in the boot menu, and press F4. You will now see a list of different installation sources that you can use. Select the option HTTP. Next, specify the IP address or name of the server you want to use, and at the directory option, specify the complete path where the installation files can be found. Figure 7 illustrates what this looks like .

But be warned: The server that you are about to install needs an IP address. Make sure a Dynamci Host Configuration Protocol (DHCP) server is available in the network or the installation will fail.

Figure 7. On the server you want to install, refer to the server name or IP address and the path you need to use for the installation.

Now press enter to start the installation. Wait until you see the window from Figure 8. You will only see this window if the installation server was reached succesfully.

Figure 8. If you see this window, the installation server works.

Configuring the PXE server
Now that the installation server is available, it's time for the second part of the process. You have to create a PXE boot image that can be used as a starting point by the servers you want to install. This is useful if the servers don't have an optical drive, such as blade servers. The only condition is that the network card of your server needs to support PXE boot, but almost all network cards do. To create a PXE boot server, you need two services: the DHCP server and a Trivial File Transfer Protocol (TFTP) server. Is there already a DHCP-server in the network? Test this on an isolated network segment to make sure that you are talking to the right DHCP server. Once you've confirmed that it works, you can integrate this configuration with the configuration of you existing DHCP server.

1. In YaST, select Network Services > DHCP Server. If needed, install the DHCP server software.

2. Select the network card on which you want to offer DHCP services and click next to continue.

3. Specify the generic settings you want this DHCP server to hand out, such as default gateway, DNS server and Network Time Protocol server.

Figure 9. Specify generic settings for your DHCP server.

4. Now provide a small range of addresses that the DHCP server may hand out. The range doesn't need to be too large since you're only using it for your installation server.

Figure 10. Make sure the DHCP server has a small address range to hand out.

5. To complete this part of the configuration, indicate that you want the DHCP server to start automatically upon reboot and click finish.

6. Now that your DHCP server is operational, there are some options you need to include in its configuration file /etc/dhcpd.conf. These are as follows:

  • Next-server: This is the IP address of the server your DHCP server had to contact to download the TFTP boot image.
  • Server-name: This option passes the name of the DHCP server to the client.
  • Filename: Use this to tell the DHCP server which file to download from the PXE server.

You need to add these options to the subnet definition. The final result may look as follows:

subnet netmask{
   default-lease-time 14400;
   max-lease-time 172800;
   server-name "";
   filename "pxelinux.0";

7. Now restart the DHCP server using the command rcdhcpd restart.

8. Now that the DHCP server is operational, it's time to install TFTP and SysLinux. These two packages are needed to create the boot image. Use the following command to install them.
yast2 -i tftp syslinux

9. Next, you need to make a directory structure for the TFTP server:
mkdir -p /tftpboot/pxelinux.cfg cp /usr/share/syslinux/pxelinux.0 /tftpboot

10. Now you need to copy a Linux kernel and the initrd to the /tftpboot directory. You can find these files in the installation repository in the subdirectory boot/ /loader. Make sure to replace by the platform for which you have created the installation server. Assuming that you have created an installation server for i386, the complete path name in this example case would be /srv/www/sles102/CD1/boot/i386/loader. From this directory, use the following command to copy these files:
cp linux initrd /tftpboot

11. Next, you need to create a boot file for the TFTP server. The name of this file is /tftpboot/pxelinux.cfg/default. This file contains the information you would normally get from the Grub menu when booting. The contents of this file may appear as follows. Make sure to change the URL according to your configuration.

default SLES10sp2
label SLES10sp2
   kernel linux
   append initrd=initrd ramdisk_size=65536 install=

Warning! Everyting after the append option must be on one line.

12. In YaST, go to Network Services > TFTP Server, and make sure the TFTP server is enabled. Ready? It's time to go back to the test server. Reboot it and make sure to start it from the network card this time. If you see something that looks like Figure 11, the TFTP boot server is working properly. If it still goes wrong, make sure that the URL to the installation repository is /tftpboot/pxelinux.cfg/default is correct.

Figure 11. If you see this, the TFTP boot image works.

In this article, we've outlined how to set up a SUSE Linux installation server. You've created an installation repository as well as a TFTP server that hands out boot images to servers that boot from the network. Using an installation server makes it possible to install blade servers and virtual machines in a XenServer environment.

Next Steps

Install SUSE Manager easily for server management

This was last published in July 2008

Dig Deeper on Linux servers

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.