[SOLVED] Dual Booting with GRUB doesn't work

Hello, I first installed Windows 10 and after that ArchLabs v.2018.07 (latest). My Laptop is running on UEFI mode. However, when installing ArchLabs, I picked GRUB and pointed /boot to the EFI partition that was made by Windows beforehand (it made 3 partitions: Windows Data, Windows reserved and System EFI Partition). However, GRUB doesn’t seem to recognize Windows 10 after install, neithee does os-probe, update-grub or grub configurator help. It seems like the bootloader from windows got wiped from the partition (I did NOT reformat the partition).

I read on ArchForums the following:

β€œrEFInd and systemd-boot autodetect Windows Boot Manager (\EFI\Microsoft\Boot\bootmgfw.efi) and show it in their boot menu automatically. For GRUB follow GRUB#Windows installed in UEFI/GPT Mode menu entry.”

I checked during install and the /boot environment does not contain that file.

It is really weird, since GRUB shouldn’t mess with the windows bootloader. Even during install the installer suggests to pick GRUB as it is claimed to be more β€œmultiboot friendly”.

1 Like

Greetings @MuradTroll and welcome to the forum, I’m sorry you’re having trouble. I’m not a Win user but what size ESP (UEFI partition) did you create and what flag(s) if any applied to it? See below my drive’s schematic /dev/sda1 being my esp.

ArchLabs_2018-08-12-09_3840x1080

1 Like

hi @MuradTroll glad you’re here in our little forum. Sorry you’re having issues with dual booting. I also dual boot with windows 10. The following may help you. Near the bottom of the page may give you some ideas:

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwipmezf5e3cAhVQ71QKHaijAfUQFjACegQIBhAK&url=http%3A%2F%2Ftech.memoryimprintstudio.com%2Fdual-boot-installation-of-arch-linux-with-preinstalled-windows-10-with-encryption%2F&usg=AOvVaw1CngRvDVCEsslrAG19hfP-

Hope this works for you man. I also think @anon37345411 has a valid solution as well.

1 Like

From what I gather you have run

grub-mkconfig -o /boot/grub/grub.cfg

This still fails to find the windows bootloader?

Is the windows partition mounted?

Do you have a folder like /boot/efi/EFI/Microsoft or similar?

Friendly in the sense that you don’t have to edit text files for multiboot to work, the others are fully capable of it, just you will need to add the boot entries to the boot config yourself.

I had a similar issue (Unable to start USB ISO, Watchdog CPU lockup).

As far as I understand you are saying that there is no bootmgfw.efi file on the efi partition anymore. Same happened to me although I did not format the drive during install either.
If that is the case, I recommend you read through my posts in the thread I linked above, I describe how to reset the win efi bootmgfw.efi with a recovery medium, afterwards just boot arch and run the command natemaia mentioned (grub mkconfig -o /boot/grub/grub.cfg -> should give you an output like β€œwindows boot loader found under […]”).

Hope it works.

Wow, it really stuns me how active the community is, a big plus from my side.

I have 3 partitions created from W10, my efi partition is sda2 with 100MB, all in total taking 180GB on my SSD and one additional created during archlabs install with the rest of the available memory (60GB). The important things are
a) Yes, Windows made the efi partition automatically vfat/fat32, so I doubt that is the problem
b) while at the install step β€œpartition drive”, I was asked to locate the mountpoint for /boot. I used the EFI-Partition that was created by W10, that should be right (right?). Obviously I skipped the formating. I picked this partition because my intuition told me that grub will possibly detect the windows files on there and manage everything on it’s own.

@natemaia

IIRC I ran that command too, post install while desperately trying to fix this issue, but still it didn’t find W10. Also regarding to the multiboot simplicity, on the link I provided the Arch Forum claims that rEFInd as well as systemd-boot are capable of finding the bootmgfw.efi (on their own, altough I didn’t try yet).

I did a fresh W10 install now, because I want to investigate what exactly SHOULD be in the boot partition. When I install archlabs with grub, there is no bootmgfw.efi left, the only thing W10 related is a folder /Microsoft/Recovery/ and inside some backup files if I remember corretly.

Two possible workarounds that popped into my mind could be
a) try systemd and pray that it works
b) create yet another fresh partition and install grub there, and don’t touch the efi partition windows created
c) in the live usb install environment try running os-prober and friends to test if W10 gets detected, and only then proceed the installation

but I don’t know if this will lead to more problems. Furthermore, this seems to me more like a workaround, rather than a fix.

@xsme
Which leads me to my final question: now I want to install archlabs yet again, what are the procedures for a workaround, to detect W10. Do I have to install archlabs and wipe the windows bootloader again, and then try your workaround? Or should I edit something during install? All in all this seems weird, it is okay for grub to not be able to detect windows at first, I have archlabs on my secondary PC and it didn’t detect it too at first. But wiping the existing .efi file is kind of weird, no wonder that os-prober, update-grub, etc. can’t find a windows bootloader to chainload (because there isn’t one).

Also side note, I loaded the archlabs iso onto my usb stick with Rufus and picked MBR instead of GPT (or how it’s called). But that should not be the problem since my laptop still detects the USB and boots from it.

I booted into my Fresh W10 insall and mounted the EFI Partition to see what should be inside.

And I can confirm that after the grub Installation those files and Folders are not present in that way.

I also heard rumors that UEFI Systems don’t need a Bootloader in the first place, altough it would be good to get GRUB working.

I can not answer that question with certainty as I can not remember wiping the efi partition either and just like you I also still had some other files on it. I was not able to figure out yet what had been the problem exactly, sorry.
What I can recommend from my own experience is: Boot windows, make a recovery medium, install archlabs. If the same thing happens again and there is no bootmgfw.efi where is should be, restart and boot the recovery medium, go into command line mode, do bcdboot c:\windows or whatever drive windows is on. Reboot, windows should now be booting. Reboot, manually choose the grub boot loader in the boot menu and boot into archlabs. Run grub mkconfig -o /boot/grub/grub.cfg. After this, you should be all set.

Again, this is based on personal experience and this worked for me. I can not tell you why grub somehow messes with the windows boot loader files on the efi partition.

Good luck.

Would like to try this but to be honest, I don’t want to wipe my W10 Bootloader YET again. I think yesterday I installed windows + archlabs like 4 times in a succession… For me it would be better if I had instructions on how to install ArchLabs alongside Windows 10 now, since I already got a clean W10 with working Bootloader running. But before trying things and messing up again, I thought I’d better ask for an expert here. All I basically need to do is to tell GRUB β€œhey, there are some bootfiles from W10, specificaly bootmgfw.efi. Please don’t delete those, thanks”.

Well in your case there was really never a need to reinstall Windows… and neither Arch for that matter.
But sure, I hope someone can help you here. I’ll keep reading. Best of luck!

1 Like

Hmm, this is weird. You are basically installing the windows bootloader again after you installed grub, and it does work? How do you select grub after you installed windows bootloader (on the same 100Mb EFI partition)? Usually I would’ve expected quite the opposte: that Windows doesn’t care and overwrites grub. That’s why it is suggested to first innstall Windows and Linux afterwards, since Linux can detect (or in my case should have detected) Windows and chainload it.

Same as you choose your USB medium… in the boot menu (pressing ESC or F12 or whatever when booting). At least for me grub showed up and the bcdboot command did not affect grub.

GRUB will never overwrite anything on the EFI system partition and certainly not the Microsoft folder.

The ESP must have been formatted at some stage.

Does the ArchLabs installer keep a log? (I’ve never used it.)

EDIT: you should be backing up the contents of the ESP anyway, then you wouldn’t have to keep reinstalling.

1 Like

Create an additional EFI partition the usual way and instead of selecting the EFI partition created by Windows, use this one. After installing run the usual grub command to write its config, windows should be found at this point.

The installer can be run with -d/--debug to have pretty much everything logged to /tmp/debug-log by default output of stderr is logged to /tmp/errlog

If there is a Microsoft folder present on the partition then its obvious it was never formatted. To the best of my knowledge windows doesn’t even store the actual bootloader on the partition though this may have changed.

1 Like

It is likely that this is being overwritten.

To stop this from happening open the installer located at /installer/installer navigate to line 1946 and comment the line containing grub_uefi_fallback

Ah yes, of course, I missed that bit.

The Windows UEFI loader is stored on the ESP at EFI/Microsoft/Boot/bootmgfw.efi

This is confusing to me. In theory I agree with what you say, @Head_on_a_Stick, but how is it that OP and me both had the same issue - which is a missing bootmgfw.efi without actually formatting the efi partition? If what you say is correct and grub never overwrites anything… then… how?

This was along the path of my thoughts last night, sorry had to shut down (bad weather here).

Don’t be so quick to dismiss this. Despite not using windows, β€˜I’ve’ read several times… Windows recommends and will make a 100mb ESP but β€˜I’ve’ also read (as a rule of thumb), to add 100mb for each additional system installed.

Additionally, I posted a gparted schematic of my drive to point out the flags applied to my ESP. Without these flags, β€˜my’ ArchLabs system won’t boot by UEFI on this desktop.

My mistake, I could’ve sworn I’ve read it somewhere but probably just got some wires crossed