Sometime last year, I started working on a patch to add ZFS support to the UEFI boot facilities for FreeBSD.
Backstory: I’ve been a FreeBSD fan and user since my junior year of undergrad (2003), and I run it as my OS whenever I can. I first started looking into UEFI support as a GSoC project. Unfortunately, I had to drop the project due to a combination of a sudden job search and my grandfather’s brain cancer diagnosis.
Fast forward a few years, and I circled back to see what remained to be done on the UEFI front. The boot process was there, but only for UFS. So over the holidays, I started poking around to see what could be done.
I started out by refactoring boot1 (the program that resides in the EFI partition and pulls loader off the main filesystem and runs it), putting it into a more modular form to support multiple filesystem modules. I then started writing the ZFS module. I hit a tipping point some time in April, and got it working completely shortly thereafter.
The next task was loader itself. This proved trickier, but I eventually figured out what needed to be done. To my delight, the modified loader worked fine with the GRUB2 bootloader as well as FreeBSD’s boot1.
For most of the rest of the year, it’s been passed around and used by various people and was picked up by NextBSD and PCBSD. It entered the formal review process in late autumn, and several people contributed changes that helped out immensely in the integration effort. In particular, several people addressed stylistic issues (I am not terribly familiar with FreeBSD’s style guide) and integrated libstand support (which I had thought to be a problem due to the need for Win32 ABI binaries in EFI).
I was informed on the way home from the gym that it’s been committed to HEAD, and will hopefully make it into 10.3. I’m glad to see it now officially in FreeBSD, and I’m grateful to the people who helped out with the integration.
I have future plans in this arena, too. I deliberately modularized the boot1 program in preparation for some other efforts. First, I plan to look into adding GELI (the full-disk encryption mechanism for FreeBSD) support. I would also like to see support for checking cryptographic signatures of loader and kernel at boot-time (I’ve heard others are working on something like that). In the very long run, I’d like to see a completely trusted custody chain from boot to kernel, but that is something that will take multiple steps to realize.