dotfiles/efistub/update.sh

15 lines
292 B
Bash
Raw Normal View History

#!/bin/bash
# remove old entries
for bootentry in $(efibootmgr | head -n 3 | tail -n 1 | cut -d' ' -f2- | sed 's/,/\n/g'); do
sudo efibootmgr -qBb $bootentry
done
# add all entries back
for bootscript in *.efi; do
./$bootscript
done
# set bootorder
2021-02-18 17:47:10 +02:00
sudo efibootmgr --bootorder 0000,0001