Moved to Apple Mac sub-forum.
Do not know Mac. Looks like script is not showing contents of your ESP - efi system partition or sda1. It also looks like you have hybrid MBR/gpt configuration which was required by older versions of Windows, but you have to be careful to keep that in sync.
Since not showing sda1, you may need to run chkdsk from Windows, or dosfsck from Ubuntu. Do not know Mac and what file repair tool it may use. And then it looks like you are reinstalling grub to MBR. Your rEFInd application I believe is for UEFI boot and has files in the ESP.
[URL="http://www.rodsbooks.com/gdisk/hybrid.html"]http://www.rodsbooks.com/gdisk/hybrid.html
[/URL] dosfstools - dosfsck (aka fsck.msdos and fsck.vfat) utilities Must be unmounted sudo dosfsck -t -a -w /dev/sdb1 The -a seems to help in clearing dirty bit https://bbs.archlinux.org/viewtopic.php?id=164185
[URL="http://www.rodsbooks.com/gdisk/hybrid.html"] [/URL]