Skip to content

Instantly share code, notes, and snippets.

@jsnfwlr
Created September 14, 2020 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsnfwlr/ff25757fc0885efc12446ec93fa77e0b to your computer and use it in GitHub Desktop.
Save jsnfwlr/ff25757fc0885efc12446ec93fa77e0b to your computer and use it in GitHub Desktop.
Fix UEFI Boot on lenovo
#!/bin/bash
mkdir -p /mnt/system/boot
mount /dev/sda2 /mnt/system
mount /dev/sda1 /mnt/system/boot
mount proc -t proc /mnt/system/proc
mount -o bind /dev /mnt/system/dev
mount -o bind /run /mnt/system/run
apt install efibootmgr
# efibootmgr -c -d /dev/sda -p 1 -l '\EFI\ubuntu\grubx64.efi' -L "Windows Boot Manager"
# or
# efibootmgr -c -d /dev/sda1 -p 1 -l '\EFI\ubuntu\grubx64.efi' -L "Windows Boot Manager"
efibootmgr -v
echo 'sudo efibootmgr -o AAAA,XXXX,YYYY,ZZZZ'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment