0

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

  1. Unmount your original filesystem with umount /dev/sdb*. Note that the rescue system is mounted from /dev/sda. Don't touch /dev/sda.
  2. Destroy your original filesystem and the partition it lives on with fdisk. fdisk -u /dev/sdb followed by a series of d until the partition table is empty, then w.
  3. 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 meant apt-get install xz-utils.
  4. 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.

  • 1
    Try `bs=1m` as seen in [this article](https://www.freebsd.org/doc/en/articles/remote-install/preparation.html) just to be sure. Maybe even `bs=1m conv=sync`. No dice? Then try [mini-memstick](https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.1/FreeBSD-12.1-RELEASE-amd64-mini-memstick.img). Still? Then capture the output just before the `Panic` and add here. – Claus Andersen Mar 25 '20 at 18:17
  • 1
    Or maybe use the [qcow2](https://download.freebsd.org/ftp/releases/VM-IMAGES/12.1-RELEASE/amd64/Latest/FreeBSD-12.1-RELEASE-amd64.qcow2.xz) image file as shown with [OVHcloud](https://www.ovhcloud.com/en/public-cloud/private-image-catalog/). They list FreeBSD as a [template](https://www.ovhcloud.com/en/public-cloud/public-image-catalog/) as well, Your mention of QEMU made me think you used their cloud offering. But maybe their VPS offering is different? – Claus Andersen Mar 25 '20 at 18:24
  • @ClausAndersen I've actually abandoned trying to use mfsBSD and taken an alternate approach detailed above. – HandsomeGorilla Mar 26 '20 at 18:10
  • If I read the [fdisk](https://www.freebsd.org/cgi/man.cgi?fdisk) man page correct then simply use `-i` rather than `-u` for your step number 2 (to simplify). Did not want to update the answer as I have not tested! Is this step even needed? I would assume the partition table would be overwritten by the raw image. – Claus Andersen Mar 28 '20 at 05:39
  • (and please add your update as an answer and check it as accepted. Then we can upvote :-)) – Claus Andersen Mar 28 '20 at 05:45

1 Answers1

2

Reboot in rescue mode from OVH's management panel. Once logged in (via SSH or KVM, either works), perform the following sequence of commands

  1. Unmount your original filesystem with umount /dev/sdb*. Note that the rescue system is mounted from /dev/sda. Don't touch /dev/sda.
  2. Destroy your original filesystem and the partition it lives on with fdisk. fdisk -u /dev/sdb followed by a series of d until the partition table is empty, then w.
  3. 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 meant apt-get install xz-utils.
  4. 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.

Note that step 2 may not be necessary; I performed it out of an abundance of caution. YMMV.