Making Kickstart files available to the installation program
The following provides information about making the Kickstart file available to the installation program on the target system.
Ports for network-based installation
The following table lists the ports that must be open on the server providing the files for each type of network-based installation.
Protocol used | Ports to open |
---|---|
HTTP |
80 |
HTTPS |
443 |
FTP |
21 |
NFS |
2049, 111, 20048 |
TFTP |
69 |
-
See the Securing networks in RHEL 8 document for more information.
Making a Kickstart file available on an NFS server
This procedure describes how to store the Kickstart script file on an NFS server. This method enables you to install multiple systems from a single source without having to use physical media for the Kickstart file.
-
You must have administrator level access to a server with CentOS 8 on the local network.
-
The system to be installed must be able to connect to the server.
-
Firewall on the server must allow connections from the system you are installing to. See Ports for network-based installation for more information.
-
Install the
nfs-utils
package by running the following command as root:# yum install nfs-utils
-
Copy the Kickstart file to a directory on the NFS server.
-
Open the
/etc/exports
file using a text editor and add a line with the following syntax:/exported_directory/ clients
-
Replace /exported_directory/ with the full path to the directory holding the Kickstart file. Instead of clients, use the host name or IP address of the computer that is to be installed from this NFS server, the subnetwork from which all computers are to have access the ISO image, or the asterisk sign (
*
) if you want to allow any computer with network access to the NFS server to use the ISO image. See the exports(5) man page for detailed information about the format of this field.A basic configuration that makes the
/centos8-install/
directory available as read-only to all clients is:/centos-install *
-
Save the
/etc/exports
file and exit the text editor. -
Start the nfs service:
# systemctl start nfs-server.service
If the service was running before you changed the
/etc/exports
file, enter the following command, in order for the running NFS server to reload its configuration:# systemctl reload nfs-server.service
The Kickstart file is now accessible over NFS and ready to be used for installation.
When specifying the Kickstart source, use nfs: as the protocol, the server’s host name or IP address, the colon sign (: ), and the path inside directory holding the file. For example, if the server’s host name is myserver.example.com and you have saved the file in /centos8-install/my-ks.cfg , specify inst.ks=nfs:myserver.example.com:/centos8-install/my-ks.cfg as the installation source boot option.
|
-
For details on setting up TFTP server for PXE boot from network, see Preparing to install from the network using PXE.
Making a Kickstart file available on an HTTP or HTTPS server
This procedure describes how to store the Kickstart script file on an HTTP or HTTPS server. This method enables you to install multiple systems from a single source without having to use physical media for the Kickstart file.
-
You must have administrator level access to a server with CentOS 8 on the local network.
-
The system to be installed must be able to connect to the server.
-
Firewall on the server must allow connections from the system you are installing to. See Ports for network-based installation for more information.
-
Install the
httpd
package by running the following command as root:# yum install httpd
If your Apache web server configuration enables SSL security, verify that you only enable the TLSv1 protocol, and disable SSLv2 and SSLv3. This is due to the POODLE SSL vulnerability (CVE-2014-3566). See https://access.redhat.com/solutions/1232413 for details. If you use an HTTPS server with a self-signed certificate, you must boot the installation program with the inst.noverifyssl
option. -
Copy the Kickstart file to the HTTP(S) server into a subdirectory of the
/var/www/html/
directory. -
Start the httpd service:
# systemctl start httpd.service
The Kickstart file is now accessible and ready to be used for installation.
When specifying the location of the Kickstart file, use http://
orhttps://
as the protocol, the server’s host name or IP address, and the path of the Kickstart file, relative to the HTTP server root. For example, if you are using HTTP, the server’s host name ismyserver.example.com
, and you have copied the Kickstart file as/var/www/html/centos8-install/my-ks.cfg
, specifyhttp://myserver.example.com/centos8-install/my-ks.cfg
as the file location.
-
For more information about HTTP and FTP servers, see Deploying different types of servers in RHEL 8.
Making a Kickstart file available on an FTP server
This procedure describes how to store the Kickstart script file on an FTP server. This method enables you to install multiple systems from a single source without having to use physical media for the Kickstart file.
-
You must have administrator level access to a server with CentOS 8 on the local network.
-
The system to be installed must be able to connect to the server.
-
Firewall on the server must allow connections from the system you are installing to. See Ports for network-based installation for more information.
-
Install the
vsftpd
package by running the following command as root:# yum install vsftpd
-
Open and edit the
/etc/vsftpd/vsftpd.conf
configuration file in a text editor.-
Change the line
anonymous_enable=NO
toanonymous_enable=YES
-
Change the line
write_enable=YES
towrite_enable=NO
. -
Add lines
pasv_min_port=min_port
andpasv_max_port=max_port
. Replace min_port and max_port with the port number range used by FTP server in passive mode, e. g.10021
and10031
.This step can be necessary in network environments featuring various firewall/NAT setups.
-
Optionally, add custom changes to your configuration. For available options, see the vsftpd.conf(5) man page. This procedure assumes that default options are used.
If you configured SSL/TLS security in your
vsftpd.conf
file, ensure that you enable only the TLSv1 protocol, and disable SSLv2 and SSLv3. This is due to the POODLE SSL vulnerability (CVE-2014-3566). See https://access.redhat.com/solutions/1234773 for details.
-
-
Configure the server firewall.
-
Enable the firewall:
# systemctl enable firewalld # systemctl start firewalld
-
Enable in your firewall the FTP port and port range from previous step:
# firewall-cmd --add-port min_port-max_port/tcp --permanent # firewall-cmd --add-service ftp --permanent # firewall-cmd --reload
Replace min_port-max_port with the port numbers you entered into the
/etc/vsftpd/vsftpd.conf
configuration file.
-
-
Copy the Kickstart file to the FTP server into the
/var/ftp/
directory or its subdirectory. -
Make sure that the correct SELinux context and access mode is set on the file:
# restorecon -r /var/ftp/your-kickstart-file.ks # chmod 444 /var/ftp/your-kickstart-file.ks
-
Start the
vsftpd
service:# systemctl start vsftpd.service
If the service was running before you changed the
/etc/vsftpd/vsftpd.conf
file, restart the service to load the edited file:# systemctl restart vsftpd.service
The Kickstart file is now accessible and ready to be used for installations by systems on the same network.
When configuring the installation source, use
ftp://
as the protocol, the server’s host name or IP address, and the path of the Kickstart file, relative to the FTP server root. For example, if the server’s host name ismyserver.example.com
and you have copied the file to/var/ftp/my-ks.cfg
, specifyftp://myserver.example.com/my-ks.cfg
as the installation source.
Making a Kickstart file available on a local volume
This procedure describes how to store the Kickstart script file on a volume on the system to be installed. This method enables you to bypass the need for another system.
-
You must have a drive that can be moved to the machine to be installed, such as a USB stick.
-
The drive must contain a partition that can be read by the installation program. The supported types are
ext2
,ext3
,ext4
,xfs
, andfat
. -
The drive must be already connected to the system and its volumes mounted.
-
List volume information and note the UUID of the volume to which you want to copy the Kickstart file.
# lsblk -l -p -o name,rm,ro,hotplug,size,type,mountpoint,uuid
-
Navigate to the file system on the volume.
-
Copy the Kickstart file to this file system.
-
Make a note of the string to use later with the
inst.ks=
option. This string is in the formhd:UUID=volume-UUID:path/to/kickstart-file.cfg
. Note that the path is relative to the file system root, not to the/
root of file system hierarchy. Replace volume-UUID with the UUID you noted earlier. -
Unmount all drive volumes:
# umount /dev/xyz ...
Add all the volumes to the command, separated by spaces.
Making a Kickstart file available on a local volume for automatic loading
A specially named Kickstart file can be present in the root of a specially named volume on the system to be installed. This lets you bypass the need for another system, and makes the installation program load the file automatically.
-
You must have a drive that can be moved to the machine to be installed, such as a USB stick.
-
The drive must contain a partition that can be read by the installation program. The supported types are
ext2
,ext3
,ext4
,xfs
, andfat
. -
The drive must be already connected to the system and its volumes mounted.
-
List volume information and note the UUID of the volume to which you want to copy the Kickstart file.
# lsblk -l -p
-
Navigate to the file system on the volume.
-
Copy the Kickstart file into the root of this file system.
-
Rename the Kickstart file to
ks.cfg
. -
Rename the volume as
OEMDRV
:-
For
ext2
,ext3
, andext4
file systems:# e2label /dev/xyz OEMDRV
-
For the XFS file system:
# xfs_admin -L OEMDRV /dev/xyz
Replace /dev/xyz with the path to the volume’s block device.
-
-
Unmount all drive volumes:
# umount /dev/xyz ...
Add all the volumes to the command, separated by spaces.