hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
diskutil list
to find which disk is your flash drivediskutil unmountDisk /dev/diskN
where N is the disk number you found in step 3.sudo dd if=/path/to/converted.img of=/dev/diskN bs=1m
to copy that image over to the flash drive.diskutil eject /dev/diskN
to EJECT!cd /Volumes/partition1/efi/refit
(where ‘partition1’ is the name of that same parition) followed by ./enable.sh