Created
March 2, 2024 17:57
-
-
Save marendowski/0b0887d87c8d1dbe0566e336ada84e6e to your computer and use it in GitHub Desktop.
Arch Linux EFISTUB script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Creates an EFI boot option for kernel image on the root partition with swap included | |
# Requires: efibootmgr, blkid | |
# Kernel parameters are after '--unicode' | |
root_uuid="$(blkid -s UUID -o value /dev/nvme0n1p3)" | |
swap_uuid="$(blkid -s UUID -o value /dev/nvme0n1p2)" | |
efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux" --loader /vmlinuz-linux --unicode "root=UUID=${root_uuid} resume=UUID=${swap_uuid} rw initrd=\initramfs-linux.img" | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment