[SOLVED] I accidentally emptied the EFI-partition, but have not yet turned off my PC. How can I restore the files?

Page 2 - Seeking answers? Join the Tom's Hardware community: where nearly two million members share solutions and discuss the latest tech.
Aug 3, 2021
14
1
10
Hi,

The problem arised when I wanted to copy some files from my HDD onto a USB-stick. When I selected the USB-drive on my PC, I saw there were some files on there I did not recognize and figured I didn't need them, so I promptly deleted them. However, on second glance, I saw I did not select my USB-drive, but the EFI-partition. So I accidentally removed all files from the EFI-partition instead of from my USB-drive (I did shift+delete, too, so they are not still in my recycling bin). However, recognizing my mistake, I figured it would be best to leave my PC on, so that I could restore the EFI-partition, since I assume booting my PC will now be impossible. How can I restore my EFI-partition before I shut down my PC? How do I know which files to copy to that partition? I have been looking around on the internet, but they all talk about restoring the entire partition. The partition is still on my PC, however, it just does not have any files on it.
 
Solution
Hi,

The problem arised when I wanted to copy some files from my HDD onto a USB-stick. When I selected the USB-drive on my PC, I saw there were some files on there I did not recognize and figured I didn't need them, so I promptly deleted them. However, on second glance, I saw I did not select my USB-drive, but the EFI-partition. So I accidentally removed all files from the EFI-partition instead of from my USB-drive (I did shift+delete, too, so they are not still in my recycling bin). However, recognizing my mistake, I figured it would be best to leave my PC on, so that I could restore the EFI-partition, since I assume booting my PC will now be impossible. How can I restore my EFI-partition before I shut down my PC? How do I know...

urbanman2004

Distinguished
Aug 17, 2012
209
9
18,695
Hi,

The problem arised when I wanted to copy some files from my HDD onto a USB-stick. When I selected the USB-drive on my PC, I saw there were some files on there I did not recognize and figured I didn't need them, so I promptly deleted them. However, on second glance, I saw I did not select my USB-drive, but the EFI-partition. So I accidentally removed all files from the EFI-partition instead of from my USB-drive (I did shift+delete, too, so they are not still in my recycling bin). However, recognizing my mistake, I figured it would be best to leave my PC on, so that I could restore the EFI-partition, since I assume booting my PC will now be impossible. How can I restore my EFI-partition before I shut down my PC? How do I know which files to copy to that partition? I have been looking around on the internet, but they all talk about restoring the entire partition. The partition is still on my PC, however, it just does not have any files on it.
This issue can be fixed and you actually didn't need to leave the PC on. It's a chore to do, and it's not difficult, but you need to run CMD from a Windows 10 install disk (although the install CD works as well). There's plenty of times where I've had to restore EFI partitions on my PCs, e.g. copying an image of an MBR formatted drive from one PC and converting it into the GPT format in order to brute force restore the EFI partition for it fully boot under Windows BCD on a UEFI system. Let me know if you need instructions since I've taken the liberty of documenting my process for future reference.
 
Solution

USAFRet

Titan
Moderator
This issue can be fixed and you actually didn't need to leave the PC on. It's a chore to do, and it's not difficult to do, but you need run CMD from a Windows 10 install disk (although the install CD works as well). There's plenty of times where I've had to restore EFI partitions on my PCs, e.g. copying an image of an MBR formatted drive from one PC and converting it into the GPT format in order to brute force restore the EFI partition in order for it fully boot under Windows BCD on UEFI system. Let me know if you need instructions since I've taken the liberty of documenting my process for future reference.
There was apparently no "problem" to be "fixed".