Files
homelab/infra-config/04-vm-templates/fedora-41/http/ks1.cfg
2025-07-06 22:14:11 -05:00

65 lines
2.1 KiB
INI

# Kickstart file for Fedora 41 Server (Text-based Installation)
#
# For use with the Fedora Server netinstall ISO.
# Boot the installer with:
# linux /isolinux/vmlinuz inst.ks=http://<server>/<path>/ks.cfg
#
# For a local file on a USB drive, you can use:
# linux /isolinux/vmlinuz inst.ks=hd:LABEL=<USB_LABEL>:/ks.cfg
# System language, keyboard layout, and timezone
lang en_US.UTF-8
keyboard us
timezone America/Chicago --isUtc
# Installation source
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-41&arch=x86_64
# Use text mode installer
text
# Network configuration
# Using DHCP for automatic network configuration.
# For a static configuration, uncomment and modify the following lines:
# network --bootproto=static --device=eth0 --ip=192.168.1.10 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=8.8.8.8,8.8.4.4 --hostname=fedora-server
network --bootproto=dhcp --device=eth0 --onboot=on --ipv6=auto --hostname=fedora41-server
# Root password (encrypted)
# To generate an encrypted password, use:
# python -c 'import crypt; print(crypt.crypt("YourPassword", crypt.mksalt(crypt.METHOD_SHA512)))'
rootpw --iscrypted $6$your_encrypted_root_password_hash
# Disk partitioning
# This will erase the specified disk.
# --ondisk=sda can be changed to a more specific device like vda for virtual machines.
# --all will erase all partitions on the disk.
# LVM partitioning scheme is used for flexibility.
zerombr
clearpart --all --initlabel --drives=sda
autopart --type=lvm
# System services
# Disables services not typically required on a minimal server.
services --disabled="kdump,mdmonitor,mdmonitor-takeover" --enabled="sshd,chronyd"
# Package selection
# @^server-product-environment provides a minimal server installation.
# You can add additional packages as needed.
%packages
@^server-product-environment
-@standard
# Add essential command-line tools
vim-enhanced
tmux
git
%end
# Post-installation script
%post --log=/root/ks-post.log
echo "Fedora 41 Server installation complete." > /etc/motd
# Add any additional post-installation tasks here.
%end
# Reboot after installation
reboot