ZFS: FreeBSD ZFS root install with bsdinstall
As anyone who’s tried out the new FreeBSD 9.0-RELEASE will know, with it came the new installer, bsdinstall. Love it or hate it, it’s there, but it does have some pretty cool features that were not available on the old sysinstall. One of the features a lot of people were hoping for with the release of bsdinstall was the ability to do a full zfs root install of FreeBSD from the installer. This did not make the release and I can understand why, dialog is cool but creating a menu system for zfs with it is a nightmare. I am working on a zfs installer myself for a separate project and believe me, it will give you a head ache to think about it with all the features to write in.
The installer (pc-bsdinstall?) from the PC-BSD project is a full X GUI and already has a full ZFS install option, I believe the plan is to use the backend functionality from this installer to implement the features in bsdinstall.
The usual method for installing a full zfs root before FreeBSD 9.0-RELEASE was to use the very cool (as featured in bsdmag) mfsbsd which can be found at http://mfsbsd.vx.sk, included in the special addition (SE) of mfsbsd was a zfs install script, which is the inspiration for the commands used here. Since the release of FreeBSD 9.0 and the addition of the ‘Live CD’ option on the ISO some howtos have cropped up showing how to setup full zfs root from the bsdinstall live cd. Sounds good at first, but no real advantage over mfsbsd, in fact you have not zfsinstall script so it’s more of a pain, also you will have to do *all* of the FreeBSD install config by hand once extracted.
So until we get a ZFS root install option in bsdinstall, here is a way to do it by dropping out to shell at certain points of the bsdinstall and create a zpool to install to. See the video above to see how its done.
You may notice close to the end the installer jumps back to the first screen and goes to ‘Live CD’. This was a bad edit on my part, normally at this point you would be asked if you want to enter shell to do any final changes. You should chose No at this point and the next dialog box will give you the option to reboot or enter ‘Live CD’. Enter the ‘Live CD’ at this point to follow along with the video.