Page 1 of 1
Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 10, 2019 5:12 pm
by Morcelas
Hello everyone,
I plan to install MX Linux alongside Windows 10 in Dual Boot. I followed every step in this tutorial video
https://youtu.be/PA0QGL2d2Zk and used the MX Tool Boot Repair afterwards but, when turning on the computer, the startup goes directly to Windows and not GRUB. I can still acess GRUB through the UEFI on Boot Options or as an option to restart using a device in Advanced Restart (pressing Shift while clicking Restart on Windows).
I disabled Fast Boot, Legacy Support and Secure Boot.
This is after using MX Tool Boot Repair
$ sudo efibootmgr
BootCurrent: 0001
Timeout: 5 seconds
BootOrder: 0001,0000,3000,2001,2002,2003
Boot0000* Windows Boot Manager
Boot0001* MX18.1
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3000* Internal Hard Disk or Solid State Disk
Boot3001* Internal Hard Disk or Solid State Disk
Boot3002* Internal Hard Disk or Solid State Disk
and after a restart
BootCurrent: 0001
Timeout: 5 seconds
BootOrder: 0000,3000,0001,2001,2002,2003
Boot0000* Windows Boot Manager
Boot0001* MX18.1
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3000* Internal Hard Disk or Solid State Disk
Boot3001* Internal Hard Disk or Solid State Disk
Boot3002* Internal Hard Disk or Solid State Disk
What can I try next to overwrite Windows Boot Manager?
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 10, 2019 5:37 pm
by fehlix
With some UEFI firmeware you cannot do much, as it always try to boot into Windows first.
But there is still hope : One easy way which I would try fist is this one.
Windows does place two EFI-boot loaders on the ESP (EFI System partition)
Its official own Boot loader:
ESP-Partion: : /EFI/Microsoft/bootmgfm.efi
and a 2nd one:
under the so called EFI-fallback bootloader:
ESP-Partion: : /EFI/BOOT/bootx64.efi
Some UEFI firmware re-reading or ignoring the internal stored
boot order, when Microsoft is not first or something have changed and
do rescan the /EFI-directories and do choose very often to start the EFI-fallback loader
So you could try to first re-name (so you have a backup)
/EFI/BOOT/bootx64.efi to /EFI/BOOT/bootx64.efi.Windows
and
than copy
/EFI/MX18.1/grubx64.efi to /EFI/BOOT/bootx64.efi
With some luck you are in business, again ;=), as UEFI firmware might now boot directly into MX Linux.
Another way you might also try:
There are some other efibootmgr tricks, but all depends on the UEFI firmware of the device.
You could also try to NOT change the boot order with efibootmgr,
but instead "de-activating" the first Windows entry, but such that it still
stays on first boot position. As this might not trigger UEFI-firmware reordering.
But the deactivated "Windows" entry get ignored during UEFI-boot and next MX18.1 is choosen to boot into.
Good Luck.
HTH

Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 10, 2019 7:38 pm
by Stevo
Some machines also require you to go into the "BIOS" and add the MX grub efi file to the list of trusted boot files--the Acer I have, for example. Can you tell us the make and model of yours?
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 10, 2019 9:52 pm
by Pierre
sometimes you do have to overwrite that file: /EFI/Microsoft/bootmgfm.efi in the location of /EFI/BOOT/bootx64.efi
with the other file - thus: /EFI/BOOT/grubx64.efi
- - which is what
fehlix has stated.
and you may have to do that file manipulation, with your Linux Live media - - due to permission issues.

Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 4:34 am
by noClue
The easiest way to solve the multiboot problems is still:
https://neosmart.net/EasyBCD/
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 5:20 am
by JayM
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 6:20 am
by GuiGuy
It is closed source, but free to download for non-commercial use.
And in my experience it works well.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 8:01 am
by fehlix
OP asked for dual boot on UEFI. EasyBCD is good on BIOS(legacy) booting, but limited on EFI booting.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 1:24 pm
by noClue
https://neosmart.net/wiki/easybcd/uefi/
Option 3: Use GRUB2 EFI as your main boot manager
EasyBCD controls the Windows boot menu, and has traditionally been used as the primary boot manager. With EasyBCD, it is possible to add entries for Linux and older versions of Windows to the top-level BCD menu seen when your machine first boots. Since the Windows boot manager running in UEFI mode does not support the loading of legacy and non-Microsoft operating systems, another option is possible.
When installing Linux or any other 3rd party OS that ships with its own bootloader, instead of choosing to install GRUB to the bootsector as is traditionally done when opting to use EasyBCD to control your boot menu, choose to install GRUB to the MBR (or disk, in this case) and make it the main bootloader for your PC. You can add the Windows boot menu to the GRUB2 EFI boot menu – in this case, you’ll see GRUB’s boot menu when your PC starts, and from there you can choose Windows. You can still use EasyBCD to control the Windows boot menu and set up multi-boots and re-configure Vista+ entries in the BCD boot menu, but with the GRUB2 EFI menu loading first, you can use that to boot into Linux and to chainload NTLDR to boot into Windows 9x.
How well does it do it, I don't know -- I'm disabling UEFI wherever possible.
However, the main point about it is, no matter what OS boots, you have a possibility to fix it out of the OS in which you could boot.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 1:35 pm
by fehlix
noClue wrote: Fri Mar 15, 2019 1:24 pm
How well does it do it, I don't know -- I'm disabling UEFI wherever possible.
You need read it cearefully - twice. It just says GRUB2 EFI, which is not part of their offering.
EasyBCD is a nice build around BCD and GRUB, kind of. Internally it uses grub4dos to boot into grub2 for bios by chainloading from grub4dos into GRUB2 (bios). It was and still is very good to help to understand and use BCD and to boot into other os.
And yes UEFI, is a bit more complex, and can lead to booting issues... but in the end there is always hope ...

Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 2:20 pm
by noClue
As I've said before, I don't really know very much about it since Mint uses Ubuntu signed UEFI Boot-Loader and since I'm disabling UEFI on each and every of my own computers before the very fist boot.
I've used it only 2 ~ 3 times and if I remember correct, it would bring up a list with all bootloaders it could find. One could set it up so that Windows sees them.
It really doesn't matter if the Grub boots Windows or the Windows shows Grub to boot Linux.
I only remember, I could rescue those computers with its help.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 2:23 pm
by Sparky
try either the escape key or F12, it should take you to the startup manager of the BIOS and select which you want to boot.
Alternatively, enter BIOS the usual way and go to boot order and select Windoze as first boot
P.S. I just realized you said Mint, I'm not sure how it's done in Mint, but should be similar
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 15, 2019 7:34 pm
by Stevo
Could you at least give us the Quick System Info for the machine? Otherwise we're taking shots in the dark!
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 17, 2019 12:41 pm
by Morcelas
Stevo wrote: Fri Mar 15, 2019 7:34 pm
Could you at least give us the Quick System Info for the machine? Otherwise we're taking shots in the dark!
Sorry for the wait, here is the info:
Code: Select all
OS Name Microsoft Windows 10 Home
Version 10.0.17763 Build 17763
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Name DESKTOP-FV53VQ6
System Manufacturer Hewlett-Packard
System Model HP Pavilion 15 Notebook PC
System Type x64-based PC
System SKU F4V91EA#AB9
Processor Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s)
BIOS Version/Date Insyde F.72, 3/9/2018
SMBIOS Version 2.7
Embedded Controller Version 29.66
BIOS Mode UEFI
BaseBoard Manufacturer Hewlett-Packard
BaseBoard Product 2166
BaseBoard Version 29.42
Platform Role Mobile
Secure Boot State Off
PCR7 Configuration Binding Not Possible
Windows Directory C:\WINDOWS
System Directory C:\WINDOWS\system32
Boot Device \Device\HarddiskVolume2
Locale Portugal
Hardware Abstraction Layer Version = "10.0.17763.194"
User Name DESKTOP-FV53VQ6\Casa
Time Zone GMT Standard Time
Installed Physical Memory (RAM) 8.00 GB
Total Physical Memory 7.78 GB
Available Physical Memory 5.35 GB
Total Virtual Memory 9.65 GB
Available Virtual Memory 6.99 GB
Page File Space 1.88 GB
Page File C:\pagefile.sys
Kernel DMA Protection Off
Virtualization-based security Not enabled
Device Encryption Support Reasons for failed automatic device encryption: TPM is not usable, PCR7 binding is not supported, Hardware Security Test Interface failed and device is not InstantGo, Un-allowed DMA capable bus/device(s) detected, TPM is not usable
Hyper-V - VM Monitor Mode Extensions Yes
Hyper-V - Second Level Address Translation Extensions Yes
Hyper-V - Virtualization Enabled in Firmware No
Hyper-V - Data Execution Protection Yes
fehlix wrote: Sun Mar 10, 2019 5:37 pm
With some UEFI firmeware you cannot do much, as it always try to boot into Windows first.
But there is still hope : One easy way which I would try fist is this one.
Windows does place two EFI-boot loaders on the ESP (EFI System partition)
Its official own Boot loader:
ESP-Partion: : /EFI/Microsoft/bootmgfm.efi
and a 2nd one:
under the so called EFI-fallback bootloader:
ESP-Partion: : /EFI/BOOT/bootx64.efi
Some UEFI firmware re-reading or ignoring the internal stored
boot order, when Microsoft is not first or something have changed and
do rescan the /EFI-directories and do choose very often to start the EFI-fallback loader
So you could try to first re-name (so you have a backup)
/EFI/BOOT/bootx64.efi to /EFI/BOOT/bootx64.efi.Windows
and
than copy
/EFI/MX18.1/grubx64.efi to /EFI/BOOT/bootx64.efi
With some luck you are in business, again ;=), as UEFI firmware might now boot directly into MX Linux.
Another way you might also try:
There are some other efibootmgr tricks, but all depends on the UEFI firmware of the device.
You could also try to NOT change the boot order with efibootmgr,
but instead "de-activating" the first Windows entry, but such that it still
stays on first boot position. As this might not trigger UEFI-firmware reordering.
But the deactivated "Windows" entry get ignored during UEFI-boot and next MX18.1 is choosen to boot into.
Good Luck.
HTH
The closest I have to a \EFI folder is C:\Windows\Boot\EFI with bootmgfw.efi and bootmgr.efi files and searching for bootx64.efi, grubx64.efi or MX18.1 turns up nothing
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 17, 2019 1:36 pm
by fehlix
Morcelas wrote: Sun Mar 17, 2019 12:41 pm
The closest I have to a \EFI folder is C:\Windows\Boot\EFI with bootmgfw.efi and bootmgr.efi files and searching for bootx64.efi, grubx64.efi or MX18.1 turns up nothing
Better look from MX Live booted, as from within booted Windows you might not see the ESP-partition.
As Window tend to hide the boot partitions as they also do for their system partitions.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 17, 2019 3:53 pm
by Head_on_a_Stick
It should be possible to instruct Windows to boot the MX .efi loader by running this command from an Administrator prompt in Powershell:
Code: Select all
bcdedit /set "{bootmgr}" path "\EFI\MX18.1\grubx64.efi"
More here:
https://wiki.archlinux.org/index.php/Un ... boot_order
Renaming the MX .efi loader to bootmgfw.efi should also work but I think Windows may "correct" this after a major update.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Sun Mar 17, 2019 5:33 pm
by fehlix
Head_on_a_Stick wrote: Sun Mar 17, 2019 3:53 pm
It should be possible to instruct Windows to boot the MX .efi loader by running this command from an Administrator prompt in Powershell:
Code: Select all
bcdedit /set "{bootmgr}" path "\EFI\MX18.1\grubx64.efi"
More here:
https://wiki.archlinux.org/index.php/Un ... boot_order
Renaming the MX .efi loader to bootmgfw.efi should also work but I think Windows may "correct" this after a major update.
Very, good. Yes, using windows own bootmgr to chainload into grub's efi-bootloader, is good alternative.
Would not recommend replacing Windows bootmgfw.efi with mx-grubx64.efi. Alternatively placing mx-grubx64.efi
into as default efi-fallback into /EFI/BOOT/bootx64.efi.
A more robust way for non-secure boot is probably to use rEFInd bootmanager anyway,
which scans during startup all available efi-bootloader.
This all in addition to sort out UEFI's own bootable entries within UEFI-setup and/or in addition with linux efibootmgr.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 22, 2019 12:58 pm
by Head_on_a_Stick
fehlix wrote: Sun Mar 17, 2019 5:33 pm
Would not recommend replacing Windows bootmgfw.efi with mx-grubx64.efi. Alternatively placing mx-grubx64.efi
into as default efi-fallback into /EFI/BOOT/bootx64.efi.
Unfortunately, some UEFI implementations are so broken that they will only boot $ESP/EFI/Microsoft/Boot/bootmgfw.efi
More on this on the rEFInd author's web site:
https://www.rodsbooks.com/efi-bootloade ... ive-naming
In a dual-boot situation it is possible to rename Windows' bootmgfw.efi and then use the
chainloader directive in GRUB to start it.
Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 22, 2019 1:35 pm
by fehlix
Head_on_a_Stick wrote: Fri Mar 22, 2019 12:58 pm
Unfortunately, some UEFI implementations are so broken that they will only boot $ESP/EFI/Microsoft/Boot/bootmgfw.efi
Yes, understand and a valid point. As not all UEFI'S do have this limitations would regard this as last resort, otherwise the OP might even get blocked to boot into WinOS. So recommend to try other things first. E.g in addtion to rEFInd create a grub-rescue iso, or chainloading from booted LiveUSB into the install MXlinux and try to sort this through this way.
In addtion one limitation is always secure boot has to be disabled.
But of course if that would be the only way, the rename could also reverted using LiveUSB if needed.

Re: Win10 and MX dual boot - startup goes directly to Windows
Posted: Fri Mar 22, 2019 2:49 pm
by Stevo
Since it's using an Insyde "BIOS" like those Acers that have the same problem, I have to wonder if the same workarounds are necessary:
viewtopic.php?f=23&t=49009