Automated Installation of Large-Scale Linux Networks
Before we could embark on setting up super-Kickstart, we needed to obtain and set up some software packages. The first was the etherboot package (see Resources). To serve our purpose, the package had to be modified a little as follows.
In the directory etherboot/netboot/mknbi-linux, edit the file mknbi.h as shown in Listing 1.
Now, edit the configuration file for etherboot, etherboot/src/Config.32, as follows. Locate the line:
CFLAGS+= -DDHCP_SUPPORT -DMOTD -DIMAGE_MENU
and change it to:
CFLAGS+= -DDHCP_SUPPORTIf the target machine has a BIOS that does not configure the network card properly, you may also need to append this line with -DCONFIG_PCI_DIRECT before compiling the packages.
Next, we moved to the top etherboot directory and did a make all to compile all the binaries.
Then, we created a directory to hold all the necessary executables for this setup. We copied the file etherboot/src/floppyload.bin and the appropriate ROM images, .rom and .lzrom, from the etherboot/src-32/ directory to this location. The file mknbi was also copied from the etherboot/netboot/mknbi-linux/ to this directory.
The second required tool was the streplace utility (see Resources). This useful package was utilized for replacing strings in files while configuring host-specific parameters that change with each workstation, e.g., host name and IP address. After compiling the binary, it was also copied to the working directory mentioned above. With these tools in hand, we happily moved on to the next step.
A closer look at the Red Hat installation disk reveals that it contains a Linux kernel, an initial ramdisk image and some configuration files. For our purposes, we utilized only the kernel and the initial ramdisk image. To have a look at the contents of the disk image, mount it as a loop device using these commands:
mount -o loop cd mount_point
We then copied the kernel image (vmlinuz) and the initial ramdisk (initrd.img) to the directory we created earlier. In addition, the file syslinux.cfg provided the kernel options necessary for initiating a Kickstart install. They were noted. We had no further use for the installation disk beyond this point.
The Kickstart HOWTO discusses the syntax of the ks.cfg file in detail. Although very informative, it takes too long to generate this file. Therefore, the method we devised was to first install Red Hat Linux 6.1 on a machine using the “normal” CD-ROM method. All packages, options and settings for our to-be-target-machine were manually specified. Once the system was up and running, it was tested for optimum performance and then used as prototype for the rest of the installations.
A special package called mkkickstart also had to be installed. The mkkickstart utility can extract information from an installation and print it on the standard output. We used it to do exactly that:
Any Kickstart installation that is now run with ks.cfg as the configuration file will create a replica of our prototype workstation. We did some minor editing of this file to implement some changes. Listing 2 is a sample from the start of the file.
The Kickstart technique offers provisions for executing any necessary post-install procedures needed once the installation is complete. This feature, besides allowing individual customization, is particularly useful when packages other than those included with the standard Red Hat distribution are to be installed. In our case, these included JDK (Java Development Kit) for Linux, among many others. We added the following lines to the post-install section and created a separate script and Perl program (see Listings 3 and 4) that would execute when the Red Hat installation had finished:
%post cd /root tar -xvzf install:/kickstart/install.tar.gz cd installfiles ./postinstall cd /root rm -rf installfiles
The tar file (install.tar.gz) was placed on the Installation Server (install), from where it could be retrieved and executed to customize the system. Our special customization included un-tarring JDK from our ftp server, setting up linuxconf for web access, specifying the DNS server and allowing root remote shell access of workstation from the servers.
|Security Hardening with Ansible||Aug 18, 2014|
|Monitoring Android Traffic with Wireshark||Aug 14, 2014|
|IndieBox: for Gamers Who Miss Boxes!||Aug 13, 2014|
|Non-Linux FOSS: a Virtualized Cisco Infrastructure?||Aug 11, 2014|
|Linux Security Threats on the Rise||Aug 08, 2014|
|Android Candy: Oyster—Netflix for Books!||Aug 07, 2014|
- Security Hardening with Ansible
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- Monitoring Android Traffic with Wireshark
- Tech Tip: Really Simple HTTP Server with Python
- Readers' Choice Awards 2013
- RSS Feeds
- Returning Values from Bash Functions
- IndieBox: for Gamers Who Miss Boxes!
- Kernel Korner - Why and How to Use Netlink Socket
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014