On an Ubuntu 14.04 64-bit host, run:

  wget http://us-east.manta.joyent.com/jperkin/public/lximg/mklxbs.sh
  chmod +x mklxbs.sh
  ./mklxbs.sh /var/tmp/trusty64

This will generate a tarball of a base Ubuntu system with the minimum number
of changes required to boot.  Copy this over to a SmartOS machine, and run:

  uuid=$(uuid)
  zfs create zones/${uuid}
  mkdir -p /zones/${uuid}/{cores,root}
  cd /zones/${uuid}/root
  gtar zxpf /path/to/trusty64.tar.gz
  mkdir -p var/ld/64
  crle -c var/ld/ld.config -l /native/lib:/native/usr/lib -s /native/lib/secure:/native/usr/lib/secure
  crle -64 -c var/ld/64/ld.config -l /native/lib/64:/native/usr/lib/64 -s /native/lib/secure/64:/native/usr/lib/secure/64

Create the image:

  zfs snapshot zones/${uuid}@snap
  zfs send zones/${uuid}@snap | gzip -9 >lx64.zfs.gz
  curl -O http://us-east.manta.joyent.com/jperkin/public/lximg/lx64.json.in
  size=$(stat -c "%s" lx64.zfs.gz)
  imguuid=$(uuid)
  sha1=$(digest -a sha1 lx64.zfs.gz)
  pubdate=$(date '+%FT%TZ')
  sed -e "s,@SIZE@,${size},g" -e "s,@UUID@,${imguuid},g" \
      -e "s,@SHA1@,${sha1},g" -e "s,@DATE@,${pubdate},g" \
      lx64.json.in >lx64.json
  imgadm install -m lx64.json -f lx64.zfs.gz
