Accidentally deleted Windows 10 boot partition. How do I restore it?

Hi,

I accidentally deleted my windows 10 boot partition during some maintenance activities on my computer. So, now I do not see the Windows option on my PC in the UEFI boot loader. I do have CentOS 7 installed on an external USB hard drive so I booted into that and downloaded the Windows 10 ISO. I have created a bootable thumb drive using the ISO on CentOS using gparted.

So I booted using the thumb drive and chose the Windows 10 repair option but it did not help. I have 2 SSDs on my machine and I do not want to lose any of the data including the windows settings if I choose a fresh install option. My disk layout on Windows was:

C:\ - Windows was installed here. This is a 1 TB SSD Drive.

D:\ - Second 1 TB SSD Drive.

When I'm on Linux, then I can see those drives as 2 separate devices and I can also access the files on them. The device that corresponds to the C:\ drive still seems to have all the Windows installation data. If I boot into the Windows 10 thumb drive and select the fresh installation option then it lists all my partitions but I'm not sure which is which and I do not want to delete data by mistake. So, is there a way for me to fix the Windows efi records?

Would appreciate any help!

Thanks,

Sachin

Hi.

You can create a lost/deleted EFI partition by CMD.

1) Create an installation media
2) Boot PC with an installation media
3) Press SHFIT + F10 on the first screen to bring up Command Prompt
4) Run the following commands and click Enter each time at Command Prompt:

diskpart
list disk
select disk N (N refers to the disk which contains the deleted the EFI System partition)
list partition
create partition efi
format quick fs=fat32
list partition
list volume (find the volume letter which belongs to the installed Windows OS)
exit (exit diskpart)
bcdboot M:\windows (M refers to the volume letter of installed Windows OS)

(bcdboot m:\windows command will copy the boot files from Windows partition to the EFI system partition and create BCD store in the partition)

Next remove installation drive and restart your computer

Let me know if you have any questions
Best wishes,
Mark

93 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

So I booted using the thumb drive and chose the Windows 10 repair option but it did not help.

Which repair options were tried and what were the results for each?

Use a camera or smartphone camera to take pictures and post images of these commands and results.

Post the images into the thread using share links:  one drive, drop box, or google drive

Open command prompt and type or copy and paste:

bcdedit /enum

bcdedit | find "osdevice"

diskpart

list disk

list volume

select disk 0

detail disk

list partition

select partition 1

detail partition

select partition 2

detail partition

select partition 3

detail partition

select partition 4

detail partition

select partition 5

detail partition

(If there are any additional partitions on disk 0 then continue in the same fashion)

select disk 1

detail disk

list partition

select partition 1

detail partition

select partition 2

detail partition

select partition 3

detail partition

select partition 4

detail partition

select partition 5

detail partition 

(If there are any additional partitions on disk 0 then continue in the same fashion)

select disk 2

detail disk 

list partition

exit

3 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Thanks Mark. When I try to create an efi partition on my disk 0, it complains that there is not enough usable space for this operation. Disk 0 shows 4 partitions:

Partition 1 - Recovery - 450 MB

Partition 2 - System - 100 MB

Partition 3 - Reserved - 16 MB

Partition 4 - Primary - 930 GB

Do I need to delete one of the partitions?

3 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi,

You can delete a less important partition created already and merge the space together to create a new partition with a proper drive letter.

Deleting the partitions created by the OEM is often not possible due to the way the OEMs configure the partitions. Therefore the option then is to extend the operating system partition back to the original size to regain use of the unallocated space.

Be sure that you will not delete drive with your data!
Best wishes,
Mark

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

The partitions you are showing are normal Win 10 partitions.  The System partition is where the boot files should be.

Have you checked your Bios to make sure the Windows Boot Manager is listed first in the boot options?

You say you deleted the partition, but it is still there.  Did you wipe it as opposed to removing it?

_____________________________________
ASUS Z490 Intel i9 10900K

2 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

 
 

Question Info


Last updated October 27, 2020 Views 46,616 Applies to: