theforeman/foreman — pull request #660 by endyman (2013-05-28 14:55:56+00:00)
Title: #2572 Added FreeBSD Operating System Support

Added Support for FreeBSD installation. In order to install FreeBSD Servers using foreman you need to create a mfsbsd image using https://github.com/mmatuska/mfsbsd

As we require rc.local support in order to start the sysinstall process i submitted a patch to mfsbsd, too https://github.com/mmatuska/mfsbsd/pull/17

You can find a fork here: https://github.com/endyman/mfsbsd/tree/rc-local-support
Simply add a rc.local to /conf/ including the follwing code:

```
# create install.cfg for the installer
# if your forman server is not named foreman,
# change the name accordinly.

cat << EOF >/tmp/install.cfg
pc_config: https://foreman/unattended/provision
nic_config: dhcp-all
confirm_install: no
EOF

# start the installation process using pc-sysinstall

pc-sysinstall start-autoinstall /tmp/install.cfg
shutdown -r now
```

In case your foreman server is not called foreman, change it here. Currently there is no elegant way to pass params to BSD so we are using a static host here. I created a foreman CNAME in each domain pointing to the foreman server. After the kernel is booted, mfsbsd will try to fetch the installer provisioning config from https://foreman/unattended/provision

Next you need to build the mfsbsd image - BASE points to you install cdrom:

```
$ make BASE=/cdrom/usr/freebsd-dist
```

As a last step you need to copy the image on a webserve follwing this schema:

```
/boot/x86_64/images/mfsbsd.img
```

In foreman you simply point your install media to http:///