Installing FreeBSD 14.0 on a 2013 Mac Pro

Installer

Downloaded FreeBSD-14.0-RELEASE-amd64-memstick.img burned it on a USB thumb drive. Edited the /boot/loader.conf by adding the following line:

hw.pci.enable_pcie_hp="0" to disable PCI-express HotPlug because it would not boot otherwise and the console would spit out pcib8: Power Fault Detected in a loop. While researching how to overcome the boot fault I discovered this page: https://anschwa.com/blog/2022/01/03/installing-freebsd-on-2013-macpro.html where someone else had done what I was trying to accomplish. I followed the instructions but then I realized that the partition created by Adam in that blog was UFS and not ZFS as I wanted, a dual boot macOS Monterey + FreeBSD 14.0 in a ZFS partition. I’m not sure this is a good idea but I did it anyway.

Resizing macOS

The Mac Pro has a 500GB HD. I resized my macOS partition by adding an additional 2 partitions. 125GB for the MacOS partition, 371GB “untitled 2” for my FreeBSD install and 4.11 GB partition “untitled” for swap.

Installing FreeBSD

Following the instructions on the blog I created the freebsd-root and freebsd-swap partitions.

Creating freebsd-root partition

I created the root partition by selecting ada04p4 selecting [modify] then changing the default type from freebsd-ufs to freebsd-zfs Mountpoint: / Label: rootfs

Creating freebsd-swap partition

I then deleted the smaller 3.8GB ms-basic-data partition and create a new freebsd-swap partition. Type: freebsd-swap Size: 3920MB Label: swapfs

Final partition table

“After creating these custom partitions, the only thing left to do is remember to add hw.pci.enable_pcie_hp="0" to /boot/loader.conf before rebooting.”

Post Installation

After installing I was able to boot directly into FreeBSD. During the install I allowed the installer to delete and recreate the EFI partition. Since I used ZFS for the FreeBSD install, I didn’t need to change the fstab file. I also followed Adam’s lead and disabled hyper threading echo 'machdep.hyperthreading_allowed="0"' >> /boot/loader.conf I believe that it will improve single thread performance or something like that.

I asked chatGPT and this was the answer:

Disabling hyper-threading can have several advantages in certain scenarios:
  1. Improved Performance Stability: In some cases, especially with certain workloads or applications, disabling hyper-threading can lead to more stable performance. This is because hyper-threading can sometimes introduce overhead and contention for shared resources, which may impact performance under specific circumstances.
  2. Reduced Power Consumption: Disabling hyper-threading can lead to reduced power consumption since fewer logical cores are active, which may be desirable in environments where power efficiency is a priority.
  3. Potential Compatibility: Some applications or workloads may not be optimized for hyper-threading or may even exhibit issues when running on systems with hyper-threading enabled. Disabling hyper-threading can potentially improve compatibility with such applications.
  4. Better Resource Isolation: Disabling hyper-threading can help in scenarios where strict resource isolation is required between different tasks or virtualized environments. Without hyper-threading, each physical core behaves more independently, which can aid in resource isolation.
  5. Debugging and Troubleshooting: Disabling hyper-threading can also be useful in debugging and troubleshooting scenarios, especially when investigating performance issues or unexpected behavior that may be related to hyper-threading interactions.

One response to “Installing FreeBSD 14.0 on a 2013 Mac Pro”

Leave a comment

Design a site like this with WordPress.com
Get started