32.9. Making the Kickstart File Available

A kickstart file must be placed in one of the following locations:
  • On removable media, such as a floppy disk, optical disk, or USB flash drive
  • On a hard drive
  • On a network
Normally a kickstart file is copied to the removable media or hard drive, or made available on the network. The network-based approach is most commonly used, as most kickstart installations tend to be performed on networked computers.
The following section provides a more in-depth look at where the kickstart file may be placed.

32.9.1. Creating Kickstart Boot Media

If you want to modify boot media provided by Red Hat to include a Kickstart file and automatically load it during boot, follow the procedure below. Note that this procedure will only work on AMD and Intel systems (x86 and x86_64). Additionally, this procedure requires the genisoimage and isomd5sum packages; these packages are available on Red Hat Enterprise Linux, but if you use a different system, you may need to adjust the commands used.

Note

Diskette-based booting is no longer supported in Red Hat Enterprise Linux. Installations must use CD-ROM or flash memory products for booting. However, the kickstart file may still reside on a diskette's top-level directory, and must be named ks.cfg. Separate boot media will be required.

Procedure 32.1. Including a Kickstart File on Boot Media

Before you start the procedure, make sure you have downloaded a boot ISO image (boot.iso or binary DVD) as described in Chapter 1, Obtaining Red Hat Enterprise Linux, and that you have created a working Kickstart file.
  1. Mount the ISO image you have downloaded:
    # mount /path/to/image.iso /mnt/iso
  2. Extract the ISO image into a working directory somewhere in your system:
    # cp -pRf /mnt/iso /tmp/workdir
  3. Unmount the mounted image:
    # umount /mnt/iso
  4. The contents of the image is now placed in the iso/ directory in your working directory. Add your Kickstart file (ks.cfg) into the iso/ directory:
    # cp /path/to/ks.cfg /tmp/workdir/iso
  5. Open the isolinux/isolinux.cfg configuration file inside the iso/ directory. This file determines all the menu options which appear in the boot menu. A single menu entry is defined as the following:
    label linux
      menu label ^Install or upgrade an existing system
      menu default
      kernel vmlinuz
      append initrd=initrd.img
    
    Add the ks= boot option to the line beginning with append. The exact syntax depends on how you plan to boot the ISO image; for example, if you plan on booting from a CD or DVD, use ks=cdrom:/ks.cfg. A list of possible sources and the syntax used to configure them is available in Section 28.4, “Automating the Installation with Kickstart”.
  6. Use genisoimage in the iso/ directory to create a new bootable ISO image with your changes included:
    # genisoimage -U -r -v -T -J -joliet-long -V "RHEL-6.9" -volset "RHEL-6.9" -A "RHEL-6.9" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o ../NEWISO.iso .
    This comand will create a file named NEWISO.iso in your working directory (one directory above the iso/ directory).

    Important

    If you use a disk label to refer to any device in your isolinux.cfg (e.g. ks=hd:LABEL=RHEL-6.9/ks.cfg, make sure that the label matches the label of the new ISO you are creating. Also note that in boot loader configuration, spaces in labels must be replaced with \x20.
  7. Implant a md5 checksum into the new ISO image:
    # implantisomd5 ../NEWISO.iso
After you finish the above procedure, your new image is ready to be turned into boot media. Refer to Chapter 2, Making Media for instructions.
To perform a pen-based flash memory kickstart installation, the kickstart file must be named ks.cfg and must be located in the flash memory's top-level directory. The kickstart file should be on a separate flash memory drive to the boot media.
To start the Kickstart installation, boot the system using the boot media you created, and use the ks= boot option to specify which device contains the USB drive. See Section 28.4, “Automating the Installation with Kickstart” for details about the ks= boot option.
See Section 2.2, “Making Minimal Boot Media” for instructions on creating boot USB media using the rhel-variant-version-architecture-boot.iso image file that you can download from the Software & Download Center of the Red Hat customer portal.

Note

Creation of USB flashdrives for booting is possible, but is heavily dependent on system hardware BIOS settings. Refer to your hardware manufacturer to see if your system supports booting to alternate devices.