I'm new to Linux and recently set up CachyOS in a dual-boot configuration. During installation, I accidentally deleted the 100 MB EFI System Partition that contained Windows' bootloader, so Windows no longer appears in the boot menu and GRUB does not detect it. Most of the Windows installation is still intact and readable from Linux, and both operating systems are installed on the same NVMe drive.
I want to recover Windows without reinstalling it, deleting its existing files, or losing my programs, settings, and other data. I also have a Windows recovery point available. I don't mind reinstalling CachyOS later if necessary, but preserving the existing Windows installation and data is essential. What is the safest way to recreate the EFI partition or repair the Windows bootloader using Windows installation or recovery media?
3 Answers
This sounds like a bootloader repair rather than a Windows reinstall. Start Windows installation or recovery media, open the command prompt, identify the existing Windows partition and the EFI partition or unallocated space, then rebuild the EFI boot files with the appropriate boot-repair commands. The goal is to leave the Windows partition untouched and recreate only the boot files. Be extremely careful when selecting disks and partitions, because the wrong commands can erase data.
Before changing anything else, make a backup of important files to a separate drive that you can disconnect afterward. Even though the Windows files appear intact, boot repair and partition work always carry some risk. Also double-check that the recovery point actually contains what you need, since a restore point is not the same as a complete personal-data backup.
For future experiments, using a second drive for Linux and disconnecting the Windows drive during installation can prevent this kind of accident. Dual-booting does not require both operating systems to be installed on the same physical drive; they can be on separate drives and still be selected from the firmware boot menu.

That makes sense. I assumed both systems had to share one drive for it to count as dual boot, but separating the drives would make future testing much safer.