Its all About Linux Kickstart Installation and PXE (Network) Installation

1. What is Kickstart installation?

Answer:
Installation of RedHat Linux in non-interactive mode is called the Kickstart installation.
Many system administrators would prefer to use an automated installation method to install RedHat Enterprise Linux on their machines. Using kickstart, a system administrator can create a single file containing the answer to all the questions that would normally asked during a typical installation.
Kickstart files can be kept on a single server system and read by individual computers during the installation. This installation method can support the use of a single kickstart file to install RedHat Enterprise Linux on multiple machines, making it ideal for network and system administrators.
The default Kickstart installation file is anaconda-ks.cfg.

Read Also: [Windows] How To Enable Hibernate Option in Windows 10 with CMD

2. What are the minimum requirements for kickstart installation?

Answer:
(i) RedHat Enterprise Linux – 5, 6 , 7 or 8 ISO image file with full path.
(ii) Kickstart installation file like anaconda-ks.cfg or out custom kickstart installation file.
(iii) Copy the O/S ISO image file by configuring the kickstart.
(iv) Availability of installation media to remote systems through NFS, FTP or HTTP

3. How to setup the Kickstart installation server?

Answer:
(i) Install the system-config-kickstart package by # yum install system-config-kickstart -y command.
(ii) Create a kickstart installation file in GUI mode.
# system-config-kickstart (this command will display the kickstart configuration window)
(iii) Basic Configuration is the first option in the kickstart configuration window and we have to choose the following options in this.
(a) Select the default language (for example English).
(b) Select the Keyboard type (for example US English).
(c) Select the Time zone (for example Asia/Kolkata).
(d) Type the Root password and Re-type the same to confirm the root password.
(e) Select the Target Architecture (x86_64 or 32 bit)
(iv) Installation Method is the second option.
(a) Installation Method. (Select any one option)
(1) Perform New Installation
(2) Upgrade an existing installation
(b) Installation Source. (Select any one option)
(1) CD-ROM/DVD
(2) NFS
(3) FTP
(4) HTTP
(5) Hard Drive
(v) Boot Loader options is the next option in kickstart configuration.
(a) Select Install New Boot Loader option.
(vi) Partition Information is the next option.
(a) Master Boot Record (Select any one option)
(1) Create Master Boot Record
(2) Do not create Master Boot Record
(b) Partitions (Select any one option)
(1) Remove all existing partitions
(2) Remove existing Linux partitions
(3) Preserve existing partitions
(c) Disk Label (Select any one option)
(1) Initialize the disk label
(2) Do not initialize the disk label
(d) Select Add button and select Mount point, File system type and Sizes to create the partitions.
(vii) Network Configuration is the next option.
(a) Select Add Network Device to add the NIC device, configure the IP address either DHCP or Staticand select enable the NIC at boot time or not.
(viii) Authentication is the next option.
Select the authentication mechanism like Shadow passwords, NIS, LDAP or Kerberos… etc.,
(ix) Firewall Configuration is the next option.
Select whether activate the SELinux or not, Security Level and Firewall Information.
(x) Display Configuration is the next option.
Select the display configuration of the O/S either GUI or CLI mode.
(xi) Package Selection is the next option.
Select the required packages for installation. (we cannot select the packages in RHEL – 7)
(xii) and (xiii) Pre-Installation Scripts and Post-Installation Scripts are the last options.
If we have any Pre-installation or Post-installation scripts, then we have to specify the locations of those.
(xiv) Save this fie by select the Save option in File menu.
(xv) Exit from the Kickstart Configuration window by select the Quit option in File menu.
(xvi) Open the kickstart file and the default kickstart file at time by the following command.
# vim -O <kickstart file><anaconda file>
Go to package section in anaconda file, copy the select the packages and paste them in the kickstart file.
(xvii) Check the kickstart file for syntax errors by # ksvalidator <kickstart file> command.
(xviii) Install the webserver package by # yum install httpd* -y command.
(xix) Copy the kickstart file in Document Root of the webserver and preserver the permissions.
# cp -p <kickstart file> /var/www/html/
(xx) Restart the webserver deamons in RHEL – 6 and RHEL – 7.
# service httpd restart (to restart the webserver deamon in RHEL – 6)
# chkconfig httpd on (to enable the webserver deamon at next boot in RHEL – 6)
# systemctl restart httpd (to restart the webserver deamon in RHEL – 7)
# systemctl enable httpd (to enable the webserver deamon at next boot in RHEL – 7)
(xxi) Add the webserver service to IPtables and Firewall.
In RHEL – 6 :
# setup
Select Firewall configuration —–> Select HTTP and HTTPS to the firewall
# service iptables save
# service iptables restart
# chkconfig iptables on
In RHEL – 7 :
# firewall-cmd –permanent –add-service=http
# firewall-cmd –permanent –add-service=https
# firewall-cmd –complete-reload

