Kickstart - Alma Linux
1. Création d'un fichier Kickstart pour Alma Linux 9.5
- Créer le fichier
http/almalinux/9/ks.cfg
http/almalinux/9/ks.cfg
# https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-12-starting-a-kickstart-installation
# Langue, clavier, fuseau
lang fr_FR.UTF-8
keyboard --vckeymap=fr --xlayouts='fr'
timezone Europe/Paris --utc
# Réseau DHCP
network --bootproto=dhcp --device=link --activate
network --hostname=pckralmalinux9.home.lab
# Installation
text
skipx
cdrom
# Authentification
# openssl passwd -6 -salt xyz $password
#rootpw $encrypted --iscrypted
rootpw --plaintext packer
user --name=packer --password=packer --groups=wheel --shell=/bin/bash
# Mettre une clé ssh publique
sshkey --username=packer <SSH_PUB_KEY>
# Système
auth --passalgo=sha512 --useshadow
selinux --enforcing
firewall --enabled --service=ssh
services --enabled="NetworkManager,firewalld,sshd"
# Partitionnement
zerombr
bootloader --location=mbr
clearpart --all --initlabel
autopart --type=lvm
firstboot --disabled
reboot --eject
# Installation des packages
%packages --ignoremissing --excludedocs
@core
systemd
sudo
qemu-guest-agent
vim
wget
epel-release
htop
cloud-init
%end
## Script de post-installation
%post --interpreter=/bin/bash
echo "packer ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
systemctl enable qemu-guest-agent
systemctl enable cloud-init
%end