Fedora Silverblue 39 automatic installation (scripted)

I have stored the entry for the kickstart cfg in the file “E:\EFI\BOOT\grub.cfg”.

inst.ks=hd:LABEL=FEDORA-SB

menuentry 'Install Fedora 39' --class fedora --class gnu-linux --class gnu --class os {
	linuxefi /images/pxeboot/vmlinuz inst.repo=hd:LABEL=FEDORA-SB inst.ks=hd:LABEL=FEDORA-SB quiet
	initrdefi /images/pxeboot/initrd.img 
}

After booting, the ks.cfg is used automatically. This must be saved in the root directory of the USB stick. Here is the content of my ks.cfg file:

# Generated by Anaconda 39.32.6
# Generated by pykickstart v3.48
#version=DEVEL
# Use graphical install
graphical

%post --erroronfail
cp /etc/skel/.bash* /root
%end

%post --erroronfail
###MY CONFIG - CREATE FOLDER
mkdir /etc/TestFolder /etc/TestFolder/scripts /etc/TestFolder/tmp /etc/TestFolder/mnt
chown -R sad:sad /etc/TestFolder
chmod -R 777 /etc/TestFolder/
chmod -R 755 /etc/TestFolder/*
chmod -R 777 /etc/TestFolder/tmp
%end

%post --nochroot --erroronfail
cp -rf /run/install/repo/MyScriptFolder /mnt/sysroot/etc/TestFolder/scripts/
%end

# Keyboard layouts
keyboard --vckeymap=de-nodeadkeys --xlayouts='de (nodeadkeys)'
# System language
lang de_DE.UTF-8

# Firewall configuration
firewall --use-system-defaults

# OSTree setup
ostreesetup --osname="fedora" --remote="fedora" --url="file:///ostree/repo" --ref="fedora/39/x86_64/silverblue" --nogpg

# Run the Setup Agent on first boot
firstboot --enable

### MY CONFIG ###
network --hostname="test"
network --device="eno1" --bootproto="static" --ip="192.168.0.100" --netmask="255.255.255.0" --nameserver="192.168.0.1" --gateway="192.168.0.1"

# Generated using Blivet version 3.8.1
ignoredisk --only-use=sda
# Partition clearing information
# clearpart --none --initlabel
clearpart --drives=sda --all
# Disk partitioning information
part /boot/efi --fstype="efi" --ondisk=sda --size=600 --fsoptions="umask=0077,shortname=winnt"
part btrfs.2851 --fstype="btrfs" --ondisk=sda --size=196608
part /boot --fstype="ext4" --ondisk=sda --size=1024
btrfs none --label=fedora_fedora --data=single btrfs.2851
btrfs /home --subvol --name=home LABEL=fedora_fedora
btrfs / --subvol --name=root LABEL=fedora_fedora

timesource --ntp-server=_gateway
# System timezone
timezone Europe/Berlin --utc

# Root password
rootpw --lock

## MY-USER
user --name=NewUser --iscrypted --password=CryptoKey --groups=admin,wheel --uid=1000 --gid=1000 

reboot
3 Likes