NOTE TO computerconsultantsforum.com and forums.techcareerfubar.com USERS: This is the same site. Your login will work here. Use the "forgot password" function if you need help recovering your password.

Obvious fact: You're not logged in.

Therefore, you're only seeing the tip of the iceberg of great discussion threads on this site.

Get rid of this big black message box by joining here: http://mature-it.pro/register/

Who We Are: A collection of IT, engineering and sciences professionals, in a variety of current circumstances with a variety of career backgrounds. Including System admins, Developers and programmers, Freelancers and "gig" entrepreneurs, Contract, job shopping and FTE-employed contract house IT workers, Web developers, Inventors, and artists and writers with tech backgrounds.

We're smarter than the hive mind you've experienced on large tech discussion forums and groups. So register on the board - your email is NEVER sold or provided to third parties. Then LOGIN FREQUENTLY to see new stuff daily.

Join by Registering here: http://mature-it.pro/register/

Author Topic: Recovering Win10 EFI partition from Linux  (Read 4856 times)

unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 4296
Recovering Win10 EFI partition from Linux
« on: January 03, 2019, 08:28:28 pm »
Gorn, I recall you went through something similar a few months ago and I wanted to ping your knowledge on the subject. I did something stupid and wiped out my EFI partition on both Win10 disks. Primary and clone. I think the stupid imaging program has a huge bug in it.
 Now the machine will not boot, except in Fedora 29 mode.

I realize I need to boot off a recovery CD and repair the EFI, something like this:

https://neosmart.net/wiki/fix-uefi-boot/


However, is there a tool in Linux that can repair EFI partitions in Windows. I am aware you can amount Windows drives, create mount points and stuff. But how do you reinstall EFI partitions from Linux on Windows 10 disks?

Linux has efibootmgr, it's close but doesn't seem like it can do the above, that is operate on Windows entries. Or can it?

https://linux.die.net/man/8/efibootmgr



Brawndo. It's got what plants crave.

G0ddard B0lt

  • I absolutely DESPISE improvised sulfur-charcoal-salt peter cannons made out of hollow tree branches filled with diamonds as projectiles.
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 22672
  • Gorn Classic, user of Gornix
Re: Recovering Win10 EFI partition from Linux
« Reply #1 on: January 03, 2019, 08:57:43 pm »
I'm very sorry. No clue whatsoever.

My problem a year or so ago was that I kept losing standard partitions on hard drives. Recovering a normal partition, from my reading, is based on having a backup partition table available. If the backup partition is garbaged, then you may have a hard drive full of sectors that there is no sector to file mapping available to refer to.

There are a few tools available that can recover the files from a drive where all partition info, including the backup, is lost. But  the processing takes days (literally) and you may wind up with a bunch of files that have boilerplate concocted names rather than original names.

My expertise with recovering and repairing partitions is rather amateurish.

Maybe Pxsant knows about this and can help?
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.

pxsant

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 1705
Re: Recovering Win10 EFI partition from Linux
« Reply #2 on: January 04, 2019, 02:39:05 am »

unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 4296
Re: Recovering Win10 EFI partition from Linux
« Reply #3 on: January 04, 2019, 05:06:27 pm »
Yeah. I've made a lot of progress. I am booted into the recovery flash I made with Rufus software and now am contemplating which path I should take to rebuild the EFI. There seems to be a dozen ways of doing so.

