Unable to use gpt to restore efi partition
I figured it out, my hd was getting mounted under Volumes and had to be removed with diskutil unmount /Volumes/Macintosh\ HD

Don't know why unmountdisk wasn't fixing this but whatever