Skip to content

Instantly share code, notes, and snippets.

@mys721tx
Last active May 20, 2019 17:13
Show Gist options
  • Save mys721tx/aee60ef7136928542d49be0cde8ea025 to your computer and use it in GitHub Desktop.
Save mys721tx/aee60ef7136928542d49be0cde8ea025 to your computer and use it in GitHub Desktop.
Generate UEFI boot entry for EFISTUB kernel
#!/bin/bash
BOOTDISK="/dev/sda"
BOOTPART="1"
ROOT="/dev/sda3"
ROOTUUID="$(blkid -s PARTUUID -o value $ROOT)"
KERNEL="linux"
efibootmgr --disk "${BOOTDISK}" --part "${BOOTPART}" \
--create --label "Arch Linux" \
--loader "/vmlinuz-${KERNEL}" \
--unicode "root=PARTUUID=${ROOTUUID} rw initrd=\\initramfs-${KERNEL}.img" \
--verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment