The title is pretty self explanatory, so let’s get to it, shall we?
I was configuring a server for a customer today, and one of the things I noticed is that FreeBSD was not available for bare-metal.
This got me a bit worried, because we use a lot of FreeBSD on Vultr… Well that’s a lie. We only use FreeBSD on Vultr.
I logged into our company account and noticed that our bare-metals does have FreeBSD as an icon for the image.
So I decided to check the docs and found this:
What operating system templates do you offer?
We offer many Linux and Windows options. We do not offer OpenBSD or FreeBSD images for Vultr Bare Metal. Use our iPXE boot feature if you need to install a custom operating system.
Well, that’s sad, but on the other hand, iPXE will be very useful. We can boot a memdisk such as mfsBSD and install FreeBSD from there.
To start, we need a VM that can host the mfsBSD img/ISO file. I have spun up a VM on Vultr running FreeBSD (altho it can run anything else, it wouldn’t matter), installed nginx on it, downloaded the file so we can boot from it. Here’s the copy-pasta
pkg install -y nginx
service nginx enable && service nginx start
fetch -o /usr/local/www/ \
https://mfsbsd.vx.sk/files/images/14/amd64/mfsbsd-se-14.0-RELEASE-amd64.img
This should be enough to get started. Oh, if you’re not on FreeBSD then the path might be different, like /var/www/nginx
, or something alike. Check your nginx configuration for the details.
Now we need to write an iPXE script and add it into our Vultr iPXE scripts. Here’s what it looks like
#!ipxe echo Starting MFSBSD sanboot http://your.server.ip.address/mfsbsd-se-14.0-RELEASE-amd64.img boot
Finally, we can create a bare-metal that uses our script for iPXE boot.
Don’t forget to choose the right location and plan.
After the machine is provisioned, you need to access the console and you will see the boot process.
The default root password is mfsroot
.
To install FreeBSD, you can run bsdinstall
. The rest will be familiar for you. Yes, you can use Root-on-ZFS. No, it can’t be in UEFI, you must use GPT (BIOS)
.
Good luck, and special thanks to Vultr for giving us the chance to use our favorite tools on the public cloud.
That’s all folks…