Skip to content

Instantly share code, notes, and snippets.

@marendowski
Created March 2, 2024 17:57
Show Gist options
  • Save marendowski/0b0887d87c8d1dbe0566e336ada84e6e to your computer and use it in GitHub Desktop.
Save marendowski/0b0887d87c8d1dbe0566e336ada84e6e to your computer and use it in GitHub Desktop.
Arch Linux EFISTUB script
#!/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