You are not logged in.

#1 2017-01-03 00:39:34

MysteriesOfPsy
Member
Registered: 2016-11-18
Posts: 26

Add Windows boot to GRUB

Hi everyone!

I have OS-PROBER installed but not work hmm

I try this https://wiki.archlinux.org/index.php/GR … menu_entry 
but I get this error:

 [root@arch anubis]# grub-probe --target=fs_uuid $esp/EFI/Microsoft/Boot/bootmgfw.efi
grub-probe: error: failed to get canonical path of `/EFI/Microsoft/Boot/bootmgfw.efi'. 

fdisk:

 anubis ~/ $  sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 8777FB47-4823-45A7-9F31-0C723C7E9B72

Device         Start       End   Sectors   Size Type
/dev/sda1       2048      6143      4096     2M BIOS boot
/dev/sda2       6144   4200447   4194304     2G Linux swap
/dev/sda3    4200448 763711487 759511040 362.2G Linux filesystem
/dev/sda4  763711488 764325887    614400   300M Windows recovery environment
/dev/sda5  764325888 764530687    204800   100M EFI System
/dev/sda6  764530688 764792831    262144   128M Microsoft reserved
/dev/sda7  764792832 975849471 211056640 100.7G Microsoft basic data
/dev/sda8  975849472 976773119    923648   451M Windows recovery environment

Thanks to all smile

Offline

#2 2017-01-03 08:54:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Add Windows boot to GRUB

You aren't supposed to literally copy the $esp variable and instead replacing it with your own path (if you installed GRUB into your efi system partition and mounted /boot there, that would be /boot ). and since there is a BIOS boot part for some reason, are you sure your linux and grub are installed in UEFI mode? This won't work if they aren't.

Offline

#3 2017-01-04 01:41:12

MysteriesOfPsy
Member
Registered: 2016-11-18
Posts: 26

Re: Add Windows boot to GRUB

How to find my $esp?

Sorry, I have little knowledge with linux xD

Offline

#4 2017-01-04 07:50:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Add Windows boot to GRUB

MysteriesOfPsy wrote:
/dev/sda5  764325888 764530687    204800   100M EFI System

How did you install Arch? This is very basic stuff that you should know if you managed to install it.

In any case read https://wiki.archlinux.org/index.php/Un … _Interface and by extension https://wiki.archlinux.org/index.php/EF … _Partition

Offline

#5 2017-01-17 01:21:11

MysteriesOfPsy
Member
Registered: 2016-11-18
Posts: 26

Re: Add Windows boot to GRUB

Hey man, i'm trying to add the boot manually on /etc/grub.d/40_custom:

menuentry 'Windows' --class windows {
    insmod part_gpt    
    insmod ntfs
    set root=(hd0,gpt5)     
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

but, I get this error: Invalid Signature..

can help me? Thanks a lot!

@edit: I think my Arch was installed in legacy mode, but windows in UEFI mode.

Last edited by MysteriesOfPsy (2017-01-17 01:29:01)

Offline

#6 2017-01-17 03:25:39

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: Add Windows boot to GRUB

which version of windows you are using, and how did you end up with two different boot partitions? or How did you install arch and windows, which one first? Did you have working windows before you installed arch or you installed windows after installing arch in legacy mode. (I guess the later is true, as arch was legacy windows created it's own EFI partition). Can you choose which boot partition to use from bios?

Offline

#7 2017-01-18 01:11:25

MysteriesOfPsy
Member
Registered: 2016-11-18
Posts: 26

Re: Add Windows boot to GRUB

I'm using Windows 8.1 and I installed windows after arch.
Yes, I can choose on bios to load windows or arch.

Offline

#8 2017-01-18 03:10:04

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: Add Windows boot to GRUB

So I think you need to install windows first, followed by instllation of arch in EFI mode, using the same EFI partition for bootloader installation. Installing windows after arch is usually not recommnded as it overwrites EFI.
or you can continue choosing your os from bios

Last edited by Docbroke (2017-01-18 03:13:00)

Offline

#9 2017-01-18 14:37:10

MysteriesOfPsy
Member
Registered: 2016-11-18
Posts: 26

Re: Add Windows boot to GRUB

Docbroke wrote:

So I think you need to install windows first, followed by instllation of arch in EFI mode, using the same EFI partition for bootloader installation. Installing windows after arch is usually not recommnded as it overwrites EFI.
or you can continue choosing your os from bios

Yeah, I cannot boot two operating systems (OSs) from the same storage device with two different boot firmwares  ;/
Thanks anyway!

Offline

#10 2017-01-18 15:38:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Add Windows boot to GRUB

Yes you cannot do that, you should properly install GRUB in UEFI mode. Everything you need to know  on how to do that is in the very wiki you yourself linked to.

Offline

Board footer

Powered by FluxBB