Read Also: [Windows]Top 69 Windows 10 updated Run (start +R) Commands

4. How to install on client system using kickstart file?

Answer:
(i) Boot the client system using RHEL – 6 DVD and press Esc key.
(ii) Then it prompts us boot : screen.
(iii) Type the following information about the kickstart file, its server and also assign some IP address to the client system to communicate with kickstart server.
boot : linux ip=< IP address to the client> netmask=<netmask of that IP> ks=ftp://< IP address of the kickstart server>/<kickstart file name with full path> (press Enter key)
* Then the installation will continue by taking the installation information from the kickstart file.

5. In how many ways can we install RedHat Linux through network?

Answer:
(i) FTP
(ii) NFS
(iii) HTTP
(iv) PXE

6. How to install RedHat Linux though FTP?

Answer:
(i) First configure the FTP server and copy the entire RedHat Linux DVD in that FTP document root directory.
(ii) Installation of Linux through network requires one boot.iso image or RHEL DVD.
To make a DVD/Pendrive bootable using boot.iso image :
(a) Download the boot.iso image from redhat website.
# cdrecord /root/boot.iso (/root/boot.iso is the path of boot.iso image)
(b) Copy the boot.iso image into DVD or pendrive.
# dd if=/root/boot.iso of=/dev/sdb1 (/dev/sdb1 is the address of the USB or pendrive)
(iii) Boot the system with the above created boot.iso image and press Esc key to get the boot : prompt.
(iv) Then execute the below command to install the O/S.
boot : linux askmethod (Press Enter key)
(v) Select the preferred language for installation (for example English).
(vi) Select the Keyboard layout as US.
(vii) Select the url option for the installation media (for example FTP/NFS/HTTP).
(viii) Select IPv4 or IPv6 to define network settings and select dynamic or static options.
(ix) Assign the same range IP address and netmask to the client system to communicate with server.
(x) Then specify the FTP server IP address and path of the installation media to install the O/S.

Read Also: [2021] Top 30 Free Stock images Websites

7. How to install RedHat Linux through NFS?

Answer:
(i) Make an entry in /etc/exports to export the RHEL media.
# vim /etc/exports
<installation media directory> <network ID>(rw, sync) (save and exit this file)
Example :
/var/ftp/pub/rhel6 172.25.9.0(rw, sync) (If the installation media is in /var/ftp/pub/rhel6)
(ii) Export the above NFS shared directory by # exportfs -rv command.
(iii) Then restart the NFS service by # service restart nfs command and add the NFS to IPtables or firewall.
(iv) Installation of Linux through network requires one boot.iso image or RHEL DVD.
To make a DVD/Pendrive bootable using boot.iso image :
(a) Download the boot.iso image from redhat website.
# cdrecord /root/boot.iso (/root/boot.iso is the path of boot.iso image)
(b) Copy the boot.iso image into DVD or pendrive.
# dd if=/root/boot.iso of=/dev/sdb1 (/dev/sdb1 is the address of the USB or pendrive)
(v) Boot the system with the above created boot.iso image and press Esc key to get the boot: prompt.
(vi) Then execute the below command to install the O/S.
boot : linux askmethod (Press Enter key)
(vii) Select the preferred language for installation (for example English).
(viii) Select the Keyboard layout as US.
(ix) Then select the NFS directory option and specify the NFS server IP address and NFS shared directory and the installation will be done.

