Kickstart Documentation *********************** Authors: Chris Lumens and other members of the *Anaconda installer team* Contents ^^^^^^^^ * Kickstart Documentation * Chapter 1. Introduction * What are Kickstart Installations? * How Do You Perform a Kickstart Installation? * Creating the Kickstart File * Special Notes for Referring to Disks * Chapter 2. Kickstart Commands in Fedora * auth or authconfig * authselect * autopart * autostep * bootloader * btrfs * cdrom * clearpart * graphical or text or cmdline * device * deviceprobe * dmraid * driverdisk * eula * fcoe * firewall * firstboot * group * reboot or poweroff or shutdown or halt * harddrive * hmc * ignoredisk * install * interactive * iscsi * iscsiname * keyboard * lang * langsupport * lilo * lilocheck * liveimg * logging * logvol * mediacheck * method * module * monitor * mount * mouse * multipath * network * nfs * nvdimm * ostreecontainer * ostreesetup * part or partition * raid * realm * repo * reqpart * rescue * rootpw * selinux * services * skipx * snapshot * sshkey * sshpw * timesource * timezone * updates * install or upgrade * url * user * vnc * volgroup * xconfig * zerombr * zfcp * zipl * %include * %ksappend * Chapter 3. Kickstart Commands in Red Hat Enterprise Linux * auth or authconfig * authselect * autopart * autostep * bootloader * btrfs * cdrom * clearpart * graphical or text or cmdline * device * deviceprobe * dmraid * driverdisk * eula * fcoe * firewall * firstboot * group * reboot or poweroff or shutdown or halt * harddrive * hmc * ignoredisk * install * interactive * iscsi * iscsiname * key * keyboard * lang * langsupport * lilo * lilocheck * liveimg * logging * logvol * mediacheck * method * module * monitor * mount * mouse * multipath * network * nfs * nvdimm * ostreesetup * part or partition * raid * realm * repo * reqpart * rescue * rhsm * rootpw * selinux * services * skipx * snapshot * sshkey * sshpw * syspurpose * timesource * timezone * unsupported_hardware * updates * install or upgrade * url * user * vnc * volgroup * xconfig * zerombr * zfcp * zipl * %include * %ksappend * Chapter 4. Pre-installation script * Example * Chapter 5. Pre-install Script * Chapter 6. Post-installation Script * Examples * Chapter 7. Handling Errors * Chapter 8. Handling Tracebacks * Chapter 9. Package Selection * Group-level options * Chapter 10. Making the Kickstart File Available * Creating a Kickstart Boot Diskette * Creating a Kickstart Boot CD-ROM * Making the Kickstart File Available on the Network * Chapter 11. Making the Installation Tree Available * Chapter 12. Starting a Kickstart Installation * Boot Diskette * CD-ROM #1 and Diskette * With Driver Disk * Boot CD-ROM * Other kickstart options * Example Kickstart Script * More Kickstart usage examples Chapter 1. Introduction ======================= What are Kickstart Installations? --------------------------------- Many system administrators would prefer to use an automated installation method to install Fedora or Red Hat Enterprise Linux on their machines. To answer this need, Red Hat created the kickstart installation method. Using kickstart, a system administrator can create a single file containing the answers to all the questions that would normally be asked during a typical installation. Kickstart files can be kept on a server system and read by individual computers during the installation. This installation method can support the use of a single kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and system administrators. The Fedora installation guide at http://docs.fedoraproject.org/en- US/index.html has a detailed section on kickstart. How Do You Perform a Kickstart Installation? -------------------------------------------- Kickstart installations can be performed using a local CD-ROM, a local hard drive, or via NFS, FTP, or HTTP. To use kickstart, you must: 1. Create a kickstart file. 2. Create a boot diskette with the kickstart file or make the kickstart file available on the network. 3. Make the installation tree available. 4. Start the kickstart installation. This chapter explains these steps in detail. Creating the Kickstart File --------------------------- The kickstart file is a simple text file, containing a list of items, each identified by a keyword. You can create it by using the Kickstart Configurator application or by writing it from scratch. The Fedora or Red Hat Enterprise Linux installation program also creates a sample kickstart file based on the options that you selected during installation. It is written to the file /root/anaconda-ks.cfg. You should be able to edit it with any text editor or word processor that can save files as ASCII text. First, be aware of the following issues when you are creating your kickstart file: * While not strictly required, there is a natural order for sections that should be followed. Items within the sections do not have to be in a specific order unless otherwise noted. The section order is: 1. Command section – Refer to Chapter 2 for a list of kickstart options. You must include the required options. 2. The %packages section – Refer to Chapter 3 for details. 3. The %pre, %pre-install, %post, %onerror, and %traceback sections – These sections can be in any order and are not required. Refer to Chapter 4, Chapter 5, and Chapter 6 for details. * The %packages, %pre, %pre-install, %post, %onerror, and %traceback sections are all required to be closed with %end * Items that are not required can be omitted. * Omitting any required item will result in the installation program prompting the user for an answer to the related item, just as the user would be prompted during a typical installation. Once the answer is given, the installation will continue unattended unless it finds another missing item. * One installation source command from the list of commands in the "method" proxy command must be specified for the fully automated kickstart installation. This is required even for Fedora – the closest mirror can’t be chosen by the kickstart file. * Lines starting with a pound sign (#) are treated as comments and are ignored. * If deprecated commands, options, or syntax are used during a kickstart installation, a warning message will be logged to the anaconda log. Since deprecated items are usually removed within a release or two, it makes sense to check the installation log to make sure you haven’t used any of them. When using ksvalidator, deprecated items will cause an error. Special Notes for Referring to Disks ------------------------------------ Traditionally, disks have been referred to throughout Kickstart by a device node name (such as "sda"). The Linux kernel has moved to a more dynamic method where device names are not guaranteed to be consistent across reboots, so this can complicate usage in Kickstart scripts. To accommodate stable device naming, you can use any item from "/dev/disk" in place of a device node name. For example, instead of: "part / --fstype=ext4 --onpart=sda1" You could use an entry similar to one of the following: part / --fstype=ext4 --onpart=/dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:0-part1 part / --fstype=ext4 --onpart=/dev/disk/by-id/ata-ST3160815AS_6RA0C882-part1 This provides a consistent way to refer to disks that is more meaningful than just "sda". This is especially useful in large storage environments. You can also use shell-like entries to refer to disks. This is primarily intended to make it easier to use the "clearpart" and "ignoredisk" commands in large storage environments. For example, instead of: "ignoredisk --drives=sdaa,sdab,sdac" You could use an entry similar to the following: "ignoredisk --drives=/dev/disk/by-path/pci-0000:00:05.0-scsi-*" However, the installation will fail if the "*" pattern does not match a device. For "clearpart" and "ignoredisk" commands specifically you can also use "|" to solve this issue. For example to match "vda" and/or "hda" you can use "vda|hda" which would match "vda" or "hda" or both. But if neither "vda" or "hda" are available the installation will fail. If you want to match any "vd" or "hd" disks you could combine "*" and "|" to match any drive of either: "vd*|hd*". Finally, anywhere you want to refer to an existing partition or filesystem (say, in the "part --ondisk=") option, you may also refer to the device by its filesystem label or UUID. This is done as follows: part /data --ondisk=LABEL=data part /misc --ondisk=UUID=819ff6de-0bd6-4bf4-8b72-dbe41033a85b Chapter 2. Kickstart Commands in Fedora ======================================= The following commands can be placed in a kickstart file. If you prefer to use a graphical interface for creating your kickstart file, you can use the Kickstart Configurator application. Most commands take arguments. If an argument is followed equals mark ("="), a value must be specified after it. In the example commands, options in ‘’’[square brackets]’’’ are optional arguments for the command. pykickstart processes arguments to commands just like the shell does: If a list of arguments can be passed in, the arguments must be separated by commas and not include any extra spaces. If extra spaces are required in the list of arguments, the entire argument must be surrounded by double quotes. If quotes, spaces, or other special characters need to be added to the arguments list, they must be escaped. auth or authconfig ------------------ auth|authconfig [options] New in version Fedora3. This required command sets up the authentication options for the system. This is just a wrapper around the authconfig program, so all options recognized by that program are valid for this command. See the manual page for authconfig for a complete list. By default, passwords are normally encrypted and are not shadowed. Changed in version Fedora28. The authconfig program is deprecated. This command will use the authconfig compatibility tool, but you should use the authselect command instead. Removed in version Fedora35. positional arguments: "[options]" See "man authconfig". New in version Fedora3. authselect ---------- authselect [options] New in version Fedora28. This command sets up the authentication options for the system. This is just a wrapper around the authselect program, so all options recognized by that program are valid for this command. See the manual page for authselect for a complete list. positional arguments: "[options]" See "man authselect". New in version Fedora28. autopart -------- autopart [--encrypted] [--passphrase PASSPHRASE] [--escrowcert ] [--backuppassphrase] [--nolvm] [--type TYPE] [--cipher CIPHER] [--fstype FSTYPE] [--nohome] [--noboot] [--noswap] [--luks-version LUKS_VERSION] [--pbkdf PBKDF] [--pbkdf-memory PBKDF_MEMORY] [--pbkdf-time PBKDF_TIME] [--pbkdf-iterations PBKDF_ITERATIONS] [--hibernation] New in version Fedora3. Automatically create partitions – a root ("/") partition, a swap partition, and an appropriate boot partition for the architecture. On large enough drives, this will also create a /home partition. Note: "autopart" cannot be used with the following commands: partition, raid, volgroup, logvol, reqpart options: "--encrypted" Should all devices with support be encrypted by default? This is equivalent to checking the “Encrypt” checkbox on the initial partitioning screen. New in version Fedora9. "--passphrase PASSPHRASE" Only relevant if "--encrypted" is specified. Provide a default system-wide passphrase for all encrypted devices. New in version Fedora9. "--escrowcert " Only relevant if "--encrypted" is specified. Load an X.509 certificate from "". Store the data encryption keys of all encrypted volumes created during installation, encrypted using the certificate, as files in "/root". New in version Fedora12. "--backuppassphrase" Only relevant if "--escrowcert" is specified. In addition to storing the data encryption keys, generate a random passphrase and add it to all encrypted volumes created during installation. Then store the passphrase, encrypted using the certificate specified by "--escrowcert", as files in "/root" (one file for each encrypted volume). New in version Fedora12. "--nolvm" Don’t use LVM when partitioning. New in version Fedora16. Changed in version Fedora17. The same as "--type=plain" "--type TYPE" Select automatic partitioning scheme. Must be one of the following: [‘lvm’, ‘btrfs’, ‘plain’, ‘partition’, ‘thinp’]. Plain means regular partitions with no btrfs or lvm. New in version Fedora17. Changed in version Fedora20. Partitioning scheme ‘thinp’ was added. "--cipher CIPHER" Only relevant if "--encrypted" is specified. Specifies which encryption algorithm should be used to encrypt the filesystem. New in version Fedora18. "--fstype FSTYPE" Use the specified filesystem type on the partitions. Note that it cannot be used with "--type=btrfs" since btrfs is both a partition scheme and a filesystem. eg. "--fstype=ext4". New in version Fedora21. "--nohome" Do not create a /home partition. New in version Fedora26. "--noboot" Do not create a /boot partition. New in version Fedora26. "--noswap" Do not create a swap partition. Only one of "--noswap" and "-- hibernation" can be specified. New in version Fedora26. "--luks-version LUKS_VERSION" Only relevant if "--encrypted" is specified. Specifies which version of LUKS format should be used to encrypt the filesystem. New in version Fedora29. "--pbkdf PBKDF" Only relevant if "--encrypted" is specified. Sets Password-Based Key Derivation Function (PBKDF) algorithm for LUKS keyslot. See "man cryptsetup". New in version Fedora29. "--pbkdf-memory PBKDF_MEMORY" Only relevant if "--encrypted" is specified. Sets the memory cost for PBKDF. See "man cryptsetup". New in version Fedora29. "--pbkdf-time PBKDF_TIME" Only relevant if "--encrypted" is specified. Sets the number of milliseconds to spend with PBKDF passphrase processing. See "-- iter-time" in "man cryptsetup". Only one of "--pbkdf-time" and "--pbkdf-iterations" can be specified. New in version Fedora29. "--pbkdf-iterations PBKDF_ITERATIONS" Only relevant if "--encrypted" is specified. Sets the number of iterations directly and avoids PBKDF benchmark. See "--pbkdf-force- iterations" in "man cryptsetup". Only one of "--pbkdf-time" and "--pbkdf-iterations" can be specified. New in version Fedora29. "--hibernation" Create a swap partition with an automatically determined size that’s big enough for hibernation. Only one of "--noswap" and "-- hibernation" can be specified. New in version Fedora38. autostep -------- autostep [--autoscreenshot] New in version Fedora3. Kickstart installs normally skip unnecessary screens. This makes the installer step through every screen, displaying each briefly. This is mostly used for debugging. Deprecated since version Fedora34. options: "--autoscreenshot" Take a screenshot at every step during installation and copy the images over to "/root/anaconda-screenshots" after installation is complete. This is most useful for documentation. New in version Fedora3. bootloader ---------- bootloader [--append APPENDLINE] [--location {mbr,partition,none,boot}] [--password PASSWORD] [--driveorder DRIVEORDER] [--timeout TIMEOUT] [--default DEFAULT] [--iscrypted] [--md5pass MD5PASS] [--boot-drive BOOTDRIVE] [--leavebootorder] [--extlinux] [--disabled] [--nombr] [--sdboot] New in version Fedora3. This required command specifies how the boot loader should be installed. There must be a biosboot partition for the bootloader to be installed successfully onto a disk that contains a GPT/GUID partition table, which includes disks initialized by anaconda. This partition may be created with the kickstart command "part biosboot --fstype=biosboot --size=1". However, in the case that a disk has an existing biosboot partition, adding a "part biosboot" option is unnecessary. options: "--append APPENDLINE" Specifies additional kernel parameters. For example: "bootloader --location=mbr --append="hdd=ide-scsi ide=nodma"" **Note** The installer will add the bootloader arguments "rhgb quiet" if plymouth is installed on the target system. You can disable these options with "-plymouth" in the "%packages" section. New in version Fedora3. "--linear" use linear mode to access hard disks (for LILO only) New in version Fedora3. Removed in version Fedora4. "--nolinear" do not use linear mode to access hard disks (for LILO only) New in version Fedora3. Removed in version Fedora4. "--location {mbr,partition,none,boot}" Specifies where the boot record is written. Valid values are the following: mbr (the default), partition (installs the boot loader on the first sector of the partition containing the kernel), or none (do not install the boot loader). **Note** *bootloader –location=none* is different from *bootloader –location=none –disabled*. *–location=none* prevents extra installation steps that makes the target machine bootable, e.g. write to MBR on x86 BIOS systems. However, the corresponding RPM packages are still installed, and *–disabled* can be appended to prevent it. *bootloader –disabled* only does not prevent the installation of the bootloader and Anaconda will complain if no other options are provided. New in version Fedora3. "--password PASSWORD" If using GRUB, sets the GRUB boot loader password. This should be used to restrict access to the GRUB shell, where arbitrary kernel options can be passed. New in version Fedora3. "--useLilo" force the use of LILO New in version Fedora3. Removed in version Fedora4. "--driveorder DRIVEORDER" define the explicit hard disk order the boot loader should use New in version Fedora3. "--timeout TIMEOUT" Specify the number of seconds before the bootloader times out and boots the default option. New in version Fedora8. "--default DEFAULT" Sets the default boot image in the bootloader configuration. New in version Fedora8. "--lba32" force the use of LBA32 mode for hard disk access (LILO only) New in version Fedora3. Deprecated since version Fedora12. Removed in version Fedora14. "--iscrypted" If given, the password specified by "--password=" is already encrypted and should be passed to the bootloader configuration without additional modification. New in version Fedora15. "--md5pass MD5PASS" If using GRUB, similar to "--password=" except the password should already be encrypted. New in version Fedora3. Changed in version Fedora15. Alias for "--password=MD5PASS --iscrypted". "--boot-drive BOOTDRIVE" Specifies which drive the bootloader should be written to and thus, which drive the computer will boot from. New in version Fedora17. "--leavebootorder" On EFI or ISeries/PSeries machines, this option prevents the installer from making changes to the existing list of bootable images. New in version Fedora18. "--extlinux" Use the extlinux bootloader instead of GRUB. This option only works on machines that are supported by extlinux. New in version Fedora19. "--disabled" Do not install the boot loader. **Note** *bootloader –location=none* is different from *bootloader –location=none –disabled*. *–location=none* prevents extra installation steps that makes the target machine bootable, e.g. write to MBR on x86 BIOS systems. However, the corresponding RPM packages are still installed, and *–disabled* can be appended to prevent it. *bootloader –disabled* only does not prevent the installation of the bootloader and Anaconda will complain if no other options are provided. New in version Fedora21. "--nombr" do not install the boot loader to the MBR New in version Fedora21. "--upgrade" upgrade the boot loader installed on disk New in version Fedora3. Deprecated since version Fedora29. Removed in version Fedora34. "--sdboot" Use systemd-boot as the bootloader instead of grub2. This option only works on EFI machines. New in version Fedora39. btrfs ----- btrfs [--noformat] [--useexisting] [--label LABEL] [--data DATALEVEL] [--metadata METADATALEVEL] [--subvol] [--parent PARENT] [--name NAME] [--mkfsoptions MKFSOPTS] New in version Fedora17. Defines a BTRFS volume or subvolume. This command is of the form: "btrfs --data= --metadata= --label=