Mar 282013

Throwing this here mostly for myself. After repeated failures at installing FreeBSD 9.1 straight on ZFS, mostly because of typos, I decided to create a script to do it. It will probably be superfluous soon as FreeBSD 10 should be able to do it from the installer. There might be typos inside the script too.
I copied the script to an USB stick, booted from the FreeBSD cd, dropped into a shell, mounted the USB stick under /tmp/whatever (do NOT mount anywhere under /mnt), removed the exit line at the beginning and executed.
It creates partitions, installs FreeBSD, modifies loader.conf, rc.conf, periodic.conf and fstab and exits. Server should be ready for reboot at this point. Compiled from several HOW-TOs around the Internet.

It was not written to be easily adapted to new systems, needs to be modified. Do NOT just run it as it is. Once started it can only be stopped with CTRL+C.

  One Response to “ZFS root on FreeBSD 9.1”

  1. For when you forget to copy the cache file you can always boot a live cd and:
    # zpool import -R /mnt -o cachefile=/tmp/zroot.cache zroot
    # cp /tmp/zroot.cache /mnt/boot/zfs/
    # reboot

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">