FreeBSD build in WPICS

Quick and dirty:

This quick-list surely forgets some items. Once this is all done, use the source tree to rebuild the system, making it up to date. Then start installing the packages you want.

misc pitfalls
generic procedure
imladris.wpi.edu:/home/FreeBSD /FreeBSD nfs     rw,noauto,async,nolockd,tcp 0 0
cd /usr
rm -rf src obj
ln -s /FreeBSD/src-releng_9/src .
ln -s /FreeBSD/ports .
mkdir /home/workspace
mkdir /home/workspace/portwork
mkdir /home/workspace/usr-obj
ln -s /home/workspace/usr-obj ./obj
cd /
nice /FreeBSD/build-script >& /tmp/bso &
daily_clean_tmps_days=5                               # If not accessed for
daily_clean_tmps_dirs="/tmp /var/tmp"                   # Delete under here
daily_clean_tmps_enable="YES"                           # Delete stuff daily
weekly_status_pkg_enable="YES"                           # Find out-of-date pkgs
*.*                      @cslog.cs.wpi.edu
*.*                      @rous.wpi.edu
FreeBSD for public use

ZFS Booting FreeBSD

Recent, hopefulyl useful instructions can be found in these places:

Give these a try and see ifthe instructions are viable.

Procedure for doing FreeBSD ZFS-boot

Cut-n-paste until I can do formatting. This procedure is fora two disk system with disks named /dev/da0 and /dev/da1. As of 20130327 I've got this whole process scripted, but the scripts aren't listed here. This example below is for reference, and is not a script.

gpart destroy -F da[01]
gpart create -s gpt da[01]
gpart add -b 34 -s 94 -t freebsd-boot -l boot-da[01] da[01]
gpart add -t freebsd-zfs -l zfs-da[01] da[01]
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da[01]

zfs load (...prints garbage but does load the zfs modules)
zpool create pool mirror /dev/gpt/zfs-da0 /dev/gpt/zfs-da1 (...ignore
      error) ... if you're trying on the Nth time on the same machine,
      you may get an error here saying that one of your disks is "part
      of potentially active pool..." ... repeat the zpool create
      command with the -f flag to override this error... IF there
      aren't actually any other active zpools on the machine.
zfs set checksum=fletcher4 pool
zfs set mountpoint=none pool
zfs set compression=on pool
zfs create pool/root
zfs set mountpoint=/mnt pool/root
zpool set bootfs=pool/root pool
zpool export pool
zpool import -o cachefile=/var/tmp/zpool.cache pool

zfs create -V 4G pool/swap
zfs set compression=off pool/swap
zfs set checksum=off pool/swap
zfs set org.freebsd:swap=on pool/swap
zfs create pool/var
zfs create pool/tmp
zfs create pool/usr
zfs create pool/home

zfs set mountpoint=/mnt/var pool/var
zfs set mountpoint=/mnt/tmp pool/tmp
zfs set mountpoint=/mnt/usr pool/usr
zfs set mountpoint=/mnt/home pool/home
zfs mount -a
mkdir /mnt/var/tmp
chmod 1777 /mnt/tmp /mnt/var/tmp

cd /mnt
tar --unlink -xpJf /usr/freebsd-dist/base.txz
tar --unlink -xpJf /usr/freebsd-dist/kernel.txz

cp /var/tmp/zpool.cache /mnt/boot/zfs/
cd /mnt
vi etc/rc.conf boot/loader.conf :

   add to rc.conf:
    zfs_enable="YES"

   add to loader.conf:
    zfs_load="YES"
    vfs.root.mountfrom="zfs:pool/root"

write these two files and make sure they have no errors, spelling etc.
touch /mnt/etc/fstab
cd /
zfs umount -a
zfs set mountpoint=legacy pool/root
zfs set mountpoint=/var pool/var
zfs set mountpoint=/tmp pool/tmp
zfs set mountpoint=/usr pool/usr
zfs set mountpoint=/home pool/home

Now: reboot onto the disks.  Set root PW, and run tzsetup, etc.