FreeBSD on dedibox XC 2016


Hello !

I would like to install FreeBSD on an dedibox XC 2016.
I was found to automatize install from FreeBSD’s rescue partition via,, but no tutorial to use it.
Any suggestion?

1 Like


Yes you should be able to install FreeBSD on a Dedibox XC 2016 with this script :slight_smile:

However it was designed for our old SC offer (Via Nano) and uses 10.2 and not 10.3. It also uses a 32 Bit OS.
So you might improve the script at some points :wink:

To use it

  • Boot the server into FreeBSD rescue mode
  • Launch the script
  • CHROOT yourself into the partition once the script has finished
  • Create a user to login with SSH (or enable SSH access as root and set a password for it)

Don’t forget to enable the serial console of your server to have full access to all its features:

1 Like


Thanks for all, you rocks!
However, i’m a noob with FreeBSD in this context (i installed it on desktop or on server totally under my control usually), so, can you give me some details about CHROOT and the reboot procedure after install?


Ok, this is my version of the script:

#!/bin/sh -x
pkg install gpart wget
gpart destroy -F ada0
gpart create -s gpt ada0
gpart add -t freebsd-boot -l boot -s 512K /dev/ada0
gpart add -t freebsd-swap -l swap -s 1g -a 1m /dev/ada0
gpart add -t freebsd-ufs -l root -s 5g -a 1m /dev/ada0
gpart add -t freebsd-ufs -l tmp -s 1g -a 1m /dev/ada0
gpart add -t freebsd-ufs -l var -s 5g -a 1m /dev/ada0
gpart add -t freebsd-ufs -l usr -a 1m /dev/ada0
gpart bootcode -b /boot/pmbr /dev/ada0
gpart bootcode -p /boot/gptboot -i 1 /dev/ada0
newfs -j -L root /dev/gpt/root
newfs -j -L tmp /dev/gpt/tmp
newfs -j -L var /dev/gpt/var
newfs -j -L usr /dev/gpt/usr
mount /dev/gpt/root /mnt
mkdir /mnt/var
mkdir /mnt/tmp
mkdir /mnt/usr
mount /dev/gpt/tmp /mnt/tmp
mount /dev/gpt/var /mnt/var
mount /dev/gpt/usr /mnt/usr
cd /mnt && wget ""
cd /mnt && wget ""
tar --unlink -xpJf /mnt/base.txz -C /mnt
tar --unlink -xpJf /mnt/kernel.txz -C /mnt
cat << EOF > /mnt/etc/fstab
/dev/gpt/swap none swap sw 0 0
/dev/gpt/root / ufs rw 1 1
/dev/gpt/tmp /tmp ufs rw 2 2
/dev/gpt/var /var ufs rw 2 2
/dev/gpt/usr /usr ufs rw 2 2
cat << EOF > /mnt/etc/rc.conf
cat << EOF > /mnt/boot/loader.conf
cat << EOF >> /mnt/etc/ttys
ttyu1   "/usr/libexec/getty std.9600"   vt100   on  secure

echo "terminated"

To use it:

  1. Boot your server into FreeBSD rescue mode;
  2. Log in it using SSH;
  3. Create file ./ and copy/paste the script;
  4. chmod u+x ./;
  5. ./;
  6. chroot /mnt /usr/bin/env -i TERM=$TERM /bin/sh (not sure about /usr/bin/env, do whereis env to check it);
  7. whereis adduser;
  8. path/to/adduser;
  9. Reboot your server using online’s console;
  10. Profit!

Thanks for your help!

1 Like