== Kickstart Installation Guide ==
How to install Red Hat above Lan
# Step 1: Getting started
server settings:
eth0:
ip: 192.168.1.142
subnet: 255.255.255.0
gw: 192.168.1.1
/etc/inetd/xinetd start
Create a directory called /kickstart
mkdir -p /kickstart
Create a /tftpboot directory if one does not exist
already should exist
Create a directory /tftpboot/pxelinux.cfg
mkdir -p /tftpboot/pxelinux.cfg
Copy the contents of the RedHat Installation disks into the /kickstart directory.
mount -t auto /dev/cdrom /mnt
You will need to find the vmlinuz and initrd.img files in the /kickstart directory and copy them into the /tftpboot directory. These files will be used to start the kickstart process after the PXE boot has taken place.
cp -r /mnt/initrd.img /kickstart
cp -r /mnt/vmlinuz /kickstart
Please note that the vmlinuz kernel must match the version of OS you are going to build.
# Step2: Configure NFS Server
Using /sbin/chkconfig make sure the NFS service and NETFS are set to on.
/sbin/chkconfig --level 345 nfs on
Create a /etc/exports file if one does not exist.
Edit the /etc/exports file and enter the /kickstart and /tftpboot directories as seen below.
The ip must be determined by the user or must be given for the specified host, which sholuld be installed !!!!
Which means, export all to the HOSt = 192.168.1.100 !!!
# Exported directories in /etc/exports
/kickstart 192.168.1.100(ro,sync,no_root_squash)
/tftpboot 192.168.1.100(ro,sync,no_root_squash)
Using the /usr/sbin/exportfs command export all of the directories with the –a option.
exportfs -a
Then you can verify the exports by typing /usr/sbin/exportfs command with no arguments. A list of the exported directories and permissions should be returned.
Note: The permissions set in this example are readable to any host that mounts the directories. More secure permissions can be set. See the man for exports for more information.
# Step 3: Obtaining the PXE
Most systems should already have it installed!!
Booting a PC without a kernel written to a disk requires the use of PXE boot. Most of the Dell machines contained within Motorola have a PXE boot option in the CMOS. The PXE environment can be obtained at http://syslinux.zytor.com/pxe.php. The package found at this website is called syslinux. The component that is needed from this package to perform a PXE boot is pxelinux.0
The most current package of syslinux is syslinux-2.00.tar.gz
Extract the archive to the directory of your choice.
Once the package is extracted copy the pxelinux.0 binary into the /tftpboot directory.
# Step 4: Configure a DHCP server
Install a DHCP server that allows bootp onto the RedHat box. The package that was used in the test machine was dhcp-2.0p15. This package was included on the RedHat 7.3 disks. If a compatible DHCP package cannot be found on the installation disks, one can be downloaded at http://www.rpmfind.net or http://www.redhat.com.
The installation of the DHCP server should create an example of /etc/dhcpd.conf. The dhcpd.conf file is configuration file for the DHCP server. Rename this file and create a new one with the same name.
Put the following information into the configuration file as follows:
#This file controls the DHCP server
vi /etc/dhcp.conf
ddns-update-style ad-hoc;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name "example.com";
option domain-name-servers 192.168.1.1;
range 192.168.1.10 192.168.1.254;
filename "pxelinux.0";
next-server 192.168.1.142;
}
/etc/init.d/dhcpd start
#Step 5: Setting up the kickstart file
The kickstart file can be created via the gnome tool called kickstart. Or one can be created by hand.
Name the file ipaddress-kickstart and save it to the /tftpboot directory.
/sbin/redhat-config-kickstart
Below is an example of a kickstart file:
#Generated by Kickstart Configurator
#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse genericps/2
#System timezone
timezone --utc America/Chicago
#Root password
rootpw --iscrypted $1$QlIJLX6p$tXsC1gbpS7O5XmSrxS.Bx.
#Install Red Hat Linux instead of upgrade
install
#Use NFS installation media
nfs --server 192.168..142 --dir /kickstart
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Clear all partitions from the disk
clearpart --all --initlabel
#Disk partitioning information
part / --fstype ext3 --size 1 --grow
part /boot --fstype ext3 --size 100
part swap --size 1000
#Use DHCP networking
network --bootproto dhcp
#System authorization information
auth --useshadow --enablemd5
#Firewall configuration
firewall --disabled
#XWindows configuration information
#Probe for video card
#Probe for monitor
xconfig --depth 24 --resolution 1024x768 --defaultdesktop=GNOME --startxonboot
%packages --resolvedeps
@GNOME Desktop Environment
@Editors
@Engineering and Scientific
@Office/Productivity
@Sound and Video
@Graphics
@DNS Name Server
@Network Servers
@Administration Tools
@System Tools
NOTE: A list of packages and the contents can be found on the RedHat installation disk or the /kickstart directory in a file called comps.
# Step 6: Creating the PXE boot parameters
Once the client machine obtains the PXE environment specified in the dhcpd.conf file it begins to make tftp requests for a file named after its’ IP address in uppercase hexadecimal format. The hexadecimal file needs to be contained in the /tftpboot/pxelinux.cfg directory.
For example: The IP that was used for this document was 192.168.1.142. The file that the machine then requested was /tftpboot/pxelinux.cfg/C0A8164
!! C0 ... is not correct anymore, use default instead !!!!
This hexadecimal file needs to contain the parameters for booting the vmlinuz kernel.
This can be specified as follows:
default ks
prompt 0
timeout 600
label ks
kernel vmlinuz
append ks=nfs:servername:/tftpboot/ipaddress-kickstart initrd=initrd.img
Once the kernel is loaded an nfs mount is performed and the kickstart information is pulled from the specified the location.
# Step 7: Copying Disks to hard disk
mount /mnt/cdrom
cp -var /mnt/cdtom/RedHat /kickstart
Do it with all 3 CDS !!!!
# Step 8: Trying it out
Set the client machine to boot using PXE first, save the settings and exist the bios.
When the machine reboots you should see many lines of text followed by a gui. The machine should then build itself with the parameters you’ve specified.
Make sure to turn off the PXE boot option after the reboot. Or disable the entry for the mac address in the dhcpd.conf file.
How to install Red Hat above Lan
# Step 1: Getting started
server settings:
eth0:
ip: 192.168.1.142
subnet: 255.255.255.0
gw: 192.168.1.1
/etc/inetd/xinetd start
Create a directory called /kickstart
mkdir -p /kickstart
Create a /tftpboot directory if one does not exist
already should exist
Create a directory /tftpboot/pxelinux.cfg
mkdir -p /tftpboot/pxelinux.cfg
Copy the contents of the RedHat Installation disks into the /kickstart directory.
mount -t auto /dev/cdrom /mnt
You will need to find the vmlinuz and initrd.img files in the /kickstart directory and copy them into the /tftpboot directory. These files will be used to start the kickstart process after the PXE boot has taken place.
cp -r /mnt/initrd.img /kickstart
cp -r /mnt/vmlinuz /kickstart
Please note that the vmlinuz kernel must match the version of OS you are going to build.
# Step2: Configure NFS Server
Using /sbin/chkconfig make sure the NFS service and NETFS are set to on.
/sbin/chkconfig --level 345 nfs on
Create a /etc/exports file if one does not exist.
Edit the /etc/exports file and enter the /kickstart and /tftpboot directories as seen below.
The ip must be determined by the user or must be given for the specified host, which sholuld be installed !!!!
Which means, export all to the HOSt = 192.168.1.100 !!!
# Exported directories in /etc/exports
/kickstart 192.168.1.100(ro,sync,no_root_squash)
/tftpboot 192.168.1.100(ro,sync,no_root_squash)
Using the /usr/sbin/exportfs command export all of the directories with the –a option.
exportfs -a
Then you can verify the exports by typing /usr/sbin/exportfs command with no arguments. A list of the exported directories and permissions should be returned.
Note: The permissions set in this example are readable to any host that mounts the directories. More secure permissions can be set. See the man for exports for more information.
# Step 3: Obtaining the PXE
Most systems should already have it installed!!
Booting a PC without a kernel written to a disk requires the use of PXE boot. Most of the Dell machines contained within Motorola have a PXE boot option in the CMOS. The PXE environment can be obtained at http://syslinux.zytor.com/pxe.php. The package found at this website is called syslinux. The component that is needed from this package to perform a PXE boot is pxelinux.0
The most current package of syslinux is syslinux-2.00.tar.gz
Extract the archive to the directory of your choice.
Once the package is extracted copy the pxelinux.0 binary into the /tftpboot directory.
# Step 4: Configure a DHCP server
Install a DHCP server that allows bootp onto the RedHat box. The package that was used in the test machine was dhcp-2.0p15. This package was included on the RedHat 7.3 disks. If a compatible DHCP package cannot be found on the installation disks, one can be downloaded at http://www.rpmfind.net or http://www.redhat.com.
The installation of the DHCP server should create an example of /etc/dhcpd.conf. The dhcpd.conf file is configuration file for the DHCP server. Rename this file and create a new one with the same name.
Put the following information into the configuration file as follows:
#This file controls the DHCP server
vi /etc/dhcp.conf
ddns-update-style ad-hoc;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name "example.com";
option domain-name-servers 192.168.1.1;
range 192.168.1.10 192.168.1.254;
filename "pxelinux.0";
next-server 192.168.1.142;
}
/etc/init.d/dhcpd start
#Step 5: Setting up the kickstart file
The kickstart file can be created via the gnome tool called kickstart. Or one can be created by hand.
Name the file ipaddress-kickstart and save it to the /tftpboot directory.
/sbin/redhat-config-kickstart
Below is an example of a kickstart file:
#Generated by Kickstart Configurator
#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse genericps/2
#System timezone
timezone --utc America/Chicago
#Root password
rootpw --iscrypted $1$QlIJLX6p$tXsC1gbpS7O5XmSrxS.Bx.
#Install Red Hat Linux instead of upgrade
install
#Use NFS installation media
nfs --server 192.168..142 --dir /kickstart
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Clear all partitions from the disk
clearpart --all --initlabel
#Disk partitioning information
part / --fstype ext3 --size 1 --grow
part /boot --fstype ext3 --size 100
part swap --size 1000
#Use DHCP networking
network --bootproto dhcp
#System authorization information
auth --useshadow --enablemd5
#Firewall configuration
firewall --disabled
#XWindows configuration information
#Probe for video card
#Probe for monitor
xconfig --depth 24 --resolution 1024x768 --defaultdesktop=GNOME --startxonboot
%packages --resolvedeps
@GNOME Desktop Environment
@Editors
@Engineering and Scientific
@Office/Productivity
@Sound and Video
@Graphics
@DNS Name Server
@Network Servers
@Administration Tools
@System Tools
NOTE: A list of packages and the contents can be found on the RedHat installation disk or the /kickstart directory in a file called comps.
# Step 6: Creating the PXE boot parameters
Once the client machine obtains the PXE environment specified in the dhcpd.conf file it begins to make tftp requests for a file named after its’ IP address in uppercase hexadecimal format. The hexadecimal file needs to be contained in the /tftpboot/pxelinux.cfg directory.
For example: The IP that was used for this document was 192.168.1.142. The file that the machine then requested was /tftpboot/pxelinux.cfg/C0A8164
!! C0 ... is not correct anymore, use default instead !!!!
This hexadecimal file needs to contain the parameters for booting the vmlinuz kernel.
This can be specified as follows:
default ks
prompt 0
timeout 600
label ks
kernel vmlinuz
append ks=nfs:servername:/tftpboot/ipaddress-kickstart initrd=initrd.img
Once the kernel is loaded an nfs mount is performed and the kickstart information is pulled from the specified the location.
# Step 7: Copying Disks to hard disk
mount /mnt/cdrom
cp -var /mnt/cdtom/RedHat /kickstart
Do it with all 3 CDS !!!!
# Step 8: Trying it out
Set the client machine to boot using PXE first, save the settings and exist the bios.
When the machine reboots you should see many lines of text followed by a gui. The machine should then build itself with the parameters you’ve specified.
Make sure to turn off the PXE boot option after the reboot. Or disable the entry for the mac address in the dhcpd.conf file.