ZFS on root install with multi-boot

tuaris

Active Member

Reaction score: 5
Messages: 128

I have a pre-2015 MBP that runs MacOS X and Windows 7. There is about 70 GB of free space at the end of the SSD. I figured, why not install FreeBSD on it and have a neat triple boot setup.

I'd like to use ZFS but bsdinstall doesn't handle automatic partitioning with ZFS very well in this case. It by default wants to use the entire SSD. The only option seems to be the manual partitioning approach, but I'm not sure what I would need to do to make sure it's done correctly and is able to boot.

This is the output of gpart on the system using the bootable installation image

Code:
=>       34  977104993  ada0  GPT  (466G)
         34          6        - free -  (3.0K)
         40     409600     1  efi  (200M)
     409640  237144560     2  apple-hfs  (113G)
  237554200    1269544     3  apple-boot  (620M)
  238823744       1728        - free -  (864K)
  238825472  583036928     4  ms-basic-data  (278G)
  821862400  155242627        - free -  (74G)

=>       34  977104993  diskid/DISK-S1K5NYAF540231  GPT  (466G)
         34          6                              - free -  (3.0K)
         40     409600                           1  efi  (200M)
     409640  237144560                           2  apple-hfs  (113G)
  237554200    1269544                           3  apple-boot  (620M)
  238823744       1728                              - free -  (864K)
  238825472  583036928                           4  ms-basic-data  (278G)
  821862400  155242627                              - free -  (74G)
 

monwarez

Member

Reaction score: 9
Messages: 26

Given there is an EFI partition, I assume that UEFI is in use, in that case FreeBSD will need to install it's loader in /EFI/FreeBSD/BOOTX64.efi . Which is not currently possible ( FreeBSD UEFI) .
Another possibility would be to use legacy BIOS to load a FreeBSD bootloader, create two slices: one for the boot, the other for the zfs filesystem.
And then update the bootcode (assuming it is the 5th):

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 5 ada0

For the partitioning it will be a freebsd-boot for the boot partition and a freebsd-zfs for the zfs one.
 
Top