# Unallocated space limits:
LIMITS="$(gpt show ${SD} | awk 'NF==2 {print $1, $2;}')" # unallocated space
START="${LIMITS%% *}" # first number
SIZE="${LIMITS##* }" # second number
# Align:
ALIGN=64 # assume it is always greater than START (usually 34)
SIZE=$((${SIZE} - (${ALIGN} - ${START})))
START=${ALIGN}
# Now create file systems, and unpack sets
newfs -O2 ${ROOT}
mkdir ${mnt}
mount /dev/${ROOT} ${mnt}
cd ${mnt}
for s in base etc; do pax -zrpe -f ${SETSDIR}/$s.tgz; done
for s in kern-GENERIC modules; do pax -zrpe -f ${SETSDIR}/$s.tgz; done
# Make it bootable:
cp usr/mdec/boot .
installboot -vf -o timeout=2 /dev/r${ROOT} /usr/mdec/bootxx_ffsv2
# ...only make sure that this boot code corresponds to file system in newfs above.