第 11 章 Adding the Kickstart file to a UEFI HTTP or PXE installation source
After your Kickstart file is ready, you can make it available for the installation on the destination system.
11.1. Sharing the installation files on an NFS server 复制链接链接已复制到粘贴板!
You can store Kickstart files on an NFS server to enable automated installations across multiple systems. It eliminates the need for physical media and provides centralized management of installation configurations for efficient system deployment over network file sharing.
Prerequisites
- You have administrator-level access to a server with Red Hat Enterprise Linux 10 on the local network.
- The system to be installed can connect to the server.
Ensure that you use different paths in inst.ks and inst.repo. When using NFS to host the Kickstart, you cannot use the same nfs share to host the installation source.
Procedure
Install the
nfs-utilspackage by running the following command as root:# dnf install nfs-utils- Copy the Kickstart file to a directory on the NFS server.
Open the
/etc/exportsfile by using a text editor and add a line with the following syntax:/exported_directory/ clientsReplace /exported_directory/ with the full path to the directory holding the Kickstart file. Instead of clients, use the host name or IP address of the computer that is to be installed from this NFS server, the subnetwork from which all computers are to have access the ISO image, or the asterisk sign (
*) if you want to allow any computer 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/nfs/rhel10-kickstart/directory available as read-only to all clients is:/nfs/rhel10-kickstart/ *Enable the NFS service in firewalld.
# firewall-cmd --permanent --add-service nfs # firewall-cmd --permanent --add-service=mountd # firewall-cmd --permanent --add-service=rpc-bind # firewall-cmd --reload-
Save the
/etc/exportsfile and exit the text editor. Start the nfs service:
# systemctl enable --now nfs-server.serviceIf the service was running before you changed the
/etc/exportsfile, enter the following command, in order for the running NFS server to reload its configuration:# systemctl reload nfs-server.serviceThe Kickstart file is now accessible over NFS and ready to be used for installation.
注意When specifying the Kickstart source, use
nfs:as the protocol, the server’s host name or IP address, the colon sign (:), and the path inside the directory holding the file. For example, if the server’s host name ismyserver.example.comand you have saved the file in/nfs/rhel10-kickstart/my-ks.cfg, specifyinst.ks=nfs:myserver.example.com:/nfs/rhel10-kickstart/my-ks.cfgas the installation source boot option.