Skip to content

Instantly share code, notes, and snippets.

@goneri
Last active April 16, 2019 18:58
Show Gist options
  • Save goneri/535fd178ea1d745b4c88aac14d494773 to your computer and use it in GitHub Desktop.
Save goneri/535fd178ea1d745b4c88aac14d494773 to your computer and use it in GitHub Desktop.
Cloudify the FreeBSD image
# Grab an image from http://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/
# Start it using QEMU, e.g: qemu-system-x86_64 -drive file=FreeBSD-13.0-CURRENT-amd64.qcow2 -net nic,model=virtio -net user -m 1G
# Login and fetch the script:
# fetch --no-verify-peer https://gist.githubusercontent.com/XXXXX
# sh cloudify.sh
# Done
export ASSUME_ALWAYS_YES=YES
cd /tmp
fetch --no-verify-peer https://github.com/goneri/cloud-init/archive/freebsd.tar.gz
tar xf freebsd.tar.gz
cd cloud-init-freebsd
mkdir -p /usr/local/etc/rc.d
./tools/build-on-freebsd
echo 'boot_multicons="YES"' >> /boot/loader.conf
echo 'boot_serial="YES"' >> /boot/loader.conf
echo 'comconsole_speed="115200"' >> /boot/loader.conf
echo 'console="comconsole,vidconsole"' >> /boot/loader.conf
echo '-P' >> /boot.config
echo 'sshd_enable="YES"' >> /etc/rc.conf
echo 'sendmail_enable="NONE"' >> /etc/rc.conf
echo 'autoboot_delay="1"' >> /boot/loader.conf
echo '' > /etc/resolv.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment