I accidentally deleted my efi partition, which I now know is bad news bears. I found a guide here to restore it without losing data, but even though I'm booting from usb and have unmounted all partitions, I'm still getting the error
gpt remove: unable to open device "disk0": resource busy.
Everything I'm reading says to boot from an OSX usb installer disk, and use
diskutil unmountdisk disk0 and then gpt will work. I've definitely done both of these things but it's still telling me the disk is mounted...
Could someone recommend anything else to try? Much thanks