For example diskpart is for the advanced users but the Windows 10 recovery disk also came loaded with other programs like Macrium Reflect (I've used it for 10 years and never noticed it has disk recovery features built-in).
Brawndo. It's got what plants crave.

Richardk

  • Global Moderator
  • Wise Sage
  • *****
  • Posts: 4278
Re: Recovering Win10 EFI partition from Linux
« Reply #4 on: January 04, 2019, 05:24:45 pm »
I have no experience with this but is it all that different than say Grub 2 or anything similar? I would think most of what gets loaded is pretty generic aside from the partition data itself. Assuming that's the case, you should be able to rebuild what you need and cross your fingers.

Now with that said, I can't remember the last time I wrote down partition data info plus I might be way off base with this. I remember there being a huge stink over EFI partitions but can't recall why.  Good luck!

unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 4296
Re: Recovering Win10 EFI partition from Linux
« Reply #5 on: January 12, 2019, 02:55:47 pm »
I was down for almost a week.. what seemed like a very long week.

None of the standard tools helped with EFI recovery. I went through all of the tools available back and forth.  Created a bootable flash drive with Windows Preloaded-Environment and worked with it.

The thing that *did* work was taking one of my SSDs, throwing a brand new Windows 10 install on it. Then taking the faulty drive and copying everything but the EFI partition onto the new install, which booted, and had a good EFI partition. So I got a good EFI and its C:\ partition was overwritten by the c:\partition from the broken drive. Kind of a hybrid situation. Then I just had to let windows do a "repair", created a bootable entry with the bcdedit/bcdboot commands and that was it.

EFI is the devil.
I think I learned everything about it and have a suspicion I still don't know anything about it.

Then I cloned the primary drive onto a clone disk, then cloned it again to another disk. So I have 2 good copies. Then I created a bootable Macrium Reflect flash drive and also created a disk image to an external 4TB USB drive, you know, the slow type.



I think AOMEI Partition Assistant has some kind of bug in it as it does not deal with with multiboot systems.  Instead of cloning the primary disk to designated clone disk, it wiped out the EFI in the source disk and completely wiped the clone disk. I really don't get it why it messed with the source disk at all.  I am 100% certain I ran the right command.



I think I will configure the machine into this configuration below, though I am having a hard time deciding on the Linux distribution. I really like SUSE and Ubuntu, but neither one uses Redhat package management system, the rpm stuff. Ubuntu is a Debian type which is substantially different from Redhat Enterprise in that regard. I did play with Fedora 29 for a while and it felt a bit "Meh". Not as colorful as Ubuntu. I did't care for the Gnome Windows manager. 

My original goal was CentOS since it's closest to Redhat Enterprise without all the licensing BS but amazingly, I could not get it to recognize my non-C:\ disks - and I really did not want to overwrite the primary Windows disk.  It just did not see them to install itself on them.  Maybe I will try again.
I keep finding examples where programs do not deal well with machines in a multiboot configuration, where there are several disks with the EFI partition, etc. It's not that complicated.

Maybe I will try fvwm Windows Manager, this is really old school shyt. I ran it 25 years ago, damn. I didn't realize it was still around, but I really liked it and how you could define virtual windows.

In all seriousness, KDE rules.

Quote
https://linuxlandit.blogspot.com/2011/06/fabulous-fvwm-window-manager-for-linux.html

FVWM
Last, but certainly not least, there's FVWM, an old-school window manager for X that's been around for ages.






« Last Edit: January 13, 2019, 04:53:24 am by unix »
Brawndo. It's got what plants crave.

unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 4296
Re: Recovering Win10 EFI partition from Linux
« Reply #6 on: January 12, 2019, 03:02:19 pm »
I remember there being a huge stink over EFI partitions but can't recall why.  Good luck!

something to do with UEFI / GPT machines that evolved from BIOS/MBR format. Things got more complicated and you cannot run bcdedit to configure a Linux disk entry into one of the boot entries. Essentially you have to let grub create the multiboot configuraton. I am still using bcdedit at this point, it looks kind of like this, these are all the bootable devices. If I want to boot into Linux, I hit F11 during the splash screen during the bootcycle and it gives me a list of the bootable devices, then I select the Linux drive.

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.efi
description              Windows 10  PM981
locale                  en-US
osdevice                partition=C:
systemroot              \Windows
resumeobject            {4ab9657c-13b5-11e9-9e57-806e6f6e6963}

Windows Boot Loader
-------------------
identifier              {68fb448f-13a8-11e9-9e52-d8cb8aefea8e}
device                  partition=G:
path                    \Windows\system32\winload.efi
description              Windows 10 PM951    -- January 8, 2019
locale                  en-US
osdevice                partition=G:
systemroot              \Windows
resumeobject            {b3e69e43-13a8-11e9-9e53-806e6f6e6963}

Windows Boot Loader
-------------------
identifier              {519f9f0b-1313-11e9-9e09-e27065a9765e}
device                  partition=H:
path                    \Windows\system32\winload.efi
description              Windows 10  860 M.2 -- January 8, 2019
locale                  en-US
osdevice                partition=H:
systemroot              \Windows
resumeobject            {72a4beb2-1314-11e9-9e50-806e6f6e6963}
bootmenupolicy          Standard


I will probably wipe out this bottom drive that has Win10 on it and install some flavor of Linux when I decide what's most palatable.
Brawndo. It's got what plants crave.

unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 4296
Re: Recovering Win10 EFI partition from Linux
« Reply #7 on: January 13, 2019, 07:14:11 am »
There is a really cool program called EasyBCD and it automatically configures disk in a multiboot configuration, creating boot entries.

of course it doesn't copy any data, you still have to use a Partition Manager type program something like Macrium Reflect or any other Clonezilla type app to clone or image disks. After running EasyBCD, verify the results by running bcdedit and then upon rebooting, you will see multiple disks right after the splash screen and given whatever timeout you defined (I set it at 10 seconds).
Brawndo. It's got what plants crave.