Read Also: How To Bypass Mega.nz 50GB Import Limit

8. How to install the RedHat Linux through HTTP?

Answer:
(i) First install the http webserver by # yum install httpd* -y command.
(ii) Copy the entire RHEL DVD contents into /var/www/html/rhel6 by
# cp -rvpf /media/RHEL/*.* /var/www/html/rhel6
(iii) If not possible to do the above step2, then create a link between the /var/ftp/pub/rhel6 and /var/www/html by # ln -s /var/ftp/pub/rhel6 /var/www/html/rhel6 command.
(iv) Restart the http services and add it to the firewall.
In RHEL – 6 :
# service httpd restart (to restart the http service in RHEL – 6)
# chkconfig httpd on (to enable the http service at next boot in RHEL – 6)
# setup (through the setup command add the http service to the IP tables)
# service iptables save (to save the iptables configuration)
# service iptables restart (to restart the iptables service)
In RHEL – 7 :
# systemctl restart httpd (to restart the http service in RHEL – 7)
# systemctl enable httpd (to enable the http service at next boot in RHEL – 7)
# firewall-cmd –permanent -add-service=http (to add the http service to the firewall in RHEL – 7)
# firewall-cmd -complete-reload (to reload the firewall configuration)
(v) Installation of Linux through network requires one boot.iso image or RHEL DVD.
To make a DVD/Pendrive bootable using boot.iso image :
(a) Download the boot.iso image from redhat website.
# cdrecord /root/boot.iso (/root/boot.iso is the path of boot.iso image)
(b) Copy the boot.iso image into DVD or pendrive.
# dd if=/root/boot.iso of=/dev/sdb1 (/dev/sdb1 is the address of the USB or pendrive)
(vi) Boot the system with the above created boot.iso image and press Esc key to get the boot : prompt.
(vii) Then execute the below command to install the O/S.
boot : linux askmethod (Press Enter key)
(viii) Select the preferred language for installation (for example English).
(ix) Select the Keyboard layout as US.
(x) Select the urloption for the installation media and specify the http or https IP address and location.
Example :
http or https://172.25.9.11/rhel6
(xi) Then installation of RedHat Linux will be done through HTTP.

9. What is PXE installation and what are it’s requirements?

Answer:
Automatic Installation of RHEL from the Network is called PXE installation. This is also called as un-attended
installation. The means nobody interaction is required in the installation process.
PXE stands for Pre Execution. The PXE does not requires a RHEL DVD or any boot.iso image.
The requirements for PXE server :
(i) Static network at server side.
(ii) DHCP server should be configured on the server.
(iii) FTP server should be configured on the server.
(iv) Yum server should be configured on the server.
(v) TFTP server should be configured on the server.
(vi) Create the kickstart installation file.
* If all the above 5 servers are configured in one server, that server should be called as PXE server.

Read Also: [Security] What is Web Application Firewall(WAF)? Top 10+ WAF 2021

10. How to configure the PXE server and how to install RedHat from PXE server?

