Broken (probably erased) Windows 10 boot

0

I accidentally erased a disk partition with Linux on it; Now, I encounter GRUB rescue mode, but I also somehow managed to erase the partition containing it (~260MB).

I've tried fixing the boot partition with a Windows LiveUSB using bootrec /fixmbr (did nothing) and /fixboot (says access denied), so I installed Ubuntu (also tried boot-recovery) and am asking what I should do to fix the issue?

ExplodingBanana

Posted 2019-12-28T15:05:11.650

Reputation: 11

btw after bcdboot command Windows launched just once – ExplodingBanana – 2019-12-28T15:07:14.620

You have deleted enough that you will have to rebuild your system. Forget dual boot - that is an ancient strategy. Use Windows or Linux as your base system and make the other system a virtual machine. Vastly easier to manage – John – 2019-12-28T15:28:35.423

You mean completely erasing everything and installing one system? – ExplodingBanana – 2019-12-28T15:47:49.637

Yes. that is what I mean. Then stabilize the one system and vritualize the next one – John – 2019-12-28T15:52:24.580

Thanks, John, gonna try not screw up with this one – ExplodingBanana – 2019-12-28T15:55:26.953

@John that's factually inaccurate: "you will have to rebuild your system". @ExploidingBanana you need to re-create the EFI partition using bcdboot C:\windows /s or bcdboot C:\windows /s S: (replace C: with the correct drive letter for the Windows OS partition). Once done, re-issue: bootrec /fixmbr && bootrec /rebuildbcd. – JW0914 – 2019-12-28T16:32:57.470

@ExplodingBanana If that does not result with a bootable EFI partition, you will need to image the OS partition with DISM (see Imaging section) > launch Windows setup > select the current OS partition to install to > cancel the installation after the installer finishes the "Installing Features..." step > format the OS partition > apply the previously captured WIM using DISM (you can try copying/pasting the content from the Window.old directory to the root of the OS partition, but it may cause unforeseen issues - use RoboCopy to do so).

– JW0914 – 2019-12-28T16:36:36.260

May be, but I do not know what other damage was done in this case. – John – 2019-12-28T16:37:20.510

@John What other damage could there be if just the EFI partition was removed/formatted (provided the OS partition was not touched, which isn't clear from the OP's question and I assumed to be the case)? All the EFI partition houses are the EFI boot files & BCD store. While in theory bcdboot should be able to rebuild the EFI partition according to a few wikis (Windows stores a copy of the EFI boot files in %WinDir%\Boot), I've never tried rebuilding the EFI partition this way due to how Windows 10 has locked it down (this is why BootRec /FixBoot doesn't function on UEFI installs). – JW0914 – 2019-12-28T16:43:31.930

@ExplodingBanana Please clarify in your question whether the Windows OS partition still exists in the state it was in prior to the issue occurring. – JW0914 – 2019-12-28T16:46:59.027

Appreciate it, guys, but it's too late. Now I need to install Windows(though I have a USB, installer says there's Windows already installed) – ExplodingBanana – 2019-12-28T20:14:04.700

No answers