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.
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 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.
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
}