diff --git a/migrations/1758487662_move_to_custom_uki.sh b/migrations/1758487662_move_to_custom_uki.sh index 2d72fe0..731bba2 100644 --- a/migrations/1758487662_move_to_custom_uki.sh +++ b/migrations/1758487662_move_to_custom_uki.sh @@ -11,7 +11,6 @@ if command -v limine &>/dev/null && [[ -f /etc/default/limine ]]; then sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1 done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/') - sudo limine-update uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) @@ -21,11 +20,14 @@ if command -v limine &>/dev/null && [[ -f /etc/default/limine ]]; then sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1 done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Omarchy" | sed 's/^Boot\([0-9]\{4\}\).*/\1/') - 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\\$uki_file" + # Skip EFI entry creation on Apple hardware + if ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; 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\\$uki_file" + fi fi else echo "Not using UKI. Not making any changes."