Red Hat Training

A Red Hat training course is available for RHEL 8

Chapter 5. Preparing an installation source

The Boot ISO image file does not include any repositories or software packages; it contains only the installation program and the tools required to boot the system and start the installation. This section contains information about creating an installation source for the Boot ISO image using the DVD ISO image that contains the required repositories and software packages.

Important

An installation source is required for the Boot ISO image file only if you decide not to register and install RHEL from the Content Delivery Network (CDN).

5.1. Types of installation source

You can use one of the following installation sources for minimal boot images:

  • DVD: Burn the DVD ISO image to a DVD. The DVD will be automatically used as the installation source (software package source).
  • Hard drive or USB drive: Copy the DVD ISO image to the drive and configure the installation program to install the software packages from the drive. If you use a USB drive, verify that it is connected to the system before the installation begins. The installation program cannot detect media after the installation begins.

    • Hard drive limitation: The DVD ISO image on the hard drive must be on a partition with a file system that the installation program can mount. The supported file systems are xfs, ext2, ext3, ext4, and vfat (FAT32).
    Warning

    On Microsoft Windows systems, the default file system used when formatting hard drives is NTFS. The exFAT file system is also available. However, neither of these file systems can be mounted during the installation. If you are creating a hard drive or a USB drive as an installation source on Microsoft Windows, verify that you formatted the drive as FAT32. Note that the FAT32 file system cannot store files larger than 4 GiB.

    In Red Hat Enterprise Linux 8, you can enable installation from a directory on a local hard drive. To do so, you need to copy the contents of the DVD ISO image to a directory on a hard drive and then specify the directory as the installation source instead of the ISO image. For example: inst.repo=hd:<device>:<path to the directory>

  • Network location: Copy the DVD ISO image or the installation tree (extracted contents of the DVD ISO image) to a network location and perform the installation over the network using the following protocols:

    • NFS: The DVD ISO image is in a Network File System (NFS) share.
    • HTTPS, HTTP or FTP: The installation tree is on a network location that is accessible over HTTP, HTTPS or FTP.

5.2. Specify the installation source

You can specify the installation source using any of the following methods:

  • Graphical installation: Select the installation source in the Installation Source window of the graphical installation. See Configuring installation source for more information.
  • Boot option: Configure a custom boot option to specify the installation source. See Boot options reference for more information.
  • Kickstart file: Use the install command in a Kickstart file to specify the installation source. See the Performing an advanced RHEL installation document for more information.

5.3. 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.

Table 5.1. Ports for network-based installation

Protocol usedPorts to open

HTTP

80

HTTPS

443

FTP

21

NFS

2049, 111, 20048

TFTP

69

Additional resources

5.4. Creating an installation source on an NFS server

Follow the steps in this procedure to place the installation source on an NFS server. Use this installation method to install multiple systems from a single source, without having to connect to physical media.

Prerequisites

  • You have administor level access to a server with Red Hat Enterprise Linux8, and this server is on the same network as the system to be installed.
  • You have downloaded a DVD ISO image. See Downloading the installation ISO image for more information.
  • You have created a bootable CD, DVD, or USB device from the image file. See Creating a bootable DVD or CD for more information.
  • You have verified that your firewall allows the system you are installing to access the remote installation source. See Ports for network-based installation for more information.

Procedure

  1. Install the nfs-utils package:

    # yum install nfs-utils
  2. Copy the DVD ISO image to a directory on the NFS server.
  3. Open the /etc/exports file using a text editor and add a line with the following syntax:

    /exported_directory/ clients
  4. Replace /exported_directory/ with the full path to the directory with the ISO image. Replace clients with the host name or IP address of the target system, the subnetwork that all target systems can use to access the ISO image, or the asterisk sign (*) if you want to allow any system 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 /rhel8-install/ directory available as read-only to all clients is:

    /rhel8-install *
  5. Save the /etc/exports file and exit the text editor.
  6. Start the nfs service:

    # systemctl start nfs-server.service

    If the service was running before you changed the /etc/exports file, run the following command for the running NFS server to reload its configuration:

    # systemctl reload nfs-server.service

    The ISO image is now accessible over NFS and ready to be used as an installation source.

Note

When configuring the installation source, use nfs: as the protocol, the server host name or IP address, the colon sign (:), and the directory holding the ISO image. For example, if the server host name is myserver.example.com and you have saved the ISO image in /rhel8-install/, specify nfs:myserver.example.com:/rhel8-install/ as the installation source.

5.5. Creating an installation source using HTTP or HTTPS

Follow the steps in this procedure to create an installation source for a network-based installation using an installation tree, which is a directory containing extracted contents of the DVD ISO image and a valid .treeinfo file. The installation source is accessed over HTTP or HTTPS.

Prerequisites

  • You have administrator level access to a server with Red Hat Enterprise Linux8, and this server is on the same network as the system to be installed.
  • You have downloaded a DVD ISO image. See Downloading the installation ISO image for more information.
  • You have created a bootable CD, DVD, or USB device from the image file. See Creating a bootable DVD or CD for more information.
  • You have verified that your firewall allows the system you are installing to access the remote installation source. See Ports for network-based installation for more information.

Procedure

  1. Install the httpd package:

    # yum install httpd
    Warning

    If your Apache web server configuration enables SSL security, verify 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/1232413 for details.

    Important

    If you use an HTTPS server with a self-signed certificate, you must boot the installation program with the noverifyssl option.

  2. Copy the DVD ISO image to the HTTP(S) server.
  3. Mount the DVD ISO image, using the mount command, to a suitable directory:

    # mkdir /mnt/rhel8-install/
    # mount -o loop,ro -t iso9660 /image_directory/image.iso /mnt/rhel8-install/

    Replace /image_directory/image.iso with the path to the DVD ISO image.

  4. Copy the files from the mounted image to the HTTP(S) server root. This command creates the /var/www/html/rhel8-install/ directory with the contents of the image.

    # cp -r /mnt/rhel8-install/ /var/www/html/

    This command creates the /var/www/html/rhel8-install/ directory with the content of the image. Note that some copying methods can skip the .treeinfo file which is required for a valid installation source. Running the cp command for whole directories as shown in this procedure will copy .treeinfo correctly.

  5. Start the httpd service:

    # systemctl start httpd.service

    The installation tree is now accessible and ready to be used as the installation source.

    Note

    When configuring the installation source, use http:// or https:// as the protocol, the server host name or IP address, and the directory that contains the files from the ISO image, relative to the HTTP server root. For example, if you are using HTTP, the server host name is myserver.example.com, and you have copied the files from the image to /var/www/html/rhel8-install/, specify http://myserver.example.com/rhel8-install/ as the installation source.

5.6. Creating an installation source using FTP

Follow the steps in this procedure to create an installation source for a network-based installation using an installation tree, which is a directory containing extracted contents of the DVD ISO image and a valid .treeinfo file. The installation source is accessed over FTP.

Prerequisites

  • You have administor level access to a server with Red Hat Enterprise Linux8, and this server is on the same network as the system to be installed.
  • You have downloaded a DVD ISO image. See Downloading the installation ISO image for more information.
  • You have created a bootable CD, DVD, or USB device from the image file. See Creating a bootable DVD or CD for more information.
  • You have verified that your firewall allows the system you are installing to access the remote installation source. See Ports for network-based installation for more information.

Procedure

  1. Install the vsftpd package by running the following command as root:

    # yum install vsftpd
  2. Open and edit the /etc/vsftpd/vsftpd.conf configuration file in a text editor.

    1. Change the line anonymous_enable=NO to anonymous_enable=YES
    2. Change the line write_enable=YES to write_enable=NO.
    3. Add lines pasv_min_port=min_port and pasv_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 and 10031.

      This step can be necessary in network environments featuring various firewall/NAT setups.

    4. 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.

      Warning

      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.

  3. Configure the server firewall.

    1. Enable the firewall:

      # systemctl enable firewalld
      # systemctl start firewalld
    2. 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.

  4. Copy the DVD ISO image to the FTP server.
  5. Mount the DVD ISO image, using the mount command, to a suitable directory:

    # mkdir /mnt/rhel8-install
    # mount -o loop,ro -t iso9660 /image-directory/image.iso /mnt/rhel8-install

    Replace /image-directory/image.iso with the path to the DVD ISO image.

  6. Copy the files from the mounted image to the FTP server root:

    # mkdir /var/ftp/rhel8-install
    # cp -r /mnt/rhel8-install/ /var/ftp/

    This command creates the /var/ftp/rhel8-install/ directory with the content of the image. Note that some copying methods can skip the .treeinfo file which is required for a valid installation source. Running the cp command for whole directories as shown in this procedure will copy .treeinfo correctly.

  7. Make sure that the correct SELinux context and access mode is set on the copied content:

    # restorecon -r /var/ftp/rhel8-install
    # find /var/ftp/rhel8-install -type f -exec chmod 444 {} \;
    # find /var/ftp/rhel8-install -type d -exec chmod 755 {} \;
  8. 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

    Enable the vsftpd service to start during the boot process:

    # systemctl enable vsftpd

    The installation tree is now accessible and ready to be used as the installation source.

    Note

    When configuring the installation source, use ftp:// as the protocol, the server host name or IP address, and the directory in which you have stored the files from the ISO image, relative to the FTP server root. For example, if the server host name is myserver.example.com and you have copied the files from the image to /var/ftp/rhel8-install/, specify ftp://myserver.example.com/rhel8-install/ as the installation source.

5.7. Preparing a hard drive as an installation source

This module describes how to install RHEL using a hard drive as an installation source with ext2, ext3, ext4, or XFS file systems. You can use this method for the systems without network access and the optical drive. Hard drive installations use an ISO image of the installation DVD. An ISO image is a file that contains an exact copy of the content of a DVD. With this file present on a hard drive, you can choose Hard drive as the installation source when you boot the installation program.

  • To check the file system of a hard drive partition on a Windows operating system, use the Disk Management tool.
  • To check the file system of a hard drive partition on a Linux operating system, use the parted tool.
Note

You cannot use ISO files on LVM (Logical Volume Management) partitions.

Procedure

  1. Download an ISO image of the Red Hat Enterprise Linux installation DVD. Alternatively, if you have the DVD on physical media, you can create an image of an ISO with the following command on a Linux system:

    dd if=/dev/dvd of=/path_to_image/name_of_image.iso

    where dvd is your DVD drive device name, name_of_image is the name you give to the resulting ISO image file, and path_to_image is the path to the location on your system where you want to store the image.

  2. Copy and paste the ISO image onto the system hard drive or a USB drive.
  3. Use a SHA256 checksum program to verify that the ISO image that you copied is intact. Many SHA256 checksum programs are available for various operating systems. On a Linux system, run:

    $ sha256sum /path_to_image/name_of_image.iso

    where name_of_image is the name of the ISO image file. The SHA256 checksum program displays a string of 64 characters called a hash. Compare this hash to the hash displayed for this particular image on the Downloads page in the Red Hat Customer Portal. The two hashes should be identical.

  4. Specify the HDD installation source on the kernel command line before starting the installation:

    inst.repo=hd:<device>:/path_to_image/name_of_image.iso

Additional resources