You are not logged in.

#1 2016-10-06 17:33:32

nicolassilvar
Member
From: Bogota
Registered: 2016-06-15
Posts: 23

GRUB EFI - Recover a Windows 10 partition

I installed my arch a couple of months ago, at that point I didnt pay much attention to include Windows 10 in my booting list (I thought I never needed to go back there). Sadly at work I need to run a windows program.

I installed grub in the windows booting partition (below partition table). I remeber struggling back when I install it to support EFI, I gave up and installed grub and made sure Arch was loading. Now I'm trying to untangle the mess. There are several resources out there, but I want to make sure I dont mess up my arch.

Resources I read:
https://wiki.archlinux.org/index.php/Du … th_Windows
https://bbs.archlinux.org/viewtopic.php?id=201037

Partition Table
1      1049kB  274MB  273MB   fat32        EFI system partition          boot, hidden, esp
2      274MB   290MB  16.8MB               Microsoft reserved partition  msftres
3      290MB   108GB  107GB   ntfs         Basic data partition          msftdata
5      108GB   123GB  15.3GB  ext4
6      123GB   255GB  132GB   ext4
4      255GB   256GB  1049MB  ntfs         Basic data partition          hidden, diag

boot folder contents:

/boot
├── EFI
│   ├── Boot
│   │   └── BOOTX64.EFI
│   ├── grub
│   │   └── grubx64.efi
│   └── systemd
│       └── systemd-bootx64.efi
├── grub
│   ├── fonts
│   ├── locale
│   ├── themes
│   │   └── starfield
│   └── x86_64-efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── loader
│   ├── entries
│   │   └── arch.conf
│   └── loader.conf
└── vmlinuz-linux

Under /boot/loader/arch.conf
title   Arch Linux
linux   /vmlinuz-limux
initrd  /initramfs-linux.img
options root=PARTUUID=  dca05a7c-bbb8-4097-949b-8e880ef9db12    rw

What are some suggestions for adding Windows 10 to the loader. I saw online some people using ms-sys to reinstall Windows MRB, but the docs online does not show Windows 10 support.

Any input appreciated

Last edited by nicolassilvar (2016-10-06 17:46:29)

Offline

#2 2016-10-06 18:05:11

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: GRUB EFI - Recover a Windows 10 partition

What is the output of

$ efibootmgr

Offline

#3 2016-10-06 18:15:59

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: GRUB EFI - Recover a Windows 10 partition

nicolassilvar wrote:

boot folder contents:

/boot
├── EFI
│   ├── Boot
│   │   └── BOOTX64.EFI
│   ├── grub
│   │   └── grubx64.efi
│   └── systemd
│       └── systemd-bootx64.efi
├── grub
│   ├── fonts
│   ├── locale
│   ├── themes
│   │   └── starfield
│   └── x86_64-efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── loader
│   ├── entries
│   │   └── arch.conf
│   └── loader.conf
└── vmlinuz-linux

Did you format the EFI system partition (/dev/sda1) during the installation  of Arch?

If your Windows system is UEFI then there should be /boot/Microsoft/Boot/bootmgfw.efi present, this is the Windows bootloader.

EDIT: sed 's/$ESP/\/boot/'

Last edited by Head_on_a_Stick (2016-10-06 18:16:52)

Offline

#4 2016-10-06 18:19:20

nicolassilvar
Member
From: Bogota
Registered: 2016-06-15
Posts: 23

Re: GRUB EFI - Recover a Windows 10 partition

loqs wrote:

What is the output of

$ efibootmgr

[nicolassilva@X1Carbon ~]$ efibootmgr
BootCurrent: 0017
Timeout: 2 seconds
BootOrder: 0013,000C,0017,0016,0015,0000,0001,0002,0003,0014,0007,0008,0009,000A,000B,000D
Boot0000  Setup
Boot0001  Boot Menu
Boot0002  Diagnostic Splash Screen
Boot0003  Lenovo Diagnostics
Boot0004  Startup Interrupt Menu
Boot0005  Rescue and Recovery
Boot0006  MEBx Hot Key
Boot0007* USB CD
Boot0008* USB FDD
Boot0009* ATA HDD0
Boot000A* ATA HDD1
Boot000B* ATA HDD2
Boot000C* USB HDD
Boot000D* PCI LAN
Boot000E* IDER BOOT CDROM
Boot000F* IDER BOOT Floppy
Boot0010* ATA HDD
Boot0011* ATAPI CD
Boot0012* PCI LAN
Boot0013* Windows Boot Manager
Boot0014* Linux Boot Manager
Boot0015* arch
Boot0016* grup
Boot0017* grub
[nicolassilva@X1Carbon ~]$

