Recover Bootcamp EFI Folder/fix boot entries?

  1. I suppose you will need a Window 10 installer flash drive. If you do not have this flash drive, you will have to build one. First download the 64-bit Windows 10 iso from this Microsoft web site. This can be done while running macOS. Next you will need 16 GB or larger flash drive. For your model Mac, I believe the Boot Camp Assistant will aid in the creation of the Windows installer flash drive. If not, let me know.
  2. If the root folder of the flash drive contains the file AutoUnattend.xml, you will need to rename the file to NoAutoUnattend.xml.

  3. Boot to the flash drive. Hold down the option key at start up. From the Startup Manager, select the icon labeled "EFI Boot".

  4. Open a Windows Command Prompt window, by following the procedure outlined in this step. Below is an image of what is initially displayed by the Windows 10 installer. Select "Next".

    z1

    In the image shown below, select "Repair your computer".

    z2

    In the image shown below, select "Troubleshoot".

    z3

    In the image shown below, select "Command Prompt".

    z4

    The result should be the image shown below.

    z6

  5. Use the diskpart command to determine the drive letter for BOOTCAMP partition.

    diskpart
    list volume
    exit
    
  6. Enter the command below to assign drive letter S to the EFI partition.

    mountvol S: /s
    
  7. Here I will assume the BOOTCAMP partition is assign the drive letter C. Enter the command shown below to recreate the boot files.

    bcdboot C:\windows /s S:
    
  8. Enter the command shown below, then select option to "Turn off your PC".

    exit
    

I had macOS and Windows 10 installed through Bootcamp on my iMac (Mid-2011) and everything worked fine. Then I installed a new SSD with no issues. I continued using Windows through the old HDD via Bootcamp. However, in the process of assigning more disk space to Windows, I accidentally deleted the original Macintosh HD. I have since restored it from the recovery boot menu.

The issue I now have is the option for Windows doesn't show up when holding down the Alt/Option key during startup. I can see the Bootcamp partition and Windows files in the Finder, as well as in Disk Utility (although "First Aid" is greyed out). I can also see Bootcamp in the Startup Disk menu.

It seems since recovering the Macintosh HD associated with my Bootcamp partition, it has lost its association. Is it possible it is something to do with the EFI folder being recreated in recovery?

In macOS, typing diskutil list returns this:

#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *1.0 TB     disk0
1:                        EFI EFI                     209.7 MB   disk0s1
2:                  Apple_HFS Macintosh HD            850.0 GB   disk0s2
3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
4:       Microsoft Basic Data BOOTCAMP                149.2 GB   disk0s4

/dev/disk1 (internal, physical):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *960.2 GB   disk1
1:                        EFI EFI                     209.7 MB   disk1s1
2:                  Apple_HFS Macintosh SSD           959.3 GB   disk1s2
3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3

/dev/disk2 (external, physical):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:     FDisk_partition_scheme                        *15.5 GB    disk2
1:                 DOS_FAT_32 U                       15.5 GB    disk2s1

/dev/disk3 (internal, physical):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            CCCOMA_X64FRE_EN-US... *5.4 GB     disk3

/dev/disk4 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:     Apple_partition_scheme                        +45.5 MB    disk4
1:        Apple_partition_map                         32.3 KB    disk4s1
2:                  Apple_HFS Floola (MacOS X)        45.4 MB    disk4s2
4:       Microsoft Basic Data                         107.4 GB   disk2s4

Is there anything I could do to get back into my Windows system? I have gone through the steps of this fix and come undone at point 6: It tells me the volume cannot be found.

Many thanks in advance for any assistance.