You are not logged in.

#1 2018-02-06 11:09:24

Cinbu
Member
Registered: 2016-12-27
Posts: 29

Dual Boot with Windows not working, bootmgfw.efi not found

Hello,

I try to get a dual boot with arch and windows 10 working, using GRUB as the bood loader.
Since os-prober didn't find the windows partition I added the windows entry myself, following the Arch Wiki entry of GRUB.

Arch is working fine, but when I try to boot Windows, I get this error right after choosing Windows in the GRUB menu:

 error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found 

The bootmgfw.efi file is in this directory: /boot/EFI/Microsoft/Boot/bootmgfw.efi

The grub.cfg file is in this directory: /boot/EFI/grub/grub.cfg

This is the windows entry in the grub.cfg:

if [ "${grub_platform}" == "efi" ]; then
	menuentry "Microsoft Windows Vista/7/8/8.1 UEFI-GPT" {
		insmod part_gpt
		insmod fat
		insmod search_fs_uuid
		insmod chain
		search --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 C675-4CC5
		chainloader /EFI/Microsoft/Boot/bootmgfw.efi
	}
fi

and this is my 40_custom file for grub:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "System shutdown" {
        echo "System shutting down..."
        halt
}

menuentry "System restart" {
        echo "System rebooting..."
        reboot
}

menuentry "Firmware setup" {
        fwsetup
}

if [ "${grub_platform}" == "efi" ]; then
	menuentry "Microsoft Windows Vista/7/8/8.1 UEFI-GPT" {
		insmod part_gpt
		insmod fat
		insmod search_fs_uuid
		insmod chain
		search --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 C675-4CC5
		chainloader /EFI/Microsoft/Boot/bootmgfw.efi
	}
fi

Here is my partition configuration

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
├─sda1   8:1    0   260M  0 part /boot/efi
├─sda2   8:2    0    16M  0 part 
├─sda3   8:3    0  65.8G  0 part 
├─sda4   8:4    0 146.5G  0 part /
├─sda5   8:5    0    25G  0 part 
└─sda6   8:6    0  1000M  0 part 

$ parted --list
Model: ATA SAMSUNG MZYTY256 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  274MB   273MB   fat32        EFI system partition          bios_grub
 2      274MB   290MB   16.8MB               Microsoft reserved partition  msftres
 3      290MB   70.9GB  70.6GB  ntfs         Basic data partition          msftdata
 4      70.9GB  228GB   157GB   ext4         Basic data partition          msftdata
 5      228GB   255GB   26.8GB  ntfs         Basic data partition          msftdata
 6      255GB   256GB   1049MB  ntfs         Basic data partition          hidden, diag

And the efibootmgr info:

 $ efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0002,2003,2001,2002
