2021-08-18 09:50:28 +00:00
# __ ____ ____ _____
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
#
2021-09-03 07:23:10 +00:00
# What ? This kickstart file provides a basic block to build a minimal operating system.
2021-11-04 12:09:12 +00:00
# 'b' for basic building block
2021-08-18 09:50:28 +00:00
2021-11-04 12:09:12 +00:00
# This is NOT a standalone kickstart file
2021-08-18 09:50:28 +00:00
text # Perform installation in text mode
2021-08-19 13:05:28 +00:00
# Installation method. For cdrom, replace repo and url with cdrom
2021-08-18 09:50:28 +00:00
repo --name = fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch # Official Fedora mirror
repo --name = updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch # Official Fedora updates mirror
# #repo --name=updates-testing --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f$releasever&arch=$basearch
url --mirrorlist = https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch # Official Fedora updates mirror
2021-11-04 12:09:12 +00:00
keyboard --xlayouts = 'ch (fr)' # set keyboard layouts for Romandie
lang en_US.UTF-8 # Set system language to American English. More languages could be supported: --addsupport = cs_CZ,de_DE,en_UK
timezone Europe/Paris --utc # Set system timezone to Paris
2021-08-18 09:50:28 +00:00
2021-08-18 14:45:15 +00:00
rootpw --lock --iscrypted locked # Lock the root account
2021-08-18 09:50:28 +00:00
2021-08-19 13:05:28 +00:00
selinux --enforcing # Make sure SELinux is in enforced mode
2021-11-04 12:09:12 +00:00
firewall --enabled --service = mdns # Make sure the firewall is enabled
2021-11-05 10:38:31 +00:00
services --enabled = NetworkManager,libvirtd --disabled=sshd
2021-11-04 12:09:12 +00:00
network --onboot = yes --bootproto=dhcp --device=link --activate --hostname=phyllome-alpha # Configure network interfaces and set hostname. "link" selects the first device reaching an up state
2021-08-18 09:50:28 +00:00
zerombr # WARNING : Dangerous command ! Will clear the Master Boot Record
2021-08-18 13:01:51 +00:00
clearpart --all --initlabel # Partition clearing information. This setup uses GPT by default.
2021-08-18 09:50:28 +00:00
part /boot/efi --fstype = "efi" --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi # Will create an efi partitition of 128 MiB (vda1)
part /boot --fstype = "ext4" --size=384 --label=boot # Create a boot partition of 384 MiB using the ext4 filesystem (vda2).
part / --fstype = "ext4" --grow --label=root # The remaining space will be used for root (vda3).
2021-11-04 12:09:12 +00:00
bootloader --timeout = 1 # Set the GNU GRUB bootloader timeout to 1.
2021-08-18 09:50:28 +00:00
2021-08-19 13:05:28 +00:00
# poweroff # Power off the system after a sucessfull installation
2021-08-18 13:01:51 +00:00
# reboot --kexec # Reboot straight into the system after a successfull installation
2021-08-18 09:50:28 +00:00
2021-11-04 12:09:12 +00:00
%packages --exclude-weakdeps # Beginning of the package section. Does not include weak dependencies.
2021-08-18 09:50:28 +00:00
@core # minimal installation
2021-11-04 12:09:12 +00:00
@hardware-support # Provides extended hardware support, and especially extra wireless drivers
pciutils # Pciutils provides lspci commandline tool, which is not installed by default
wget # "The non-interactive network downloader. " Used to fetch files during installation
neofetch # a simple tool to show hardware-related informations inside a terminal
nano # The nano text editor
qemu-guest-agent # "QEMU guest agent" The qemu-guest agent is unnecessary for a bare-metal system. However, it is included here to cover cases where this kickstart file is used to deploy a virtual machine
spice-vdagent # "Agent for Spice guests" The spice agent is unnecessary for a bare-metal system. However, it is included here to cover cases where this kickstart file is used to deploy a virtual machine
-fedora-logos # Remove Fedora logos to comply with [Fedora Remix legal guidelines](https://fedoraproject.org/wiki/Remix)
-fedora-release # Remove Fedora release-notes
-fedora-release-notes # Remove Fedora release-notes
-fedora-release-common # Remove Fedora release files
2021-08-18 09:50:28 +00:00
-fedora-release-identity-basic # ???
2021-11-04 12:09:12 +00:00
fedora-remix-logos # Add Fedora Remix logos
generic-release # Add Fedora Remix logos
generic-logos # Add Fedora Remix logos
2021-08-18 09:50:28 +00:00
generic-release-common # "Generic release files"
generic-release-notes # "Release Notes"
%end # End of the packages section
2021-11-04 12:09:12 +00:00
%post --log = /root/b.log # Beginning of the post-installation section. Add logging.
2021-08-18 09:50:28 +00:00
localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked.
dnf update -y # Update the system
grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub otherwise the system won't boot properly
2021-09-11 09:46:12 +00:00
# In the %post section of the kickstart file, add the following as the first line. Probably useless : leaving this uncommented for the moment
2021-08-18 09:50:28 +00:00
# See : https://www.opensourceforu.com/2010/01/roll-out-a-fedora-remix/
2021-09-11 09:46:12 +00:00
# sed -i -e 's/Generic release/LFY Fedora Remix/g' /etc/fedora-release /etc/issue
2021-08-18 09:50:28 +00:00
%end # End of the %post section