Skip to content

Instantly share code, notes, and snippets.

@yevshev
Last active May 22, 2022 01:15
Show Gist options
  • Save yevshev/dcfc7d280b0116b36e97c9972b97c96d to your computer and use it in GitHub Desktop.
Save yevshev/dcfc7d280b0116b36e97c9972b97c96d to your computer and use it in GitHub Desktop.
Fedora systemd-boot
sudo chroot /mnt/sysroot /bin/bash --login
# set partition codes
sgdisk -t 1:ef00 /dev/vda
sgdisk -t 2:8304 /dev/vda
partprobe
# remove GRUB and exclude it from being reinstalled
rpm -v --nodeps --erase $(rpm -qa | grep "^grub2-\|^os-prober-\|^grubby-")
echo "exclude=grub2-*,os-prober,grubby" >> /etc/dnf/dnf.conf
# install systemd-boot
rm -rf /boot/*
SYSTEMD_RELAX_XBOOTLDR_CHECKS=1 bootctl install --boot-path=/boot --esp-path=/boot
kernel-install add $(uname -r) /usr/lib/modules/$(uname -r)/vmlinuz
exit
systemctl reboot
@tejasraman
Copy link

Broke my fedora system, had to reinstall grub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment