Show Table of Contents
4.2. Automatic Installation
This section describes a simple procedure on how to add a Kickstart file to the installation USB drive, which automatically installs and registers Red Hat Enterprise Linux. You can use this procedure to deploy Red Hat Enterprise Linux on multiple machines.
Generating the USB Boot Media
- Record an installation in a Kickstart file:
- Manually install Red Hat Enterprise Linux once. For details see Section 4.1, “Interactive Installation”.
- Boot the installed system. During the installation, Anaconda created a Kickstart file with the settings in the
/root/anaconda-ks.cfgfile.
- Download the Red Hat Enterprise Linux installation DVD ISO file to the
/tmp/directory. - Mount the installation ISO file to the
/mnt/directory. For example:# mount -o loop /tmp/rhel-server-7.3-x86_64-dvd.iso /mnt/
- Create a working directory and copy the DVD content to it. For example:
# mkdir /root/rhel-install/ # shopt -s dotglob # cp -avRf /mnt/* /root/rhel-install/
- Unmount the ISO file:
# umount /mnt/
- Copy the Kickstart file generated during the installation to the working directory:
# cp /root/anaconda-ks.cfg /root/rhel-install/
- To register Red Hat Enterprise Linux after the installation automatically and attach a subscription, append the following to the
/root/rhel-install/anaconda-ks.cfgfile:%post subscription-manager register --auto-attach --username=user_name --password=password %end
- Display the installation DVD volume name:
# isoinfo -d -i rhel-server-7.3-x86_64-dvd.iso | grep "Volume id" | \ sed -e 's/Volume id: //' -e 's/ /\\x20/g'
RHEL-7.3\x20Server.x86_64 - Add a new menu entry to the boot
/root/rhel-install/isolinux/isolinux.cfgfile that uses the Kickstart file. For example:####################################### label kickstart menu label ^Kickstart Installation of RHEL7.3 kernel vmlinuz append initrd=initrd.img inst.stage2=hd:LABEL=RHEL-7.3\x20Server.x86_64 inst.ks=cdrom:/anaconda-ks.cfg #######################################
Note
Set theinst.stage2=hd:LABEL=option to the DVD volume name retrieved in the previous step. - Create the
/root/rhel-ks.isofile from the working directory:# mkisofs -J -T -o /root/rhel-ks.iso -b isolinux/isolinux.bin \ -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \ -R -m TRANS.TBL -graft-points -V "RHEL-7.3 Server.x86_64" \ /root/rhel-install/
Note
Set the-Voption to the DVD volume name retrieved in an earlier step and replace\x20in the string with a space. - Create an installation USB drive. For details, see Section 3.2.1, “Making Installation USB Media on Linux”.
Install Red Hat Enterprise Linux Using the Kickstart File
- Boot the installation USB drive. See Chapter 7, Booting the Installation on 64-bit AMD, Intel, and ARM systems.
- Select the entry, that contains the Kickstart configuration, you created in the section called “Generating the USB Boot Media”.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.