Setting Up the Installation Server
Kickstart can be configured on an FTP, NFS, or Apache server. Each method is explained below, but my experience is that the Apache server has a number of advantages over the other two.
Using a Web server for Kickstart is generally easier because:
Sometimes a Kickstart server has to be located on a remote network, often passing through a firewall. Strict firewall rules for HTTP are generally easier to configure than those for FTP or NFS. The http:// nomenclature used by Kickstart for accessing files is more familiar to users than that used for NFS and FTP. This may be important for you when configuring files for automated Kickstart installation.
Basic Preparation
The first example sets up a Kickstart server for use in Fedora Core 2 installations. You will place all the necessary files in the /data/network-install directory.
Create the Installation Directories
Create the directories /data/network-install/Fedora/base, /data/network-install/Fedora/RPMS, and /data/network-install/ISO in which you will copy the necessary files.
[root@bigboy tmp]# mkdir -p /data/network-install/Fedora/base
[root@bigboy tmp]# mkdir -p /data/network-install/Fedora/RPMS
[root@bigboy tmp]# mkdir -p /data/network-install/ISO
You now need to place the network installation driver files into the base directory.
Copying the Files
The HTTP, NFS, and FTP Kickstart methods all require the base set of Fedora files to be installed on the Kickstart server:
1. | Mount your first Fedora CD-ROM:
[root@bigboy tmp]# mount /dev/cdrom /mnt/cdrom
| 2. | Copy the files from the CD-ROM base directory to the hard disk:
[root@bigboy tmp]# cd /mnt/cdrom/Fedora/base
[root@bigboy base]# cp -r * /data/network-install/Fedora/base
| 3. | Unmount your CD-ROM, and use the eject command to retrieve it from the drive bay:
[root@bigboy base]# cd /tmp
[root@bigboy tmp]# umount /dev/cdrom
[root@bigboy tmp]# eject cdrom
|
You also have the option to FTP all the files from the base directory of the desired version of Fedora from the Fedora Web site to the /data/networkinstall/Fedora/base directory.
HTTP and FTP Preparation
Copy all the contents of the /Fedora directory of each of the installation CDs to the /data/network-install/ directory. You need about 2GB of space. When copying is complete, your /data/network-install/Fedora/ directory should look like this:
[root@bigboy tmp]# ls /data/network-install/Fedora/
base RPMS TRANS.TBL
[root@bigboy tmp]#
NFS Preparation
Create ISO images of the installation CDs, and place them in the /data/networkinstall/ISO directory. This requires about 2GB of space as well. You can download the ISO images from the Fedora Web site or use the Fedora CDs. If you create the ISO files from CDs, make sure they have the same file names as the ones you can download from the Fedora Web site.
For the first CD, the code you need is:
[root@bigboy tmp]# cd /data/network-install/ISO
[root@bigboy ISO]# dd if=/dev/cdrom of=FC2-i386-disc1.iso bs=32k
...
...
[root@bigboy ISO]# eject cdrom
For the second CD, use:
[root@bigboy ISO]# dd if=/dev/cdrom of=FC2-i386-disc2.iso bs=32k
[root@bigboy ISO]# eject cdrom
For the third, use:
[root@bigboy ISO]# dd if=/dev/cdrom of=FC2-i386-disc3.iso bs=32k
[root@bigboy ISO]# eject cdrom
Finally, use this code to install the fourth CD:
[root@bigboy ISO]# dd if=/dev/cdrom of=FC2-i386-disc4.iso bs=32k
[root@bigboy ISO]# eject cdrom
|
Here is a sample procedure to make ISO files with the older mkisofs command. You may have to install the mkisofs RPM on newer Fedora versions. The command requires a mounted CD-ROM drive, so don't forget the mount command.
|
[root@bigboy ISO]# mount /mnt/cdrom
[root@bigboy ISO]# mkisofs -J -r -T -o filename.iso
/mnt/cdrom
[root@bigboy ISO]# eject cdrom
Set Up Your Web Server
You will now have to set up Apache to give the file listings of your /data/networkinstall/Fedora and /data/network-install/ISO directories by pointing your browser to the URL http://192.168.1.100/network-install/Fedora/RPMS/ or http://192.168.1.100/network-install/Fedora/ISO/, respectively. Here is a sample httpd.conf configuration:
NameVirtualHost 192.168.1.100
#
# For HTTP Installations
#
<VirtualHost 192.168.1.100>
DocumentRoot /data/
</VirtualHost>
<Directory /data/network-install>
Options +Indexes
AllowOverride AuthConfig
order allow,deny
allow from all
</Directory>
Remember to restart Apache to make these settings take effect.
Set Up Your FTP Server
You also have to set up your VSFTPD server to make incoming anonymous FTP connections log into the /data/network-install directory by default. Here is a sample snippet of the vsftpd.conf file:
#
# Anonymous FTP Root Directory
#
anon_root=/data/network-install/
#
Remember to restart VSFTPD to make these settings take effect.
Create a Special FTP User
You can create a special user for non-anonymous FTP installations with the user's home directory as /. You must also make sure that the user has read access to the /data/network-install directory. For example:
[root@bigboy tmp]# useradd -g users ftpinstall
[root@bigboy tmp]# passwd ftpinstall
Changing password for user ftpinstall.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@bigboy tmp]#
[root@bigbot tmp]# usermod -d / ftpinstall
[root@bigbot tmp]#
Set Up Your NFS Server
The steps for setting up an NFS server are more complicated:
1. | Create a /etc/exports file with the following entry in it. You must use tabs, not spaces between the entries:
/data/network-install *(ro,sync)
| 2. | Make sure that the portmap, nfs, nfslock, and netfs daemons are all running to create an NFS server. The startup scripts for these are found in the /etc/init.d directory. Chapter 29, "Remote Disk Access with NFS," explains this in more detail.
| 3. | Run the exportfs command to add this directory to the NFS database of network available directories:
[root@bigboy tmp]# exportfs -ra
|
Keep in mind that the installation client must have a matching pair of forward and reverse DNS entries on your DNS server. In other words, a DNS lookup on the IP address of the installation client must return a server name that maps back to the original IP address when a DNS lookup is done on that same server name. For example:
[root@bigboy tmp]# host 192.168.1.96
96.1.168.192.in-addr.arpa domain name pointer 192-168-1-96.my-
web-site.org.
[root@bigboy tmp]#
[root@bigboy tmp]# host 192-168-1-96.my-site.com
192-168-1-96.my-web-site.org has address 192.168.1.96
[root@bigboy tmp]#
This may mean that you must create entries for all your DHCP IP addresses if you choose to use a DHCP method of assigning IP addresses during installation.
Configure Your DHCP Server
During the installation procedure, the installation client prompts you for the IP address it should use for the installation process. I recommend selecting the option that makes the installation client get its address via DHCP. This automates the installation more, thereby making it faster. It also reduces the possibility of human error.
Setting up the Installation Server as a DHCP server is fairly straight forward; for details see Chapter 8, "Configuring the DHCP Server."
|