How do I install ZFS-encrypted FreeBSD in a multiboot system?

  • Thread starter Deleted member 61330
  • Start date
D

Deleted member 61330

Guest
Basically, I want to do an encrypted installation of FreeBSD alongside Linux in a multiboot system and so far, I only know how to perform a guided installation which would, of course, overwrite the entire hard drive.

Help please?
Thanks.
 
I only know how to perform a guided installation which would, of course, overwrite the entire hard drive.
You can perform a guided encrypted installation of FreeBSD alongside Linux in a multiboot system easily with a modified installer image, but the problem here is how to boot that system with a boot manager. As far as I know GRUB2 (or any other boot manager) isn't capable of booting ZFS on root encrypted FreeBSD partitions.

The only case I can imagine is a two disk system, disk one, first system FreeBSD, second system Linux, disk two having the boot manager (can be a (mini) USB stick, SD card, etc.). To boot FreeBSD set it as first boot device in BIOS/UEFI, to boot Linux choose from the BIOS/UEFI boot menu the other disk with the grub boot manager, or vice versa. The alternative is a manually performed encrypted ZFS installation with unencrypted /boot, visible for GRUB. If I'm not mistaken there are howto's here at the forum.

If you like to go the two disk way, first install FreeBSD (otherwise the modified installer will overwrite what is installed first), second Linux, choose the USB stick (SD card,etc.) as target for GRUB installation.

For the FreeBSD system installation, take a official installer image, preferable for USB sticks. The script to partition and install ZFS on root is called zfsboot, that script needs to be changed. Last year, at the end of December, someone proposed to add to bsdinstall(8) the option to set the ZROOT partition size. Download the modified zfsboot script, mount the USB system installer stick, replace /usr/libexec/bsdinstall/zfsboot. Before replacing, check the formatting with FreeBSD's vi(1) or less(1), other editors/viewers might not show irregular formatting's. If you get an error entering the ZFS Configuration menu, then the formatting is not right. Now in the ZFS Configuration menu you can set a disk size for zroot.
 
Well, I took a stab at installing FreeBSD alongside Linux anyway.

Here's the rub.
I created an msdos partition table with a boot partition along with an extended partition with two logical partitions inside. I installed Linux in the first logical partition.

I chose to install FreeBSD manually and selected the second logical partition for modification. It was previously formatted to ext4.

In the FreeBSD installer, it was originally formatted to "linux-data" and I changed it to "freebsd-zfs" and assigned it to the root partition.

But I got the following error messages.
This file system (freebsd-zfs) is not bootable on this system. Are you sure you want to proceed?

Whether I went for zfs or ufs, when I click "Yes", I get this one
Operation Canceled. pre-check failed.
 
Back
Top