10

I recently purchased a laptop, an Acer Aspire R15 with these specs: 17 7500U, 12GB DDR4, 256GB SSD, GTX 940MX 2GB.

It comes preinstalled with Windows 10, but I wanted to install Debian in a dual boot configuration for programming.

Anyways, I installed Debian on the C: drive in a separate partition, and installed grub. When I restarted the PC, it went straight into Windows 10 without launching grub. I did several google searches and ended up trying this, but this method did not work and yet again, my PC booted straight into Windows. I then tried this, which also did not work. I then tried directly installing reFIND through debian after booting into debian with a usb flash drive of refine to try to see if I could use refind as a substitute for Grub, but that also did nothing.

TL;DR: My pc boots directly into windows instead of loading grub, and I tried every method I found to fix this, but none of them worked. Can someone help me get my pc to boot with grub?

7 Answers 7

10

Your UEFI is booting the first thing it sees, which happens to be the Windows 10 bootloader. You should change this to GRUB/rEFInd as follows:

  1. On Windows 10, boot into UEFI settings as follows:
  2. Open Settings
  3. Update and Security
  4. Recovery
  5. Advanced Startup > Restart now
  6. Troubleshoot
  7. Advanced Options
  8. UEFI Firmware settings
  9. Go to the boot tab of the UEFI settings
  10. Move the Linux bootloader (GRUB or rEFInd) above the Windows 10 bootloader (instructions to do this are usually at the bottom of the screen)
  11. Save and reboot

In my experience, you do not need to disable secure boot, enable legacy mode, etc.

Now, you should be able to use your new bootloader to boot Linux. While most distros add an entry to boot Windows 10 as well, you may need to do this manually to boot to Windows 10.

3
  • 1
    Latest Windows 10 doesn't seem to offer this. I get to "Advancest Startup", but then only get a button "Restart Now".
    – dsz
    Nov 21, 2020 at 5:55
  • I can get to step 6 (Advanced Options), but there's no "UEFI Firmware settings" option there.
    – Mark
    Dec 1, 2020 at 18:02
  • Using Windows 10, I see the UEFI Firmware Settings, which ask me to restart (again), and when I do, the machine stays on, but the screen never comes back on so can't see/do anything. No key combination can wake it, so I have to hold the power button :(
    – n1k31t4
    Sep 30, 2021 at 23:24
6

It happens because of the windows register windows boot loader as a default boot loader that's why you are not greeted with GRUB.

To solve this problem,

First of all create a live CD of linux. Now, turn off your computer and boot it up wit the live CD. And try to Boot Repair follow the steps form here.

If that doesn't work then boot up to windows.

  • Run command prompt with administrative privileges.
  • Type

If your linux system is 64 bit.

bcdedit /set {bootmgr} path \EFI\debian\grubx64.efi

if your linux system is 32 bit.

bcdedit /set {bootmgr} path \EFI\debian\grubia32.efi

This command will make GRUB boot loader default boot loader for your system.

4
  • I already tried the second option, but I'll definitely try the first one now.
    – Willothy
    Jun 30, 2017 at 19:16
  • bcdedit worked a treat - thanks
    – dsz
    Nov 21, 2020 at 10:43
  • Hey this command stop my laptop boot. Now getting boot not found. Pls help me. Jan 27 at 14:38
  • are you using any debian based distro? Jan 28 at 15:45
2

Please check your BIOS settings. I faced exact same issue on my HP Laptop which goes directly into Windows 10 bypassing the linux boot options. My issue was resolved by enabling legacy mode and disable secure boot option. Please check similar options in your BIOS too.

1

The Windows boot loader will generally boot only Windows systems. You need to tell your system to use a different boot loader if you want to boot into linux.

Since you are using Windows 10 and are mentioning rEFInd, you are probably on an UEFI system.

If you installed Debian and grub correctly, then all you need to do to be able to use them, is change your boot order in BIOS/UEFI or use the manufacturer dependent key during boot to select the boot device interactively - generally something like F11 or F12 or such. That should list your hard-drives and the bootable partitions.

Choose the one that has grub installed and you should be good to go.


To be able to do it without fiddling around with boot order and have both OS's accessible, you should add a Windows entry into your grub with an entry to /etc/grub.d/40_custom like so:

menuentry "Windows 10" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 XXXX-XXXX
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    boot
}
  • hd0/ahci0 is the first disk
  • gpt2 is the second partition on said disk.
  • XXXX-XXXX is the UUID of the ESP (EFI System Partition)

Check the bootorder via efibootmgr (you might need to install it first):

$ efibootmgr
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0008,0002,0005,000A,0009,0007,000B,000C
Boot0002* Grub
Boot0005* LITEON IT LCS-256L9S
Boot0007* UEFI: Built-in EFI Shell 
Boot0008* Windows Boot Manager
Boot0009* PLDS DVD-RW DH16AFSH
Boot000A* SAMSUNG MZ7LN512HMJP-00000
Boot000B* Generic Usb Device
Boot000C* CD/DVD Device

Then set grub to be the first in line:

$ sudo efibootmgr -o 2,8,5,A,9,7,B,C
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0008,0005,000A,0009,0007,000B,000C
Boot0002* Grub
Boot0005* LITEON IT LCS-256L9S
Boot0007* UEFI: Built-in EFI Shell 
Boot0008* Windows Boot Manager
Boot0009* PLDS DVD-RW DH16AFSH
Boot000A* SAMSUNG MZ7LN512HMJP-00000
Boot000B* Generic Usb Device
Boot000C* CD/DVD Device

Reboot and done.

1

I went through all of these steps however windows kept reenabling / booting first. I finally fixed it by enabling secure boot, which then allowed me to select my own "trusted" efi file in my bios (I selected grub). This then appeared in my boot order which I then put to the top and then turned off secure boot. Grub now loads first every time. This was on an acer with UEFI, GPT drives trying to dual boot Parrot OS and Win 10.

0

This worked for me in Ubuntu:

  1. Disable secure boot in Bios
  2. This command as administrator:
bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi

Something similar in Debian could work.

-1

Reinstall the grub externally......

If not sure how to, ....boot an OS like PuppyLinux(It's like 250 M.B.) and install from there, the process is graphical and easy . After installing GRUB from Puppy Linux........It will boot a grub at the beggining and you can see if Debian is there or not.......If it's not on the list then it isn't installed properly.....Reinstall it if it isn't installed properly

If it helps, or if you get any errors, kindly Answer

1
  • 1
    The problem is not that Debian is/isn't installed correctly, it's that Grub is not appearing when I turn on the computer. Simply reinstalling Grub does not help this problem, and I've already tried that several times.
    – Willothy
    Jun 30, 2017 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.