I just converted another server from UFS to ZFS.
I used this script as my starting point.
I dropped to a shell as soon as I booted from the live CD.
Then I fetch my script:
fetch --no-verify-peer http://bit.ly/1MvhRXH mv 1MvhRXH install.sh
I didn’t run the script. I modified it to suite my new conditions. The install files were not available. I put and exit around line 84. Then I ran my script:
sh ./install.sh
I manually fetched the files:
cd /mnt/tmp fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.1-RELEASE/base.txz fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.1-RELEASE/kernel.txz fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.1-RELEASE/doc.txz
I ran sha256 on each of them and eyeballed the MANIFEST to see if they vaguely resembled the expected results.
Then I ran this:
/bin/sh export DESTDIR=/mnt for file in base.txz kernel.txz doc.txz; do (cat $file | tar --unlink -xpJf - -C ${DESTDIR:-/}); done
I then wanted to run the rest of my script, so I
cd cp install.sh install2.sh
Then I deleted everything before and including the “do the install” around line 84, because I’d just done everything up to that point.
Then I ran install2.sh and rebooted.
All is well.