FreeBSD: Setup properly small kimsufi (ovh) server (non-zfs) on FreeBSD 10.1 (disk setup ufs, vanilla freebsd, ipv6)

This tutorial is made for OVH Kimsufi server, the small one, where you can’t setup ZFS. They are deliver with an awful partition scheme by default and a custom kernel that break after the first freebsd-update.

And of course because of the awful partition, it is almost impossible to repair after reboot.

So I made this tutorial to ensure you setup properly your server and avoid any issue after update and reboot.

In bonus, I will show you a stable way to get your IPV6 working, which is not very obvious with OVH.

In this topic we will :

  • Default install FreeBSD 10
  • Reinitialize disk (ufs for small server)
  • Install vanilla FreeBSD (original kernel, ideal for update without issue)
  • Setup cron rtsol for ipv6
  • Update your distribution

Default install FreeBSD 10

I strongly suggest you to add a ssh key, so you will not need any password to connect to your server. It is the same for the rescue mode.

First of all, you need to get your network configuration. So you will install a default FreeBSD 10.1. You don’t care about the partitioning, we will reset this in rescue later.

When it is done, check that you can connect to ssh, and copy the network content of you “rc.conf”. You will need to get the network information in rescue, and change the file to make it work properly in IPV6.

In “kimsufi 2G” it should look like this at the end :

In this case, your ethernet card name is “em0”. You may have something else. You will need to use your name for your ethernet configuration.

Reinitialize disk (ufs for small server)

Now you need to restart in rescue. Go in your interface, NetBoot, Rescue, select bsd10_64-rescue-pro and validate. Then on your server, reboot.

OVH will send you your remote connection information as soon as the server is ready.

Connect in ssh, and be ready to prepare your disk.

I have follow the GPT version of this tutorial : Disk Setup

This is very simple, and the OVH server is fresh enough to support it ! The mbr version is far more complicated, and pointless in this case.

So to get my drive, I run gpart show :

In my case, it is “ada0”.

The most important think to know is that you absolute need to get the boot partition in first place. And this partition need to contain a “/boot”. Otherwise your server will not boot and you will have to indicate everything manually, which is impossible in remote.

To simplify, I create a big root partition, and let enough swap at the end. You need at least 2GB for the root, but 4G may be better. In case of update, your root partition will almost double.

So here my “single big” partition :

You need now to compute a little to get your swap at the end.

Let’s show again what left of the partition :

We can see in my case, than we have “8387511” sector free. And that mean 4GB.
The sector size seems to be 512b : 4*1024*1024*1024/8387511

So let say I want 256M of swap. That mean: 256*1024*1024/512 = 524288 sector.

I will put the partition at position 1M to be align, so that mean sector 2048. That mean we have freespace of (8387511 – (2048 – 1064))
So we need to create a root partition of (8387511 – 984) – 524288 = 7862279.
And in megabytes : 7862279*512/1024/1024 = 3839M.

Now we can create a partition of 3839M and it will left 256M for the swap partition :

If the round trip on size is not exact and give your 1 more megabytes for your swap and you are not happy with it, you can delete the partition and recreate it easily :

Now you can format your root partition:

And mount it in /mnt

Install vanilla FreeBSD (original kernel, ideal for update without issue)

Now you can fetch the latest release.

First go in freebsd ftp and find the release you want :


In my case, I take the 10.1-RELEASE.

So we need to fetch at least “base.txz” and “kernel.txz”.
I will fetch them all, feel free to remove what you want :

Then unpack and clean them all :

Add in etc/fstab the rootfs and swap :

Create etc/rc.conf with the configuration you have saved. Use this setup below with your network configuration to make ipv6 works :

Now let’s configure ssh access.

First be sure you can root login, in etc/ssh/sshd_config:

Then add your or in /root/.ssh/authorized_keys

If you don’t have one, generate it on your desktop :

Then retrieve it :

If you prefer a root password instead, you need to enter in chroot and run passwd :

Setup cron rtsol for ipv6

Add the rtsol cron for ipv6, or it will stop working after few minutes, in etc/crontab :

Update your distribution

You are now ready to boot on your new FreeBSD server.

Before this, in your OVH interface, go to Network, HardDrive, Save.

Then you can reboot: “reboot”

After few minutes, you can now go to your server and test ipv4 / ipv6 :

Let’s running freebsd-update and reboot :

Enjoy your clean FreeBSD distribution on your OVH server !


Short URL: