You are not logged in.

#1 2019-12-22 18:18:05

solstice
Member
Registered: 2006-10-27
Posts: 204
Website

Windows 10 fails to boot with GRUB/systemd-boot

Hi.
So I shuffled everything on my laptop, migrating from Ubuntu to Archlinux, and reinstalling Windows 10 on the HDD (2nd drive).

The issue I have is that Windows fails to boot when I use GRUB to do so. Windows fails with an error like 0xC00000E, not finding winload.efi or other files.
It seems obvious to me that GRUB swaps (randomly ?) the 2 drives (1st is the SSD, 2nd is the HDD in a caddy in DVD tray slot) at each boot. I can see that in archlinux, where the 2 drives are either sda-sdb or vice-versa.

For windows to boot correctly I can use the UEFI boot menu and choose "Windows Boot Manager".

So to sum it up:
UEFI -> GRUB -> Windows KO
UEFI -> [UEFI Boot menu ->] Windows OK

I would prefer to use GRUB to boot Windows. How can I fix that ?

I didn't get issue while using the GRUB of Ubuntu (but I don't boot windows often).
grub-mkdevicemap seems to be gone.

Last edited by solstice (2020-01-07 18:49:18)

Offline

#2 2019-12-22 18:54:44

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,600

Re: Windows 10 fails to boot with GRUB/systemd-boot

Do you have an EFI partition on each drive or just on one of them? You should only have one.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-12-22 19:38:11

solstice
Member
Registered: 2006-10-27
Posts: 204
Website

Re: Windows 10 fails to boot with GRUB/systemd-boot

Yes. i have only one ESP.

Sorry, here is the full setup:

# lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT,PARTTYPE,PARTFLAGS
NAME            SIZE FSTYPE      MOUNTPOINT                    PARTTYPE                             PARTFLAGS
sda           465,8G                                                                                
├─sda1           40M vfat                                      de94bba4-06d1-4d40-a16a-bfd50179d6ac 0x1
├─sda2           16M                                           e3c9e316-0b5c-4db8-817d-f92df00215ae 
├─sda3         63,5G ntfs                                      ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 
├─sda4        226,5G crypto_LUKS                               0fc63daf-8483-4772-8e79-3d69d8477de4 
│ └─VMs       226,5G xfs         /home/solstice/VirtualBox VMs                                      
├─sda5         19,3G crypto_LUKS                               0fc63daf-8483-4772-8e79-3d69d8477de4 
├─sda6          256M ext4                                      0fc63daf-8483-4772-8e79-3d69d8477de4 
└─sda7         29,3G                                           e6d6d379-f507-44c2-a23c-238f2a3df928 
sdb           223,6G                                                                                
├─sdb1          100M vfat        /efi                          c12a7328-f81f-11d2-ba4b-00a0c93ec93b 
├─sdb2           16M                                           e3c9e316-0b5c-4db8-817d-f92df00215ae 
├─sdb3          140M ext4        /boot                         0fc63daf-8483-4772-8e79-3d69d8477de4 
└─sdb4        223,3G crypto_LUKS                               0fc63daf-8483-4772-8e79-3d69d8477de4 
  └─arch      223,3G LVM2_member                                                                    
    ├─vg-swap     8G swap        [SWAP]                                                             
    └─vg-root 215,1G ext4        /      

Offline

#4 2019-12-22 20:14:20

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,600

Re: Windows 10 fails to boot with GRUB/systemd-boot

solstice wrote:

Yes. i have only one ESP.

Your output says otherwise, it looks like sda1 is your Windows ESP and sdb2 is your Arch ESP.
What happens if you use sda1 as your Arch ESP and reinstall the kernel and bootloader to it?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2019-12-22 20:22:26

solstice
Member
Registered: 2006-10-27
Posts: 204
Website

Re: Windows 10 fails to boot with GRUB/systemd-boot

no it is supposed to be a diagnotic partition (DIAGS) that came with the  DELL latptop. At least, there is no EFI file in there.

But I just noticed that efibootmgr just tells me that I have 2 "Windows Boot Manager" entries now. I am deleting the one pointing to a non existant partition and rebooting now.

I will report back if that change anything but I don't think so ...

Offline

#6 2020-01-07 14:39:45

Superfenix
Member
Registered: 2020-01-07
Posts: 2

Re: Windows 10 fails to boot with GRUB/systemd-boot

Slithery wrote:

Do you have an EFI partition on each drive or just on one of them? You should only have one.

Not necessarily. At the moment I have 2 EFI partitions into the same disk, to allow grub to chainload a Windows 10 that uses BitLocker. I agree with you that this is not a common situation, but is something that could be useful in some cases.

When having more than a EFI partition, you could choose which one should be used to boot from the BIOS



