How to install FreeBSD in an OVH bare-metal machine
This method works on recent kimsufi devices
Customize the image
Download a FreeBSD VM raw image with ZFS (eg. FreeBSD-14.1-RELEASE-amd64-zfs.raw.xz)
- Decompress it
- Start the VM using qemu : qemu-system-x86_64 -k fr -drive format=raw,file=FreeBSD14.1-zfs.raw -serial tcp::4450,server,telnet,wait
- Using 'telnet localhost 4450' you can now access the VM and:
- Add your public SSH key in .ssh/authorized_keys (ensure .ssh and authorized_keys has the correct owner and permissions)
- enable SSH 'service sshd enable'
allow root login in /etc/ssh/sshd_config 'echo "PermitRootLogin prohibit-password" >> /etc/ssh/sshd_config'
- Before closing remove ssh host keys 'rm /etc/ssh/ssh_host_*key*', they will be regenerated on the new host at the first boot
- 'poweroff' the qemu
- Use 'sha512 FreeBSD14.1-zfs.raw' to calculate the image sum
- Copy the image in an HTTP server accessible from the internet
Copy the image
Go to the OVH BYOD page and fill the form
Resize the partitions
Once installed you can just login using your privare key as root and resize the ZFS partition to use the full disk
- gpart resize -i 4 /dev/ada0
- zpool set autoexpand=on zroot
- zpool online -e zroot ada0p4