Archive for December 10th, 2015
Based on Eric McCorkle’s work on adding modular boot support to EFI including adding ZFS support, which is currently in review we’ve back-ported the required changes to 10.2-RELEASE code base, which others may find useful.
This can be found here: FreeBSD 10.2-RELEASE EFI ZFS root boot patch
We assume your source tree is in
/usr/src, your disk device is
- Go to your FreeBSD source tree:
- Download the EFI ZFS root patch
- Extract the patch
tar -xzf freebsd-10-efi-zfs-boot.tgz
- Apply the patches to your source tree in order
sh -c 'for i in `ls -1 patches/efi*.patch | sort`; do patch -E -N -p0 -F1 -t < $i; done'
- Cleanup orig files and remove old empty directories:
find /usr/src/ -name '*.orig' -delete find /usr/src/sys/boot/ -type d -empty -delete
- Build and install world e.g.
make buildworld -j24 && make installworld
- Partition your disk e.g.
gpart create -s GPT da0 gpart add -t efi -s 800K da0 gpart add -t freebsd-swap -s 10G da0 gpart add -t freebsd-zfs da0 gpart bootcode -p /boot/boot1.efifat -i 1 da0
- Perform your OS install to
- Reboot and enjoy
Update 2015-12-11: Corrected patch URL.
Update 2015-12-14: Updated code in line with #11226 of https://reviews.freebsd.org/D4515.
Update 2015-01-15: Updated code in line with that which is now committed to HEAD.