Boot0000* grub	HD(1,GPT,40e42dff-1daa-4dbd-91e0-236f87bbfdb0,0x800,0x82000)/File(\EFI\grub\grubx64.efi)
Boot0002* EFI Hard Drive (SAMSUNG MZYTY256HDHP-000L2)	PciRoot(0x0)/Pci(0x17,0x0)/Sata(0,0,0)/HD(1,GPT,40e42dff-1daa-4dbd-91e0-236f87bbfdb0,0x800,0x82000)RC
Boot0003* EFI Network 0 for IPv4 (FC-45-96-50-02-74) 	PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/MAC(fc4596500274,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot0004* EFI Network 0 for IPv6 (FC-45-96-50-02-74) 	PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/MAC(fc4596500274,0)/IPv6([::]:<->[::]:,0,0)RC
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot2003* EFI Network	RC

Any help would be great since I'm trying to fix this already for quite a while.

bootinfoscript

I found this script, I hope it could help

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => No boot loader is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    File system:       BIOS Boot partition
    Boot sector type:  Unknown
    Boot sector info: 

sda2: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: /tmp/BootInfo-eZQrYlcl/sda2: unknown filesystem type ''.

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Arch Linux ()
    Boot files:        /etc/fstab

sda5: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda6: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                   1   500,118,191   500,118,191  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           2,048       534,527       532,480 BIOS Boot partition
/dev/sda2         534,528       567,295        32,768 Microsoft Reserved Partition (Windows)
/dev/sda3         567,296   138,440,703   137,873,408 Data partition (Windows/Linux)
/dev/sda4     138,440,704   445,638,655   307,197,952 Data partition (Windows/Linux)
/dev/sda5     445,640,704   498,069,503    52,428,800 Data partition (Windows/Linux)
/dev/sda6     498,069,504   500,117,503     2,048,000 Windows Recovery Environment (Windows)

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        C675-4CC5                              vfat       SYSTEM_DRV
/dev/sda2                                                          
/dev/sda3        286E76706E7636A2                       ntfs       Windows
/dev/sda4        b0c31b50-c336-4e3e-866b-be816a2fa200   ext4       
/dev/sda5        889EA1809EA16800                       ntfs       LENOVO
/dev/sda6        2CEC7700EC76C39C                       ntfs       WINRE_DRV

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /boot/efi                vfat       (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda1        /boot                    vfat       (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda4        /                        ext4       (rw,relatime,data=ordered)


=============================== sda4/etc/fstab: ================================

--------------------------------------------------------------------------------
# /dev/sda4
UUID=b0c31b50-c336-4e3e-866b-be816a2fa200	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda1 LABEL=SYSTEM_DRV
#UUID=C675-4CC5      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

# Increase size of /tmp, only do that if some annoying installation process does not work
tmpfs /tmp tmpfs size=8G 0 0
UUID=C675-4CC5	/boot	vfat	defaults	0	2
UUID=C675-4CC5	/boot/efi	vfat	defaults	0	1
--------------------------------------------------------------------------------

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda1

00000000  eb 58 90 4d 53 44 4f 53  35 2e 30 00 02 08 fe 1b  |.X.MSDOS5.0.....|
00000010  02 00 00 00 00 f8 00 00  3f 00 ff 00 00 08 00 00  |........?.......|
00000020  00 20 08 00 01 02 00 00  00 00 00 00 02 00 00 00  |. ..............|
00000030  01 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  80 01 29 c5 4c 75 c6 4e  4f 20 4e 41 4d 45 20 20  |..).Lu.NO NAME  |
00000050  20 20 46 41 54 33 32 20  20 20 33 c9 8e d1 bc f4  |  FAT32   3.....|
00000060  7b 8e c1 8e d9 bd 00 7c  88 56 40 88 4e 02 8a 56  |{......|.V@.N..V|
00000070  40 b4 41 bb aa 55 cd 13  72 10 81 fb 55 aa 75 0a  |@.A..U..r...U.u.|
00000080  f6 c1 01 74 05 fe 46 02  eb 2d 8a 56 40 b4 08 cd  |...t..F..-.V@...|
00000090  13 73 05 b9 ff ff 8a f1  66 0f b6 c6 40 66 0f b6  |.s......f...@f..|
000000a0  d1 80 e2 3f f7 e2 86 cd  c0 ed 06 41 66 0f b7 c9  |...?.......Af...|
000000b0  66 f7 e1 66 89 46 f8 83  7e 16 00 75 39 83 7e 2a  |f..f.F..~..u9.~*|
000000c0  00 77 33 66 8b 46 1c 66  83 c0 0c bb 00 80 b9 01  |.w3f.F.f........|
000000d0  00 e8 2c 00 e9 a8 03 a1  f8 7d 80 c4 7c 8b f0 ac  |..,......}..|...|
000000e0  84 c0 74 17 3c ff 74 09  b4 0e bb 07 00 cd 10 eb  |..t.<.t.........|
000000f0  ee a1 fa 7d eb e4 a1 7d  80 eb df 98 cd 16 cd 19  |...}...}........|
00000100  66 60 80 7e 02 00 0f 84  20 00 66 6a 00 66 50 06  |f`.~.... .fj.fP.|
00000110  53 66 68 10 00 01 00 b4  42 8a 56 40 8b f4 cd 13  |Sfh.....B.V@....|
00000120  66 58 66 58 66 58 66 58  eb 33 66 3b 46 f8 72 03  |fXfXfXfX.3f;F.r.|
00000130  f9 eb 2a 66 33 d2 66 0f  b7 4e 18 66 f7 f1 fe c2  |..*f3.f..N.f....|
00000140  8a ca 66 8b d0 66 c1 ea  10 f7 76 1a 86 d6 8a 56  |..f..f....v....V|
00000150  40 8a e8 c0 e4 06 0a cc  b8 01 02 cd 13 66 61 0f  |@............fa.|
00000160  82 74 ff 81 c3 00 02 66  40 49 75 94 c3 42 4f 4f  |.t.....f@Iu..BOO|
00000170  54 4d 47 52 20 20 20 20  00 00 00 00 00 00 00 00  |TMGR    ........|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 0d 0a 44 69  |..............Di|
000001b0  73 6b 20 65 72 72 6f 72  ff 0d 0a 50 72 65 73 73  |sk error...Press|
000001c0  20 61 6e 79 20 6b 65 79  20 74 6f 20 72 65 73 74  | any key to rest|
000001d0  61 72 74 0d 0a 00 00 00  00 00 00 00 00 00 00 00  |art.............|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  ac 01 b9 01 00 00 55 aa  |..............U.|
00000200


=============================== StdErr Messages: ===============================

mdadm: No arrays found in config file or automatically

Last edited by Cinbu (2018-02-06 11:47:17)

Offline

#2 2018-02-06 18:09:32

shera10001
Member
Registered: 2018-01-23
Posts: 34

Re: Dual Boot with Windows not working, bootmgfw.efi not found

Hello. Please read this post - https://bbs.archlinux.org/viewtopic.php?id=233827 - I had the same problem, initially windows wasn't found, and when it was, then grub couldn't load the windows boot manager for some reason, so I couldn't boot into Windows. I was dualbooting in BIOS-MBR though, but you seem to be dual booting in UEFI-GPT mode. Try installing ntfs-3g after you arch-chroot in the system by

 pacman -S ntfs-3g 

then run os-prober and grub-mkconfig. Refer to this post, specifically to EDIT 4 and EDIT 5 to see how I solved my problem. Also, you have to mount your root partition to /mnt and the Windows partition where the windows boot manager is present, which in your case looks to be sda1, to /mnt/boot (mounting has to be done before arch-chrooting into the system) So

 mkdir /mnt/boot 

 mount /dev/sda1 /mnt/boot 

although it looks like you have already done it. You will have to use the live usb installation image to do all this, I am not sure if it can be done through the existing arch installation. The packages you isntalled will remain in the installed system though, you won't have to pacstrap again.

Also, your sda1 is being mounted twice it looks like. According to this post - https://bbs.archlinux.org/viewtopic.php?id=234225 - it may give problems. So in your /etc/fstab you will have to find out which entry to remove. I am not experienced with UEFI dualbooting, so I don't know if mountpoint for the windows boot partition should be /mount or /mount/efi but this information should be there in the wiki.

But honestly I think your windows partition will get detected by installing ntfs-3g and then installing os-prober, running os-prober, and running grub-mkconfig. My windows partition was detected after I installed ntfs-3g. Before that both os-prober and grub couldn't detect it. So try removing all the extra info you have added to grub configuration files (by simply commenting with a # before each line you have added). ntfs-3g should do the trick.

Last edited by shera10001 (2018-02-06 18:10:19)

Offline

Board footer

Powered by FluxBB