I changed the order, to put Windows Boot Manager first, but it defaults backs to arch. Makes me think there is nothing there to boot

Last edited by nicolassilvar (2016-10-06 18:22:19)

Offline

#5 2016-10-06 18:26:16

nicolassilvar
Member
From: Bogota
Registered: 2016-06-15
Posts: 23

Re: GRUB EFI - Recover a Windows 10 partition

Head_on_a_Stick wrote:
nicolassilvar wrote:

boot folder contents:

/boot
├── EFI
│   ├── Boot
│   │   └── BOOTX64.EFI
│   ├── grub
│   │   └── grubx64.efi
│   └── systemd
│       └── systemd-bootx64.efi
├── grub
│   ├── fonts
│   ├── locale
│   ├── themes
│   │   └── starfield
│   └── x86_64-efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── loader
│   ├── entries
│   │   └── arch.conf
│   └── loader.conf
└── vmlinuz-linux

Did you format the EFI system partition (/dev/sda1) during the installation  of Arch?

If your Windows system is UEFI then there should be /boot/Microsoft/Boot/bootmgfw.efi present, this is the Windows bootloader.

EDIT: sed 's/$ESP/\/boot/'

I feel bad to say that I dont remember if I format the partition or not. My best guess is that I did. I struggled quite a bit with the EFI booting back then. I was not able to locate the bootmgfw.efi

Offline

#6 2016-10-07 06:44:26

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: GRUB EFI - Recover a Windows 10 partition

nicolassilvar wrote:

I was not able to locate the bootmgfw.efi

Your Windows system cannot boot without that file.

I think you may be able to repair the Windows boot process but it's been a while since I last used that operating system big_smile

If you do, it will almost certainly re-format the ESP so you will have to re-install the kernel & bootmanager and regenerate the configuration files afterwards from the live environment to get Arch booting again.

Offline

#7 2016-10-07 21:54:30

nicolassilvar
Member
From: Bogota
Registered: 2016-06-15
Posts: 23

Re: GRUB EFI - Recover a Windows 10 partition

Head_on_a_Stick wrote:
nicolassilvar wrote:

I was not able to locate the bootmgfw.efi

Your Windows system cannot boot without that file.

I think you may be able to repair the Windows boot process but it's been a while since I last used that operating system big_smile

If you do, it will almost certainly re-format the ESP so you will have to re-install the kernel & bootmanager and regenerate the configuration files afterwards from the live environment to get Arch booting again.

Any chance that I can re-format inside of arch?

Offline

#8 2016-10-11 06:51:34

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: GRUB EFI - Recover a Windows 10 partition

nicolassilvar wrote:

Any chance that I can re-format inside of arch?

*Do not* re-format the ESP after Windows has repaired the bootloader (or after you have re-installed Windows), that is what caused the problem in the first place.

The bootmgfw.efi file must be present on the ESP for Windows to work.

Offline

#9 2016-10-17 01:50:32

nicolassilvar
Member
From: Bogota
Registered: 2016-06-15
Posts: 23

Re: GRUB EFI - Recover a Windows 10 partition

Head_on_a_Stick wrote:
nicolassilvar wrote:

Any chance that I can re-format inside of arch?

*Do not* re-format the ESP after Windows has repaired the bootloader (or after you have re-installed Windows), that is what caused the problem in the first place.

The bootmgfw.efi file must be present on the ESP for Windows to work.

I access the Windows partition and made copy of it into /boot/EFI folder. Do you have suggestions into how to add it to grub conf?

Last edited by nicolassilvar (2016-10-17 01:50:50)

Offline

#10 2016-10-17 02:25:14

nicolassilvar
Member
From: Bogota
Registered: 2016-06-15
Posts: 23

Re: GRUB EFI - Recover a Windows 10 partition

I tried again to restore the Windows MBR using the guide but still loading into grub

https://wiki.archlinux.org/index.php/Du … oot_record

Offline

#11 2016-10-17 02:47:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: GRUB EFI - Recover a Windows 10 partition

nicolassilvar wrote:

I tried again to restore the Windows MBR using the guide but still loading into grub

https://wiki.archlinux.org/index.php/Du … oot_record

Why?  Your system is UEFI.  It should not have a MBR


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2016-10-17 21:19:02

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: GRUB EFI - Recover a Windows 10 partition

nicolassilvar wrote:

I access the Windows partition and made copy of it into /boot/EFI folder.

Is that the recommend Windows boot repair technique?

Forgive my ignorance but surely some sort of Redmond-derived rescue disk would be needed?

Do you have suggestions into how to add it to grub conf?

https://www.archlinux.org/packages/comm … os-prober/

Or perhaps https://wiki.archlinux.org/index.php/GR … _UEFI_mode

Offline

Board footer

Powered by FluxBB