You should be familiar with systemd-boot to make these modifications, these are not copy and paste commands. You must read and adapt to your configuration as they are unique to all systemd-boot installations and configurations.
We'll go through properly updating systemd-boot to pass various kernel parameters for our Hypervisor setup needed for virtualization, and IOMMU usage
Start by issuing the sudo bootctl list
command in your terminal to view your configurations.
Example console output:
type: Boot Loader Specification Type #1 (.conf)
title: Arch Linux (linux) (default) (selected)
id: 2023-08-12_19-47-44_ linux.conf
source: /boot/loader/entries/2023-08-12_19-47-44_1inux.conf
linux: /boot/vmlinuz-linux
initrd: /boot/initramfs-linux. img
options: zswap.enabled=0 rw rootfstype-ext4
type: Boot Loader Specification Tupe #1 (.conf)
title: Arch Linux (linux-fallback)
id: 2023-08-12_19-47-44_1inux-fallback.conf
source: /boot/loader/entries/2023-08-12_19-47-44_Iinux-fallback.conf
linux: /boot/vmlinuz-linux
initrd: /boot/initramfs-linux-fallback.ing
options: zswap.enabled=0 rw rootfstype-ext4
type: Automatic
title: Reboot Into Firmware Interface id: auto-reboot-to-firmware-setup
source: /sus/firmware/efi/efivars/LoaderEntries-4267b082-0a4c-41cf-b6c7-440b29668c4f
You'll want to note the path of your default boot configuration file.
Depending on your choice of editor, and configuration file from the output, you'll need to modify it to contain certain boot arguments depending on your host hardware configuration
Kernel Parameter Intention | AMD | Intel | Both |
---|---|---|---|
Enable SR-IOV at kernel level | intel_iommu=on | ||
Set IOMMU to Passthrough Mode | iommu=pt | ||
Disable Kernel EFI Framebuffer | video=efifb:off |
An example using Nano to edit Arch Linux (Linux) (Default)
on an AMD Host
sudo nano /boot/loader/entries/2023-08-12_19-47-44_1inux.conf
title Arch Linux (Linux)
linux /vmlinuz-linux
initrd /initramfs-linux.img
options zswap.enabled=0 rw rootfstype-ext4 iommu=pt video=efifb:off
An example using Nano to edit Arch Linux (Linux) (Default)
on an Intel Host
sudo nano /boot/loader/entries/2023-08-12_19-47-44_1inux.conf
title Arch Linux (Linux)
linux /vmlinuz-linux
initrd /initramfs-linux.img
options zswap.enabled=0 rw rootfstype-ext4 intel_iommu=on iommu=pt video=efifb:off
Once you're done adding the flags to the options
save the file and reboot
You can now verify that the changes were made, by checking the current parameters booted with
cat /proc/cmdline
Example Output
zswap.enabled=0 rw rootfstype-ext4 iommu=pt video=efifb:off
If all looks good, you are now ready to continue!