How to fix Windows Boot Camp after Linux install/ I am using a 2010 iMac that needs to use the hybrid GPT/MBR to install Windows via Boot Camp.

I had a working dual boot install using Boot Camp with Mac OS High Sierra and Windows 10. To install Ubuntu, I made 3 new partitions using Disk Utility in Mac OS and installed Ubuntu 16.04 onto them using the "Something Else" option. Mac OS and Ubuntu now boot fine either from Refind or from the option menu on boot up.  Windows now won't boot and gives a message " Missing Operating System" when I try to boot from it.

This is the new diskutil list output (the new partitions I created were 4,5,and 6):

    /dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE           IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 TB         disk0
   1:                        EFI EFI                     209.7 MB       disk0s1
   2:                  Apple_HFS Mac OS                  1.3 TB         disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB       disk0s3
   4:                        EFI                         6.5 GB         disk0s4
   5:           Linux Filesystem                         198.7 GB       disk0s5
   6:                 Linux Swap                         15.2 GB        disk0s6
   7:       Microsoft Basic Data BOOTCAMP                514.0 GB       disk0s7


I didn't touch the Bootcamp partition and it still seems to contain data but I seem to have freaked out the MBR. Anyone got any ideas for how I can fix this and rescue the Windows install?
You basically need to implement the same solution as the answer to Bootcamp High Sierra upgrade now not working. Substitute the commands given below.

r
h
2 3 7
y
af
n
ab
n
07
y
n
w
y


This solution is probably not the best one. Basically, you should have not moved BOOTCAMP to disk0s7. You should have either used a third part tool to move BOOTCAMP or manually reinstalled Windows.