Page 1 of 1

[SOLVED] Laptop boots into Windows only

PostPosted: Jul 15th, '18, 05:42
by pnbalaji
Hi,

I bought a new ACER laptop last week that came with Windows 10 and UEFI firmware/bios.

I did reduce the size of windows partition, created new partitions for install mageia 6, disabled the secure boot from the BIOS and installed Mageia 6 on the laptop. Everything went fine during the install. However, the laptop boots straight into Windows 10 only and not providing the option of Mageia as a bootable OS. I am able to press F12 to get the boot menu and able to select Mageia from there and it boots fine. It appears that the windows boot manager is taking precedence over the grub2. I went thru several google links, looked at Mageia 6 wiki and tried several options However, no matter what I do, it boots straight into Windows.

I tried the below command and it did not report any errors.
grub2-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=mageia --recheck

Also tried the below command from windows 10.
bcdedit /set {bootmgr} path \EFI\<id>\grubx64.efi

Also tried the method that is given in the youtube video.
https://www.youtube.com/watch?v=MN-Q5h2Iv8A.

I tried to follow the procedure listed in the forum topic https://www.google.com/url?sa=t&rct=j&q ... kzU0nonQU2, but it did not work. when I type "urpmi grub2-common", I get a message saying "No package named grub2-common".

How do I make grub2 to override the windows boot manager?

I really don't want to re-install the OS and I have done a lot of customizing on Mageia 6 to my liking.

Thanks,
Balaji.

Re: Laptop boots into Windows only

PostPosted: Jul 15th, '18, 23:41
by martinw
After booting Mageia, open a terminal window and enter the command
Code: Select all
/sbin/efibootmgr -v

and post the output here.

Re: Laptop boots into Windows only

PostPosted: Jul 16th, '18, 00:44
by pnbalaji
Below is the output.

Code: Select all
[user@localhost ~]$ sudo efibootmgr -v
[sudo] password for user:
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,0001,0002,2001,2002,2003
Boot0000* Windows Boot Manager   HD(1,GPT,46d79cb7-4846-43bd-9777-75ddc972bc4a,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0001* Windows Boot Manager   HD(1,GPT,46d79cb7-4846-43bd-9777-75ddc972bc4a,0x800,0x32000)/File(\EFI\mageia\grubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* mageia   HD(1,GPT,46d79cb7-4846-43bd-9777-75ddc972bc4a,0x800,0x32000)/File(\EFI\mageia\grubx64.efi)
Boot2001* EFI USB Device   RC
Boot2002* EFI DVD/CDROM   RC
Boot2003* EFI Network   RC


Even though it shows BootCurrent as 0002 (which is Mageia), but still it boots into Windows 10 only.

Re: Laptop boots into Windows only

PostPosted: Jul 16th, '18, 09:40
by martinw
BootCurrent shows what is currently booted, so that is correct. The important thing is BootOrder, which shows which entries the BIOS will try (and in what order) if you don't manually select a boot image. So it is still showing \EFI\Microsoft\Boot\bootmgfw.efi as the first choice, which is why it boots Windows 10.

Normally you can use efibootmgr to change the boot order. But as that didn't work when you installed Mageia, I guess you have one of those awkward BIOSs that resets the boot order to its own choice every time you boot.

Does your BIOS show two "Windows Boot Manager" entries and let you change the order? If so, swap them round, and you should then boot into Mageia by default (using the BCD entry). If not, try (from Mageia) renaming /boot/EFI/EFI/Microsoft/Boot/bootmgfw.efi to e.g. bootmgfw.efi.bak, which should cause the BIOS to skip the first entry and go onto the second.

[Solved] Re: Laptop boots into Windows only

PostPosted: Jul 16th, '18, 14:36
by pnbalaji
Problem solved.

Thanks for the pointer on boot entries in BIOS. I looked into BIOS and I could see that there is a blank third entry after two windows entries. I moved the blank entry to the top and now my laptop is booting into Mageia.

Image

Thanks,
Balaji.

Re: [SOLVED] Laptop boots into Windows only

PostPosted: Jul 17th, '18, 01:48
by morgano
FWIW i have also hit same confusing issue of blank entry with ACER UEFI BIOS :/

Re: [SOLVED] Laptop boots into Windows only

PostPosted: Jul 17th, '18, 03:33
by pnbalaji
It was initially showing as Windows. Once I moved the "Windows" entry to the top and rebooted my laptop, it became blank. Anyway it works fine now. Grub2 was setup to always boot the previous operating system and I used Grub Customizer to always highlight Mageia entry.