You are not logged in.

#1 2016-12-18 09:29:06

Hamsterkill
Member
Registered: 2009-05-05
Posts: 67

[SOLVED] Dualboot:Grub install messes up Windows, Windows removes Grub

So I have a Windows 10 laptop I've installed Arch on as a dual boot system. It's got an MBR disk and runs on a BIOS.

When I installed Grub during Arch installation, it rendered Windows 10 unable to boot. When it tries to boot Windows I get an error from bootmgr.

Status: 0xc000000f

Info: The boot selection failed because a required device is inaccessible

If I use my Win10 media to try to repair it, I can, but only by issuing a "bootrec /fixmbr" which obviously blows away Grub. I then try to reinstall Grub only to have the same thing happen.

The Windows section of my grub.cfg in /etc/grub.d/40_custom:

if [ "${grub_platform}" == "pc" ]; then
  menuentry "Windows 10" {
    insmod part_msdos
    insmod ntfs
    insmod search_fs_uuid
    insmod ntldr     
    search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 MY_UUID
    ntldr /bootmgr
  }
fi

Grub installs successfully without errors.

Help? I've never had this happen when installing on this laptop, though this is the first time I've tried with Windows >7.

Last edited by Hamsterkill (2016-12-20 02:15:02)

Offline

#2 2016-12-19 15:44:42

darthearon
Member
Registered: 2014-04-01
Posts: 24

Re: [SOLVED] Dualboot:Grub install messes up Windows, Windows removes Grub

is it possible that windows 10 is installed with UEFI mode and arch isn't?


Cya At The Table

Offline

#3 2016-12-19 16:49:41

Hamsterkill
Member
Registered: 2009-05-05
Posts: 67

Re: [SOLVED] Dualboot:Grub install messes up Windows, Windows removes Grub

darthearon wrote:

is it possible that windows 10 is installed with UEFI mode and arch isn't?

No, it's not a UEFI system.

Offline

#4 2016-12-19 16:51:41

darthearon
Member
Registered: 2014-04-01
Posts: 24

Re: [SOLVED] Dualboot:Grub install messes up Windows, Windows removes Grub

ah, thank you. sorry about that


Cya At The Table

Offline

#5 2016-12-19 20:42:29

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Dualboot:Grub install messes up Windows, Windows removes Grub

Have you tried to chainload the Windows bootloader from grub (something like this, see the wiki)

menuentry "Windows 10" {
set root=(hdX,Y)
chainloader +1
boot
}

This is the proper way to boot another operating system. The protocol to boot Windows vary from version to version. It is the OS job to boot itself correctly. I have never understood why the grub folk insists they know better than Windows how to boot it.

Last edited by olive (2016-12-19 20:48:27)

Offline

#6 2016-12-20 02:11:50

Hamsterkill
Member
Registered: 2009-05-05
Posts: 67

Re: [SOLVED] Dualboot:Grub install messes up Windows, Windows removes Grub

olive wrote:

Have you tried to chainload the Windows bootloader from grub (something like this, see the wiki)

menuentry "Windows 10" {
set root=(hdX,Y)
chainloader +1
boot
}

This is the proper way to boot another operating system. The protocol to boot Windows vary from version to version. It is the OS job to boot itself correctly. I have never understood why the grub folk insists they know better than Windows how to boot it.

Huh. I tried chainloading the System Reserved partition (with bootmgr) and got the same result. However, chainloading the real Windows partition seems to work fine. Weird how everything I've seen has recommended going the other way and using ntldr to *avoid* chainloading. Oh well, whatever works, I guess. Thanks!

Last edited by Hamsterkill (2016-12-20 02:12:13)

Offline

#7 2016-12-20 08:16:41

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Dualboot:Grub install messes up Windows, Windows removes Grub

The advice to avoid chainloading usually come from the Grub folks (or at least indirectly from people they have succeeded to convince) that want we use their tool. But it was never intended by Windows to boot it that way and the precise protocol varies from version to version.  That can't be reliable.  By chainloading we emulated the default Windows installation where the mbr chainloads the active partition (which Windows set as its own).

Note that on UEFI system, the proper way is indeed to chainload (executes) bootmgfw.efi and this is what the firmware do on a default Windows installation.

Last edited by olive (2016-12-20 08:17:27)

Offline

Board footer

Powered by FluxBB