Skip to content

Instantly share code, notes, and snippets.

@offlinehacker
Created September 14, 2020 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save offlinehacker/6dbcbe2cf8b59e08914490349cb009ec to your computer and use it in GitHub Desktop.
Save offlinehacker/6dbcbe2cf8b59e08914490349cb009ec to your computer and use it in GitHub Desktop.
Fedora silverblue 32 virt-install
#version=DEVEL
# OSTree setup
ostreesetup --osname="fedora" --remote="fedora" --url="https://d2uk5hbyrobdzx.cloudfront.net/" --ref="fedora/32/x86_64/silverblue" --nogpg
# Reboot after installation
reboot
# Use text mode install
text
# Use network installation
url --url="https://ftp.fau.de/fedora/linux/releases/32/Everything/x86_64/os/"
%post --logfile=/root/ks-post.log --erroronfail
# add sudoers
echo "Creating /etc/sudoers.d/wheel"
echo "%wheel ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/wheel
# Add user as a workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1838859
echo "Adding new user"
useradd -g wheel tomas
echo "tomas:changeme" | chpasswd
%end
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Firewall configuration
firewall --use-system-defaults
# Network information
network --bootproto=dhcp --device=link --hostname=silverblue --activate
# SELinux configuration
selinux --permissive
# X Window System configuration information
xconfig --startxonboot
firstboot --disable
# System services
services --enabled="chronyd"
ignoredisk --only-use=vda
# System bootloader configuration
bootloader --location=mbr --boot-drive=vda
autopart
# Partition clearing information
clearpart --all --initlabel --drives=vda
# System timezone
timezone UTC --utc
#Root password
rootpw --lock
%addon com_redhat_kdump --disable --reserve-mb='128'
%end
virt-install --connect qemu:///system \
--name silverblue --ram 2048 --os-type linux --os-variant fedora32 \
--virt-type kvm --graphics spice --video vga\
--disk=./silverblue.vda.x86_64.qcow2,bus=virtio,format=qcow2,size=7\
--location=https://ftp.fau.de/fedora/linux/releases/32/Everything/x86_64/os/ \
--initrd-inject ./silverblue32-kickstart.cfg \
--extra-args="inst.ks=file:/silverblue32-kickstart.cfg net.ifnames=0 biosdevname=0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment