mirror of
https://github.com/PhyllomeOS/phyllomeos.git
synced 2024-11-05 12:11:10 +00:00
163 lines
5.8 KiB
INI
163 lines
5.8 KiB
INI
# __ ____ ____ _____
|
|
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
|
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
|
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
|
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
|
# /_/ /____/
|
|
|
|
# WHAT ? Kickstart file that bootstraps a minimal fedora 34 server, vanilla.
|
|
# 'b' for bare-metal, 'e' for efi, 'n' for 'non-lvm', 's' for server, 'd' for development.
|
|
|
|
# USAGE : Press the `tab` key during POST and apend that after the 'quiet' string :
|
|
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/f34/bensd.cfg
|
|
# inst.ks=url.phyllo.me/bensd.cfg
|
|
|
|
# ATTENTION : this kickstart file will automatically DESTROY the main NVME disk and all of its contents.
|
|
# Bye bye!
|
|
|
|
## INSTALLATION TYPE ##
|
|
|
|
# Perform Installation in Graphical Mode
|
|
graphical
|
|
|
|
# Configure cdrom as installation method
|
|
# cdrom
|
|
|
|
## REPOSITORIES ##
|
|
|
|
# Add repo and mirror
|
|
url --mirrorlist="https://mirrors.fedoraproject.org/metalink?repo=fedora-34&arch=x86_64"
|
|
|
|
repo --name=fedora-updates --mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f34&arch=x86_64" --cost=0
|
|
|
|
# Add rpmfusion repositories, which provides extra packages
|
|
repo --name=rpmfusion-free --mirrorlist="https://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-34&arch=x86_64" --includepkgs=rpmfusion-free-release
|
|
repo --name=rpmfusion-free-updates --mirrorlist="https://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-34&arch=x86_64" --cost=0
|
|
|
|
# Uncomment to add-nonfree repositories
|
|
# repo --name=rpmfusion-nonfree --mirrorlist="https://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-34&arch=x86_64" --includepkgs=rpmfusion-nonfree-release
|
|
# repo --name=rpmfusion-nonfree-updates --mirrorlist="https://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-34&arch=x86_64" --cost=0
|
|
|
|
## USER RELATED ##
|
|
|
|
# Set the keyboard layout
|
|
keyboard --xlayouts='ch (fr)'
|
|
|
|
# Set the system language to American English
|
|
lang en_US.UTF-8
|
|
|
|
# System timezone
|
|
timezone Europe/Paris --utc
|
|
|
|
# Set dummy encrypted root password and activate the root account
|
|
rootpw --iscrypted $6$2rA58L/SQu5.xMTb$u8.zqBWE5bK1/N983qDpJEp41yg66GwQ3YVTpsRghVhNiZypWyo2Zq2Qwr2tCM3bt50mKMIgHzbPdtSq9ErPz.
|
|
|
|
# Create "test" user account
|
|
user --name=test --password=$6$wlB.n8fvumAXv3xn$clVIswjLUjb7MZoJ2JHi1zk1zmx5ViQuzbVkLYf70SDan5hdqI0tUkc89nHE8pVnHStO4mcl3c1Tk0WJvCet1. --iscrypted --gecos="test"
|
|
|
|
## NETWORK RELATED ##
|
|
|
|
# Configure Firewall
|
|
firewall --disabled
|
|
|
|
# Configure Network Interfaces
|
|
network --onboot=yes --bootproto=dhcp --hostname=bensd.cfg
|
|
|
|
# Run the Setup Agent on first boot
|
|
firstboot --enable
|
|
|
|
## DISK RELATED ##
|
|
|
|
# Only use disk labelled as nvme0n1
|
|
ignoredisk --only-use=nvme0n1
|
|
|
|
# System bootloader configuration
|
|
bootloader --location=mbr --boot-drive=nvme0n1
|
|
|
|
# WARNING : Dangerous command ! Will clear the Master Boot Record
|
|
zerombr
|
|
|
|
# Partition clearing information
|
|
clearpart --all --initlabel --drives=nvme0n1
|
|
|
|
# Disk partitioning information.
|
|
# Will create an efi partitition of 128 MiB, a boot partition of 384 MiB on disk vda using the ext4 filesystem. The remaining space will be used for root.
|
|
part /boot/efi --fstype="efi" --ondisk=nvme0n1 --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi
|
|
part /boot --fstype="ext4" --ondisk=nvme0n1 --size=384 --label=boot
|
|
part / --fstype="ext4" --ondisk=nvme0n1 --grow --label=system
|
|
|
|
## SOFTWARE ##
|
|
|
|
# Install packages for the server environment. 'Core' and 'Base' are always selected
|
|
%packages
|
|
@^server-product-environment
|
|
%end
|
|
|
|
## POST-INSTALLATION SCRIPTS ##
|
|
|
|
## Start of the %post section with logging into /root/ks-post.log
|
|
%post --log=/root/ks-post.log
|
|
|
|
## Set keymap to ch-fr. ## Doesn't survive a reboot. Or only touches the console
|
|
#localectl set-keymap ch-fr
|
|
|
|
# Set new hostname. ## Doesn't survive a reboot
|
|
# hostnamectl set-hostname kickstarted-fedora
|
|
|
|
# Update the system
|
|
dnf update -y
|
|
|
|
# set the GRUB_TIMEOUT countdown to 1 instead of 5 seconds.
|
|
sed -i 's/5/1/' /etc/default/grub
|
|
|
|
# Update grub
|
|
grub2-mkconfig -o /boot/grub2/grub.cfg
|
|
|
|
## Reboot the installer (doesn't work (tm))
|
|
reboot
|
|
|
|
## End of the %post section
|
|
%end
|
|
|
|
# Instructions for mdev
|
|
|
|
# Generate uuid with uuigen
|
|
# echo 60f4d34b-d1a1-4756-8ebe-37e2a6e0d05f > /sys/devices/pci0000\:00/0000\:00\:02.0/mdev_supported_types/i915-GVTg_V5_4/create
|
|
# Create virtual gpu
|
|
# echo f722c397-350c-4373-abb1-3fa7af20d7c5 > /sys/bus/pci/devices/0000\:00\:02.0/mdev_supported_types/i915-GVTg_V5_4/create
|
|
|
|
|
|
# Reference :
|
|
# * See here : https://wiki.archlinux.org/title/Intel_graphics#Enable_GuC_/_HuC_firmware_loading
|
|
# * And here : https://wiki.archlinux.org/title/Intel_GVT-g
|
|
# Post-script verification
|
|
|
|
# [root@eos-h]# ls -all /etc/modules-load.d
|
|
# total 36
|
|
# drwxr-xr-x. 2 root root 137 May 18 22:56 .
|
|
# drwxr-xr-x. 123 root root 8192 Jun 15 16:33 ..
|
|
# -rw-r--r--. 1 root root 6 May 18 22:55 kvmgt.conf
|
|
# -rw-r--r--. 1 root root 5 May 18 22:52 vfio.conf
|
|
# -rw-r--r--. 1 root root 17 May 18 22:52 vfio_iommu_type1.conf
|
|
# -rw-r--r--. 1 root root 10 May 18 22:56 vfio-mdev.conf
|
|
# -rw-r--r--. 1 root root 9 May 18 22:52 vfio-pci.conf
|
|
# -rw-r--r--. 1 root root 12 May 18 22:52 vfio_virqfd.conf
|
|
|
|
# [root@eos-h]# cat /etc/default/grub
|
|
# GRUB_TIMEOUT=1
|
|
# GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
|
|
# GRUB_DEFAULT=saved
|
|
# GRUB_DISABLE_SUBMENU=true
|
|
# GRUB_TERMINAL_OUTPUT="console"
|
|
# GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora_fedora/root rhgb quiet intel_iommu=on intel_iommu=pt i915.enable_gvt=1 i915.enable_guc=2"
|
|
# GRUB_DISABLE_RECOVERY="true"
|
|
# GRUB_ENABLE_BLSCFG=true
|
|
|
|
|
|
# #############
|
|
# Modify the file to add nested : /etc/modprobe.d/kvm.conf.
|
|
# nano /etc/modprobe.d/kvm.conf
|
|
# Uncomment the line related to your CPU :
|
|
# options kvm_intel nested=1
|
|
# options kvm_amd nested=1
|
|
# ############# |