4

The installer of FreeBSD 11.2 makes it fairly easy to install FreeBSD with a UFS root partition alongside Linux, using the Auto (UFS) option in the following dialogue:

enter image description here

Next it gives me the option to either use the entire disk or partition the disk to make a place for the install:

enter image description here

If I choose the Auto (ZFS) option I'm not given the option to partition the disk to prepare a place for the system to be installed. Therefore, I am wondering whether I can in fact install FreeBSD on a ZFS root alongside a Linux install, or whether it's a matter of if I want a ZFS root FreeBSD needs the entire disk.

The reason that I am looking at using a ZFS root is that I am presently having trouble with installing FreeBSD with a UFS root on a GPT partition table and I'm wondering whether using a ZFS root will be a decent workaround.

Can I install FreeBSD with ZFS for the root alongside other operating systems in existing partitions using the FreeBSD 11.2 installer? How?

  • 1
    Your best work around is to set up a virtualization system - kvm/qemu or virtualbox or vmware workstation, etc - and learn the BSD stuff in a vm – ivanivan Aug 20 '18 at 1:04
  • 1
    ZFS wants the whole device, so what you're trying to do won't work. As @ivanivan suggests, try installing FreeBSD in a vm where you can use UFS/GEOM or ZFS, or even mix them in a single system. – D_Bye Aug 23 '18 at 14:05
3

You can install FreeBSD manually on ZFS too. It is possible that the FreeBSD installer only supports having ZFS as the only thing on a drive, but that limitation does not exist in ZFS itself. You can put ZFS anywhere; on a partition, on an encrypted partition, on a virtual block device; anywhere.

So if you want to have several partitions and have one partition carry the ZFS filesystem and use it for booting FreeBSD, that is possible.

You can try to follow this guide:

Do make sure to make backups of the disk you are working with, so you can make mistakes without disaster.

Bewarned that FreeBSD might support more ZFS features (zpool-features) than Linux does; meaning that it might be best to create a ZFS pool without all features enabled, but rather enable the features you are actually going to use. You can always enable features later, but you cannot disable them later. So too many features could mean the entire ZFS pool is unusable in Linux, because it might not support one or two features present in BSD.

See what features your FreeBSD support:

  • man zpool-features
  • zpool upgrade -v

List of ZFS features and their OS support:

  • I'm accepting this without trying because it seems you did your research and there's a guide. But beware anyone looking at this that this isn't me saying it worked for me. I've abandoned the idea of doing this due to the risks of doing it myself. – BH2017 Sep 22 '18 at 11:57
  • Ah, I tried that guide and it failed. It seems the /boot/kernel/opensolaris.ko kernel wasn't found at the stage of trying to load it and zfs.ko. – BH2017 Nov 8 '18 at 1:41
  • Nvm I was merely messing it up, not sure how but after trying the simplest scenario (no other OS on disk) and re-trying with a Linux distro at the start of the disk I managed. – BH2017 Nov 9 '18 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.