solstice wrote:

no it is supposed to be a diagnotic partition (DIAGS) that came with the  DELL latptop. At least, there is no EFI file in there.

But I just noticed that efibootmgr just tells me that I have 2 "Windows Boot Manager" entries now. I am deleting the one pointing to a non existant partition and rebooting now.

I will report back if that change anything but I don't think so ...

Probably GRUB is loading the old Windows Boot Manager, and that's why it fails to start. It's associated windows is gone

After removing the old one, execute again grub-mkconfig to let it add the correct one

Last edited by Superfenix (2020-01-07 14:42:09)

Offline

#7 2020-01-07 15:40:03

solstice
Member
Registered: 2006-10-27
Posts: 204
Website

Re: Windows 10 fails to boot with GRUB/systemd-boot

I did not report back because deleting the EFI entry, and using the other entry, changed nothing.

I am pretty sure, it is because the disk are swapped after grub before windows is handled the boot process.

When I skip grub, and use the EFI boot entry (Windows Boot Manager), Windows is able to boot without problem.

Offline

#8 2020-01-07 15:47:28

Superfenix
Member
Registered: 2020-01-07
Posts: 2

Re: Windows 10 fails to boot with GRUB/systemd-boot

solstice wrote:

I did not report back because deleting the EFI entry, and using the other entry, changed nothing.

I am pretty sure, it is because the disk are swapped after grub before windows is handled the boot process.

When I skip grub, and use the EFI boot entry (Windows Boot Manager), Windows is able to boot without problem.

Did you remove the EFI entry from the grub.cfg file or did you remove the partition and its content from the disk?

Grub gives no instruction to the windows loader about how it should run or the name of each device. That is something that the loader manages by itself. That leads me to think that you are entering the old windows loader instead of the new one. If you achieve to make your grub detects (generating the /boot/grub/grub.cfg) your newest windows EFI partition, I'm pretty sure it will run as it does when you select it directly from BIOS.

My recommendation is that you try to delete any remain from the old windows before trying to repair grub. Also, it should be enough to run grub-mkconfig, not requiring you to modify any config file by hand.

Offline

#9 2020-01-07 15:56:09

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,097
Website

Re: Windows 10 fails to boot with GRUB/systemd-boot

@OP: post your grub.cfg, this guessing game is boring me. And the full `efibootmgr -v` output, vague descriptions of command output don't really help and may confuse the issue.

Offline

#10 2020-01-07 16:30:33

solstice
Member
Registered: 2006-10-27
Posts: 204
Website

Re: Windows 10 fails to boot with GRUB/systemd-boot

That original post is 3 week old.

In the mean time, I switched to systemd-boot hoping a better outcome. It is exactly the same.
Meaning if I boot the Windows entry in systemd-boot, wndows fails to boot. If I use the EFI menu entry in the EFI boot, Windows boot fine.

$ efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0004,2001
Boot0000* UEFI Onboard LAN IPv6	PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(112233445566,0)/IPv6([::]:<->[::]:,0,0)RC
Boot0001* UEFI Onboard LAN IPv4	PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(112233445566,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot0002* EFI USB1 PATH1 (WD      Elements 1042)	PciRoot(0x0)/Pci(0x14,0x0)/USB(5,0)/HD(2,GPT,8703e93a-69cf-4425-8c77-9721cb76f9c7,0x18be7000,0x40000)RC
Boot0003* Linux Boot Manager	HD(1,GPT,8b6fe7e7-1711-4aec-9cc8-f382d3f97a52,0x800,0x78000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0004* Windows Boot Manager	HD(1,GPT,8b6fe7e7-1711-4aec-9cc8-f382d3f97a52,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.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.}...I................
Boot2001* EFI USB Device	RC

So I don't have a grub.cfg anymore, you don't have to guess. and  systemd-boot configuration is rather scarce or non verbose

 $ cat /boot/loader/loader.conf 
#timeout 3
#console-mode keep
default arch
auto-firmware yes
auto-entries yes

the windows menu entry is auto-generated

Offline

#11 2020-01-07 17:00:07

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,097
Website

Re: Windows 10 fails to boot with GRUB/systemd-boot

What if you make your own entry for Windows?

# /boot/loader/entries/custom.conf
title Windows (custom)
efi /EFI/Microsoft/Boot/bootmgfw.efi

Does that work?

Offline

#12 2020-01-07 18:16:07

solstice
Member
Registered: 2006-10-27
Posts: 204
Website

Re: Windows 10 fails to boot with GRUB/systemd-boot

Still the same

Never mind. I can boot Windows by going into EFI boot menu and choose Windows Boot Manager....

Offline

Board footer

Powered by FluxBB