Answer:
(a) Put the RHEL – 6 DVD into the DVD drive and go to Packages directory.
# cd /media/RHEL6/Packages
(b) Install the vsftpd package to configure the FTP server.
# rpm -ivh vsftpd*
(c) Copy the entire RHEL – 6 DVD contents into the /var/ftp/pub/rhel6 directory.
# cp -rvpf /media/RHEL6/*.* /var/ftp/pub/rhel6
(d) Restart, enable the ftp service at next boot, add the service to IP tables and restart the IP tables.
# service vsftpd restart
# chkconfig vsftpd on
# iptables -A INPUT -m state –state NEW -m tcp -p tcp –deport 21 -j ACCEPT
# iptables -A OUTPUT -m state –state NEW -m tcp -p tcp –deport 21 -j ACCEPT
# iptables -A INPUT -m state –state NEW -m tcp -p tcp –deport 20 -j ACCEPT
# iptables -A OUTPUT -m state –state NEW -m tcp -p tcp –deport 20 -j ACCEPT
# service iptables save
# service iptables restart
# chkconfig iptables on
(e) Configure the network as static by # setup command and restart the network and NetworkManager.
(f) Configure the yum server.
# vim /etc/yum.repos.d/linux.repo
[linux]
name=Linux yum server
baseurl=ftp://172.25.9.11/pub/rhel6 (Specify the FTP server IP address)
gpgcheck=0
enabled=1 (save and exit the file)
# yum clean all
# yum repolist
(g) Configure the DHCP server.
# yum install dhcp* -y
# cp -rvpf /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf
# vim /etc/dhcp/dhcpd.conf
Go to line number 47 and edit the line as below.
subnet 172.25.9.0 netmask 255.255.255.0 {
range 172.25.9.50 172.25.9.200;
* comment on next two lines
option routers 172.25.9.11;
option broadcast-address 172.25.9.255;
default-lease-time 600;
max-lease-time 7200;
allow booting;
allow bootp;
next-server 172.25.9.11;
filename “Pxelinux.0”;
authoritative; (save and exit this file)
# service dhcpd restart
# chkconfig dhcpd on
# iptables -A INPUT -m state –state NEW -m tcp -p tcp –deport 67 -j ACCEPT
# iptables -A OUTPUT -m state –state NEW -m tcp -p tcp –deport 68 -j ACCEPT
# iptables -A INPUT -m state –state NEW -m tcp -p tcp –deport 67 -j ACCEPT
# iptables -A OUTPUT -m state –state NEW -m tcp -p tcp –deport 68 -j ACCEPT
(h) Configure the TFTP server.
# yum install tftp* syslinux* -y
# vim /etc/xinetd.d/tft
* Go to disable=yes line and make it as no (save and exit this file)
# cp -rvpf /media/RHEL6/isolinux/*.* /var/lib/tftpboot
# mkdir /var/lib/tftpboot/pxelinux.cfg
# cp /var/lib/tftpboot/isolinux.cfg /var/lib/ftfpboot/pxelinux.cfg/default
# cp -rvpf /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot
# service xinetd restart
# chkconfig xinetd on
# iptables -A INPUT -m state –state NEW -m tcp -p tcp –deport 69 -j ACCEPT
# iptables -A OUTPUT -m state –state NEW -m tcp -p tcp –deport 69 -j ACCEPT
(i) Create the kickstart file
# yum install system-config-kickstart -y
# system-config-kickstart (create a kickstart file and save it in /var/ftp/pub directory)
# ksvalidator /var/ftp/pub/ks.cfg
(j) Specify the kickstart file location in pxelinux.cfg file.
# vim /var/lib/tftpboot/pxelinux.cfg/default
* Go to line 19 and edit the lines as below.
menu label ^ PXE SERVER
menu default
kernel vmlinuz
append initrd=initrd.img linux ks=ftp://172.25.9.11/pub/ks.cfg (save and exit this file)
(k) Restart all the services once again.
# service network restart
# chkconfig network on
# service vsftpd restart
# chkconfig vsftpd on
# service dhcpd restart
# chkconfig dhcpd on
# service xinetd restart
# chkconfig xinetd on

 

Read Also:Top 25 Cyber Security Titles For Those Uses A Computer Should Know

, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply