theforeman/foreman — pull request #673 by endyman (2013-05-31 17:06:35+00:00)
Title: #2572 implement freebsd support

Refactored Branch including more concise usage of install media.

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 to yout foreman tftpserver using this schema:
```
boot/FreeBSD---mfs.img
```
i.e.
```
boot/FreeBSD-x86_64-9.1-mfs.img
```

In foreman do not forget to update your install media to point to a FreeBSD mirror near you :-)