Skip to content

Instantly share code, notes, and snippets.

@kurtbahartr
Created April 23, 2025 11:44
Show Gist options
  • Save kurtbahartr/e88750f6240736fadb41b74b5b306ff5 to your computer and use it in GitHub Desktop.
Save kurtbahartr/e88750f6240736fadb41b74b5b306ff5 to your computer and use it in GitHub Desktop.
Working around Casper Excalibur BIOS boot order quirk on Linux

Alright, you installed your first Linux distro. You didn't want to lose data, or have Windows lying around "just in case". However, you want to be able to boot into Linux without having to go through the boot menu again and again.

You've heard from your Linux user friends that Linux has a boot manager that also detects Windows, so you want Linux to be on top of Windows.

So, you do what others have been doing for years since UEFI came to be: Boot into BIOS, head to change the boot order. But, would you look at that! Linux didn't register itself to the BIOS's boot menu!

Then you go, "Okay, I've read online that efibootmgr can get this resolved just by changing the boot order!" That's supposed to work since this is UEFI, right?

So you boot back into Linux and use efibootmgr to change the boot order. However, the next boot still boots directly into Windows. You go to the boot menu and your order customization didn't register at all.

You do the similar on Windows using bcdedit, but to no avail as well. The order just doesn't change.

What's going on?

The answer is simple: Casper used their OEM powers to try and lock users down to Windows.

You're on your own, because the support won't help you on anything that's not Windows, because, and I quote, "Biz Microsoft'la iş ortağıyız ve sadece Windows ile ilgili sorunlara bakabiliriz." (We're business partners with Microsoft and we can only look into issues related to Windows.)

The solution

The solution is to delete the upper boot entries, one entry at a time.

efibootmgr: Running this without parameters pukes your UEFI boot entries.

efibootmgr -b XXXX -B (Replace XXXX with the entry number): Running this will delete the UEFI entry.

If an entry is simply the brand and model of a disk plugged into your laptop, look for EFI\BOOT\BOOTx64.EFI on the FAT32 partition(s) on the disk.

Bonus: A simple GRUB entry to "chainload" another OS

Chainloading: The act of loading another bootloader from the current bootloader to begin the boot process.

For ease of use, this entry is recommended to be put into /etc/grub.d/40_custom if you're using GRUB.

You can generate the UUID needed with uuidgen.

menuentry "Second OS" --class second-os --class efi-chainload --class os $menuentry_id_option 'second-os-hack-<UUID>' {
    load_video
    gfxmode $linux_gfx_mode
    insmod chain
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment