Update efibootmgr regex to match nvme + sata + vdisk

This commit is contained in:
Ryan Hughes 2025-08-24 15:50:50 +02:00
parent 24682aea8c
commit b0acd0b5e8

View File

@ -85,11 +85,10 @@ EOF
fi
# Add UKI entry to UEFI machines to skip bootloader showing on normal boot
# FIXME: Make this work on real hardware
# if [ -n "$EFI" ] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy; then
# sudo efibootmgr --create \
# --disk "$(findmnt -n -o SOURCE /boot | sed 's/[0-9]*$//')" \
# --part "$(findmnt -n -o SOURCE /boot | grep -o '[0-9]*$')" \
# --label "Omarchy" \
# --loader "\\EFI\\Linux\\$(cat /etc/machine-id)_linux.efi"
# fi
if [ -n "$EFI" ] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy; then
sudo efibootmgr --create \
--disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \
--part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \
--label "Omarchy" \
--loader "\\EFI\\Linux\\$(cat /etc/machine-id)_linux.efi"
fi