I’m a FreeBSD fan, I prefer to use FreeBSD as the web server if possible.
In the pass Linode doesn’t support FreeBSD, people who want to use FreeBSD have to choose Digital Ocean or other service provider.
And in earlier this year, Linode has migrated all VPS from Xen to KVM, and it made installing FreeBSD on Linode VPS possible. But FreeBSD is not official supported by Linode. You can’t deploy FreeBSD via Linode control panel. So I wrote this article to share my experience about how to install FreeBSD on Linode.
1. Add a new linode VPS.
2. Go to the dashboard, and create a new vDisk.
3. For the disk type, please select Raw.
Just wait for a few seconds, the vDisk will be ready.
4. Go back to the dashboard, and create a new profile for FreeBSD.
5. Follow below picture to set the parameters.
6. Go back to dashboard, and boot the VPS into rescue mode.
It will take about 1 minutes to boot to rescue mode.
7. Go back to dashboard, and select remote access.
For now you can use web console to connect to the VPS.
But for my self, I prefer to use lish via SSH to connect to VPS.
8. After login, just run below command to download FreeBSD image and write it to the disk.
wget -O - http://mfsbsd.vx.sk/files/images/10/amd64/mfsbsd-10.2-RELEASE-amd64.img | dd of=/dev/sda bs=1M
Please be aware that at this time, we are not using the standard FreeBSD image. We have to use the image which can load FreeBSD into memory.
You can always download the latest version from below website (Make sure you download the image with img extension):
9. After the command is finished, just reboot
10. After reboot, Linode VPS should be able to boot into FreeBSD, and you can connect to it. But be aware that at this time, Lish is not working, you can only use ssh client to connect to the VPS.
11. Use ssh client to connect to your VPS. The default username and password is root/mfsroot
12. After login, you can use bsdinstall to install FreeBSD on your VPS.
13. Follow the standard process to install FreeBSD. But at the last step, please choose start a shell to make the manual modification.
Don’t forget this step. Because by default FreeBSD doesn’t enable root login via SSH. And We can’t access local console via lish. So it means if you don’t create any user account during installation and add them into FreeBSD wheel group, you’ll not able to login FreeBSD with root access.
14. In the shell, modify /etc/ssh/sshd_config, and make sure you enabled root ssh login. And then reboot the VPS
15. After reboot, you should be able to login the VPS via SSH. Then Enjoy the FreeBSD on linode.