I'm trying to install freeBSD onto a VPS (OVH provider).
So far, the third method from this response has come the closest to getting me where I want to go. I think OVH has a problem with nested virtualization, because the methods where I boot the installer from QEMU in rescue mode just haven't worked.
The command:
# https://mfsbsd.vx.sk/files/images/12/amd64/mfsbsd-se-12.1-RELEASE-amd64.img | dd of=/dev/sda
Actually completes successfully. When I reboot I even get to see the boot menu! But then, regardless of whether I boot in multiuser or single user mode I eventually get a message that says Panic: Going nowhere without my init!, followed by a vigorous round of reboots.
And now I'm at a total loss. I assume that init et. al. would be in the image already, so I assume that I must have sent dd to the wrong of=.
Here's the output of lsblk from the rescue mode of my VPS:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 2.5G 0 disk └─sda1 8:1 0 2.5G 0 part / sdb 8:16 0 20G 0 disk ├─sdb1 8:17 0 19.9G 0 part /mnt/sdb1 ├─sdb14 8:30 0 4M 0 part └─sdb15 8:31 0 106M 0 part /mnt/sdb15
Should I be writing the image somewhere other than /dev/sda?
Update: I wasn't having any luck getting mfsBSD to boot, and so I went back to trying nested virtualization. I'm now able to get the KVM started on my VPS, and I've successfully run bsdinstall. However, when I reboot out of rescue mode, I get a grub error. Still not running FreeBSD yet.
Further Update: My VPS is now running FreeBSD quite merrily thanks to a tip from @ClausAndersen. Here's how I did it:
Reboot in rescue mode from OVH's management panel. Once logged in (via SSH or KVM, either works), perform the following sequence of commands
- Unmount your original filesystem with
umount /dev/sdb*. Note that the rescue system is mounted from /dev/sda. Don't touch /dev/sda. - Destroy your original filesystem and the partition it lives on with fdisk.
fdisk -u /dev/sdbfollowed by a series ofduntil the partition table is empty, thenw. - Install (or confirm that your rescue image has) the package
xz-utils. Since my VPS started out life as an Ubuntu server, for me this meantapt-get install xz-utils. - Get a copy of a raw virtual image from FreeBSD.org, decompress it, and write it to /dev/sdb. From the command line in your rescue system, you would type
wget https://download.freebsd.org/ftp/snapshots/VM-IMAGES/12.1-STABLE/amd64/Latest/FreeBSD-12.1-STABLE-amd64.raw.xz | xz -dc | dd of=/dev/sdb bs=1M
Then reboot and login via KVM in the OVH control panel to configure your FreeBSD server.