I recently installed Debian on my HP Windows laptop, which uses UEFI. The installation process went smoothly, but upon rebooting, my laptop automatically boots into Windows without showing the GRUB menu. The only way I can start Debian is by selecting it from the BIOS boot menu. My setup includes a Windows EFI partition on sda1 (100MB) and a Debian EFI partition on sda7 (1GB), with the Debian root located on sda8. I suspect that my laptop's firmware prioritizes the Windows entry first and ignores GRUB on the Debian partition. I am looking for a solution to achieve a working dual-boot system where GRUB appears automatically, without needing to access the BIOS each time.
2 Answers
In your BIOS settings, make sure to set the Debian entry as the first option in the boot order. Sometimes it can be as simple as that!
You might be able to change the default bootloader through the UEFI settings. If not, boot into Debian or a live CD and execute the command `efibootmgr`. This tool allows you to reorder your boot entries by running `efibootmgr --bootorder x,y`, where x and y are the numbers of the entries you want to prioritize, like 0000 for GRUB. Just make sure you run it with sudo!
Yeah, I had the same issue. Even after using the `--bootorder` flag, it still goes to Windows on reboot.

I tried using `sudo efibootmgr -o 0002,0001,3001,0003,2001,2002,2004`, which should prioritize Debian, but I'm still booting straight into Windows.