If doing a fresh install, start with an EFI system partition and an ext4 /boot/ partition.
-
Remove unnecessary packages.
rm -rf /etc/dnf/protected.d/{grub,shim}* dnf remove grubby grub2\* shim\* -
Convert /boot to a VFAT XBOOTLDR partition.
device=$(findmnt --output=SOURCE --first-only --noheadings --mountpoint /boot) umount /boot mkfs.vfat -F32 $device gdisk /dev/${device%%p} # p # t <boot_partition_number> # ea00 # w partprobe blkid nano /etc/fstab # update /boot filesystem and uuid systemctl daemon-reload mount /boot
-
Move ESP to
/efi.umount /boot/efi sed -i 's:/boot/efi:/efi:' /etc/fstab systemctl daemon-reload mkdir /efi mount /efi rm -rf /efi/EFI/fedora -
Disable kdumpctl (it needs grubby).
sudo ln -s /dev/null /etc/kernel/install.d/60-kdump.install sudo ln -s /dev/null /etc/kernel/install.d/92-crashkernel.install
-
Make kernel-install use a machine-id subdir in boot.
mkdir /boot/$(cat /etc/machine-id) -
Reinstall the kernel.
dnf reinstall kernel-core
-
Remove old efibootmgr entries with
efibootmgr -Bb <entry_number>. -
Install systemd-boot.
bootctl install