Running FreeBSD from an USB stick on a MacBook Pro

It is possible to run FreeBSD on a MacBook Pro from an USB drive. To achieve this, we will first prepare the USB drive from a GNU/Linux machine and make it UEFI friendly:

# apt-get install parted
# parted /dev/sdc
(parted) mklabel gpt
(parted) mkpart ESP fat32 1MiB 513MiB
(parted) set 1 boot on
(parted) quit

From there, install FreeBSD as you would for exmaple using the kvm virtual machine hypervisor on the GNU/Linux machine. Answer “yes” when the installer suggests to create a freebsd-boot partition.

$ sudo kvm -hda /dev/sdc -cdrom FreeBSD-11.1-RELEASE-amd64-disc1.iso -boot d

Before exiting the installer, be sure to mount the freebsd-ufs partition and modify /mnt/etc/fstab so it reflects the actual USB drive and not the emulated virtual disk. For me it contains the following:

# Device	Mountpoint	FStype	Options	Dump	Pass#
/dev/da0p3	/		ufs	rw	1	1

Lastly, fetch an EFI content, for example from there and dump it to the EFI partition of the pen drive:

# dd if=boot1.efifat of=/dev/sdc1

There we go, insert the USB stick in the MacBook, power it up and hold the left-Alt / options key pressed. You should be granted the possibility to boot from the newly created device.