2022-09-09 08:29:00 +00:00
|
|
|
### Install from the first attached CD-ROM/DVD on the system
|
2022-08-06 20:17:14 +00:00
|
|
|
cdrom
|
|
|
|
|
2022-09-09 08:29:00 +00:00
|
|
|
### Configure network information for target system and activate network devices in the installer environment (optional)
|
|
|
|
### --onboot enable device at a boot time
|
|
|
|
### --device device to be activated and / or configured with the network command
|
|
|
|
### --bootproto method to obtain networking configuration for device (default dhcp)
|
|
|
|
### --noipv6 disable IPv6 on this device
|
|
|
|
###
|
|
|
|
### network --bootproto=static --ip=172.16.11.200 --netmask=255.255.255.0 --gateway=172.16.11.200 --nameserver=172.16.11.4 --hostname centos-linux-8
|
|
|
|
network --bootproto=dhcp --device=link --activate --onboot=on
|
|
|
|
|
2022-08-06 20:17:14 +00:00
|
|
|
### Performs the kickstart installation in text mode.
|
|
|
|
### By default, kickstart installations are performed in graphical mode.
|
|
|
|
text
|
|
|
|
|
|
|
|
### Accepts the End User License Agreement.
|
|
|
|
eula --agreed
|
|
|
|
|
|
|
|
### Sets the language to use during installation and the default language to use on the installed system.
|
|
|
|
lang ${vm_guest_os_language}
|
|
|
|
|
|
|
|
### Sets the default keyboard type for the system.
|
|
|
|
keyboard ${vm_guest_os_keyboard}
|
|
|
|
|
2022-09-09 08:29:00 +00:00
|
|
|
### Set initial root password
|
2024-08-08 07:40:37 +00:00
|
|
|
rootpw ${build_password}
|
2022-08-06 20:17:14 +00:00
|
|
|
|
|
|
|
### Configure firewall settings for the system.
|
|
|
|
### --enabled reject incoming connections that are not in response to outbound requests
|
|
|
|
### --ssh allow sshd service through the firewall
|
|
|
|
firewall --enabled --ssh
|
|
|
|
|
|
|
|
### Sets up the authentication options for the system.
|
|
|
|
### The SSDD profile sets sha512 to hash passwords. Passwords are shadowed by default
|
|
|
|
### See the manual page for authselect-profile for a complete list of possible options.
|
|
|
|
authselect select sssd
|
|
|
|
|
|
|
|
### Sets the state of SELinux on the installed system.
|
|
|
|
### Defaults to enforcing.
|
|
|
|
selinux --enforcing
|
|
|
|
|
|
|
|
### Sets the system time zone.
|
|
|
|
timezone ${vm_guest_os_timezone} --utc
|
|
|
|
|
|
|
|
### Sets how the boot loader should be installed.
|
|
|
|
bootloader --location=mbr
|
|
|
|
|
|
|
|
### Initialize any invalid partition tables found on disks.
|
|
|
|
zerombr
|
|
|
|
|
|
|
|
### Removes partitions from the system, prior to creation of new partitions.
|
|
|
|
### By default, no partitions are removed.
|
|
|
|
### --linux erases all Linux partitions.
|
|
|
|
### --initlabel Initializes a disk (or disks) by creating a default disk label for all disks in their respective architecture.
|
|
|
|
clearpart --all --initlabel
|
|
|
|
|
|
|
|
### Modify partition sizes for the virtual machine hardware.
|
|
|
|
### Create primary system partitions.
|
2024-04-11 21:40:39 +00:00
|
|
|
part /boot --fstype xfs --size=2048 --label=BOOTFS
|
2022-09-09 08:29:00 +00:00
|
|
|
part /boot/efi --fstype vfat --size=512 --label=EFIFS
|
2024-04-11 21:40:39 +00:00
|
|
|
part pv.01 --size=17 --grow
|
2022-08-06 20:17:14 +00:00
|
|
|
|
|
|
|
### Create a logical volume management (LVM) group.
|
|
|
|
volgroup vg00 --pesize=4096 pv.01
|
|
|
|
|
|
|
|
### Modify logical volume sizes for the virtual machine hardware.
|
|
|
|
### Create logical volumes.
|
2024-04-14 10:39:21 +00:00
|
|
|
logvol / --fstype xfs --name=lv_root --vgname=vg00 --size=6144 --label=ROOTFS
|
2024-04-11 14:08:55 +00:00
|
|
|
logvol /home --fstype xfs --name=lv_home --vgname=vg00 --size=2048 --label=HOMEFS
|
2024-04-14 10:39:21 +00:00
|
|
|
logvol /tmp --fstype xfs --name=lv_tmp --vgname=vg00 --size=1024 --label=TMPFS --fsoptions="nosuid,noexec,nodev"
|
|
|
|
logvol /var --fstype xfs --name=lv_var --vgname=vg00 --size=4096 --label=VARFS --fsoptions="nosuid"
|
|
|
|
logvol /var/tmp --fstype xfs --name=lv_vartmp --vgname=vg00 --size=1024 --label=LOGFS --fsoptions="nosuid,noexec,nodev"
|
2024-04-11 14:08:55 +00:00
|
|
|
logvol /var/log --fstype xfs --name=lv_log --vgname=vg00 --size=1024 --label=LOGFS --fsoptions="nosuid,noexec,nodev"
|
2024-04-14 10:39:21 +00:00
|
|
|
logvol /var/log/audit --fstype xfs --name=lv_audit --vgname=vg00 --size=1024 --label=AUDITFS --fsoptions="nosuid,noexec,nodev"
|
2022-08-06 20:17:14 +00:00
|
|
|
|
|
|
|
### Modifies the default set of services that will run under the default runlevel.
|
2022-08-10 14:01:24 +00:00
|
|
|
services --enabled=NetworkManager,sshd,qemu-guest-agent
|
2022-08-06 20:17:14 +00:00
|
|
|
|
|
|
|
### Do not configure X on the installed system.
|
|
|
|
skipx
|
|
|
|
|
|
|
|
### Disable firstboot.
|
|
|
|
firstboot --disable
|
|
|
|
|
|
|
|
### Packages selection.
|
|
|
|
%packages
|
|
|
|
@^minimal-environment
|
|
|
|
kexec-tools
|
|
|
|
openssh-server
|
|
|
|
openssh-clients
|
|
|
|
sudo
|
|
|
|
curl
|
|
|
|
python3
|
|
|
|
python3-libselinux
|
|
|
|
qemu-guest-agent
|
2022-09-09 08:29:00 +00:00
|
|
|
jq
|
2022-08-06 20:17:14 +00:00
|
|
|
-aic94xx-firmware
|
|
|
|
-atmel-firmware
|
|
|
|
-b43-openfwwf
|
|
|
|
-bfa-firmware
|
|
|
|
-ipw2100-firmware
|
|
|
|
-ipw2200-firmware
|
|
|
|
-ivtv-firmware
|
|
|
|
-iwl100-firmware
|
|
|
|
-iwl1000-firmware
|
|
|
|
-iwl3945-firmware
|
|
|
|
-iwl4965-firmware
|
|
|
|
-iwl5000-firmware
|
|
|
|
-iwl5150-firmware
|
|
|
|
-iwl6000-firmware
|
|
|
|
-iwl6000g2a-firmware
|
|
|
|
-iwl6050-firmware
|
|
|
|
-libertas-usb8388-firmware
|
|
|
|
-ql2100-firmware
|
|
|
|
-ql2200-firmware
|
|
|
|
-ql23xx-firmware
|
|
|
|
-ql2400-firmware
|
|
|
|
-ql2500-firmware
|
|
|
|
-rt61pci-firmware
|
|
|
|
-rt73usb-firmware
|
|
|
|
-xorg-x11-drv-ati-firmware
|
|
|
|
-zd1211-firmware
|
|
|
|
%end
|
|
|
|
|
|
|
|
### Post-installation commands.
|
|
|
|
%post
|
|
|
|
|
2024-04-15 14:40:27 +00:00
|
|
|
dd if=/dev/zero of=/swapfile bs=1M count=1000
|
|
|
|
chmod 600 /swapfile
|
|
|
|
mkswap /swapfile
|
2024-04-17 07:58:14 +00:00
|
|
|
echo '/swapfile none swap defaults 0 0' | tee -a /etc/fstab
|
2024-04-15 14:40:27 +00:00
|
|
|
|
2022-08-06 20:17:14 +00:00
|
|
|
dnf makecache
|
|
|
|
dnf install -y epel-release
|
|
|
|
dnf makecache
|
|
|
|
dnf install -y cloud-init
|
|
|
|
dnf clean all
|
|
|
|
|
|
|
|
touch /etc/cloud/cloud-init.disabled
|
2022-09-09 08:29:00 +00:00
|
|
|
cat >/etc/cloud/cloud.cfg.d/90-proxmox.cfg <<EOF
|
|
|
|
${files_proxmox_default_init}
|
|
|
|
EOF
|
|
|
|
cat >/etc/cloud/cloud.cfg.d/93-proxmox.cfg <<EOF
|
|
|
|
${files_proxmox_init}
|
|
|
|
EOF
|
2022-09-09 09:05:49 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
|
|
|
cat >/etc/systemd/system/getty@tty1.service.d/override.conf <<EOF
|
|
|
|
[Unit]
|
|
|
|
After=cloud-init.target
|
|
|
|
EOF
|
2022-08-06 20:17:14 +00:00
|
|
|
echo "Completed cloud-init step!"
|
2022-09-09 08:29:00 +00:00
|
|
|
|
|
|
|
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
|
2022-08-06 20:17:14 +00:00
|
|
|
%end
|
|
|
|
|
|
|
|
### Reboot after the installation is complete.
|
|
|
|
### --eject attempt to eject the media before rebooting.
|
|
|
|
reboot --eject
|