10.2. Creating a Kickstart file by performing a manual installation
You can use the Kickstart file created by a manual installation of Red Hat Enterprise Linux. After a graphical installation completes, all choices made during the installation are saved into a Kickstart file named anaconda-ks.cfg. This file is located in the /root/ directory on the installed system.
You can use this file to reproduce the installation in the same way as before. Alternatively, copy this file, make any changes you need, and use the resulting configuration file for further installations.
Procedure
Install RHEL. For more details, see Interactively installing RHEL from installation media.
During the installation, create a user with administrator privileges.
- Finish the installation and reboot into the installed system.
- Log into the system with the administrator account.
Copy the file
/root/anaconda-ks.cfgto a location of your choice. The file contains information about users and passwords.To display the file contents in terminal:
# cat /root/anaconda-ks.cfgYou can copy the output and save to another file of your choice.
- To copy the file to another location, use the file manager. Remember to change permissions on the copy, so that the file can be read by non-root users.
Install the pykickstart package.
# dnf install pykickstartRun
ksvalidatoron your Kickstart file.$ ksvalidator -v RHEL10 /path/to/kickstart.ksReplace /path/to/kickstart.ks with the path to the Kickstart file you want to verify.
重要The validation tool cannot guarantee the installation will be successful. It ensures only that the syntax is correct and that the file does not include deprecated options. It does not attempt to validate the
%pre,%postand%packagessections of the Kickstart file.