Recovering Windows 10 EFI partition

Hey there folks! First timer on dual booting UEFI systems and I messed up.
Since I’m unsure of the outcome I came here so somebody could reassure me for hopefully things go a little smother from now on.
I misunderstood the instructions on the calamares instructions for the EFI instalation and selected the Windows EFI partition for GRUB instalation without formatting it, but it broke windows and manjaro didn’t boot or even installed for that matter, so I wen in and formated the 300mb and flagged it boot and esp and managed to get manjaro working.
My question is: If I was to use this method: https://blog.d0zingcat.xyz/2015/09/28/Windows/How%20to%20repair%20the%20EFI%20Bootloader%20in%20Windows%2010/ to recover the EFI partition in another FAT 32 partiotion I created at the end of the disk and run an update-grub would it make grub recognize the windows instalation? What else should I do?

Here’s the output of parted -l so you can better grasp what I mean:

Model: ATA WDC WD5000LPVX-2 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  630MB   629MB   ntfs            Basic data partition          hidden, diag
 2      630MB   945MB   315MB   fat32           EFI system partition          boot, esp
 3      945MB   1079MB  134MB                   Microsoft reserved partition  msftres
 4      1079MB  270GB   269GB   ntfs            Basic data partition          msftdata
 6      270GB   371GB   100GB   ext4
 7      371GB   375GB   4295MB  linux-swap(v1)
 8      375GB   500GB   125GB   ext4
 5      500GB   500GB   501MB   fat32                                         msftdata

So to make clear my understanding of your question, you wanted to make another fat32 and use that new fat32 partition for your Windows $esp (instead of the orginal $esp) and then at Manjaro “update-grub” to include this new Windows set-up.

Ah… an interesting and novel idea!
I say go for it. It should work. But watch out at the Windows repair that you properly identify the new $esp partition ‘volume’ when you assign a drive letter to it.

But if somehow (I hope not) Manjaro grub get overridden again (by Windows) here’s how to get it bcak again.

Good luck. Let us know how it went okay?
I think (and hope) it will work.
Cheers.

[edit] - remember the windows entry in bios boot (efibootmgr) will become the default (after fixing windows boot). You must select Manjaro at bios to boot Manjaro after fixing Windows. Then when booted to Manjaro, make manjaro the default boot (use # efibootmgr -o xxxy xxxz) after you do your ‘update-grub’

Could you give me an example based on the parted -l output on the post? I checked the man page for the efibootmgr but got confused with the hex values thingy.

at Manjaro terminal, type

$ efibootmgr

This will print out in sequence of the bootorder. this will print something like

BootOrder: 0000,0002,0001, 0003
Boot0000* windows boot manager
Boot0001* manjaro
Boot0002* Hard Drive
Boot0003* Network Card

Then to make manjaro ‘first default’

# efibootmgr -o 0001,0000,0002,0003

note this will also work without typing all boots

# efibootmgr 0001,0000

ps: watch out for my formatting - this forum bbcode thingy. do not copy and paste.
done lost of edit to get this appear right.

Noticed you have new other posts in other topics.
So did this work?

You should get back so others can learn from this.
Keeping quiet will not make others learn from your experience.

I posted other topics related to my work box. I couldn’t burn the windows image yet for lack of time, as soon as I try and see how it goes I’ll get back here! :slight_smile:

Okay. keep us posted when you do.
Good luck again.

Usually EFI partition can be shared with many systems. When calamares detects other systems it just puts manjaro files in manjaro folder. When you install Ubuntu in UEFI mode, its boot files also go to separate folders. Moreover, Calamares can detect windows’ EFI partition and uses it during automated install.

I am not sure what you did wrong and how did you brake windows and Manjaro boot. The biggest mistake you made was formatting EFI partition. Now it’s really broken for Windows. There is a chance to restore it but even if went well, windows won’t boot and will have to be restored from install media.

Now when I think about it, it’s possible that Calamares and other installers rearrange files when detecting windows files, because I have different EFI structure on old and new laptop (they have different install history, on old I had multiple systems, on new one, I have dual boot but with two discs so I use two EFI partitions). UEFI must have specified path to the bootx64.efi file and if installer moves it elsewhere, new path must be specified at the UEFI level. Setting that path is different for different computers.

I’m not sure what windows installer does with UEFI during install or restore so it’s always better to install/restore windows first and then linux. It’s possible that windows installer wipes EFI and puts windows files anew - I wouldn’t be surprised, windows installer is forceful and doesn’t respect anything but itself. Sometimes such things are different from computer to computer (different UEFI programs). UEFI is still a bit mysterious but I still prefer it over legacy.

I tried just selecting the efi partition, but it gave me an error and canceled the operation. The C partition is intact, and based on what the guy said on the link I mentioned on the original post, after recovering the windows EFI I should be golden . . .

Well, it depends. I had to once restore windows partition (no format or any editing was done on it, so it was an easy and quick restore) so I managed to keep the data, but windows can’t start. However that was in legacy mode, so it’s possible that restoring EFI will restore normal boot, but windows may have issues with restored files nevertheless.

If I got you right, you formatted partition and override it with data, that’s a serious problem. When I wiped my partition, I only changed partition table but didn’t do anything with partitions and it windows still had problems with booting. But your situation is different so it’s possible it will be ok. You just need to try.

Unfortunately I had some minor set backs by XfBurn not making a bootable disk from the image I donwloaded. Don’t know if it was an issue with the software or the image… Ran out of DVD’s and only have one USB stick available, but I think I can do it today, maybe! Fingers crossed!

Finally had the time and devices to try and engage on my journey with the unknown, but then when I put any windows media that i put for booting isn’t recognized after “POST” the manjaro usb stick I had booted fine, I still have an optical drive so I tried burning DVDs but after trying other software or even other boxes to record or build the windows media, none of them allow me to boot from it, and I do have Security Boot disabled, or I wouldn’t be able to install manjaro in the first place, just being absolutly clear about that to avoid this question since it wouldn’t get us any further on the matter… :slight_smile:
P.S: It used to recognize windows media, I tried installing other windows version on it before, but gave up cause the Serial Number I bought was a Volume Type key and was all used when I tried installing, so I kept the OEM version.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by Bytemark