boot into FreeNAS using 32bit EFI (not BIOS)

tangles

Dabbler
Joined
Jan 12, 2018
Messages
33
Hardware:
MacPro 2006 (has 32bit EFI)
32GB RAM
2 x QuadCore Xeon 64bit CPUs (have been upgraded)
6 x SATA ports
2 x PATA ports
Anytime the Mac boots using Legacy BIOS and not EFI, only 4 SATA ports are recognised, temperature sensors (and thus fan control) are not presented to the kernel correctly to be controlled. This leads to all sorts of heat issues where other people on the net experience the CPUs halting to protect themselves.
For obvious reasons, I would much prefer to get EFI boot happening.
I have used mattgadent.com's method to patch the FreeNAS 11.2-U3 ISO so that it has MBR boot only, and so the MacPro does boot the CD installer using BIOS legacy mode.

So I have booted up via CD and the FreeNAS installation asks whether to setup the PATA disk as EFI for BIOS.
If I choose EFI, a 64bit bootx64.efi file is copied to the ~260MB EFI partition. Naturally, the 32bit EFI of the Mac will not be able to execute this.
Using Sergey's blog as a reference, I thought I could swap out the bootx64.efi file in the EFI partition with a bootia32.efi file that is used to boot Ubuntu 64bit kernel via EFI.

After swapping out the file, GRUB drops into rescue mode and doesn't boot the FreeNAS boot loader and so clearly my knowledge about freeBSD/freeNAS is lacking.
I tried renaming the bootia32.efi file to bootx64.efi also, but got the same result.
I know these Macs are ancient, but I just can't bare to see them go to waste. Power consumption of these Macs is offset by our solar here so it would be great to put them to use somehow. I've installed Ubuntu 16 onto these MacPros via EFI okay and with 10GB Chelsio cards installed they make great backup machines with their 6xSATA ports, but I'd prefer to get FreeNAS installed if I can.
I have searched for posts booting FreeNAS/FreeBSD with Grub2 EFI, but cannot find any EFI howtos and only old BIOS posts.
Anyone able to suggest the glue needed to get a 32bit EFI of the MacPro to boot the FreeNAS/FreeBSD Bootloader?
Thanks.
 

tangles

Dabbler
Joined
Jan 12, 2018
Messages
33
I have!

I have 32bit files to make this happen including a 32bit file of boot1.efi, and a custom grub config file that's > 50 lines in length.

I'll be "having a play" this weekend in an attempt to get this happening…

A very big thank you goes out to floatboth who has pointed me in the right direction too.
 

tangles

Dabbler
Joined
Jan 12, 2018
Messages
33
So.

I can now get FreeBSD to boot via EFI… no BIOS involved at all and that works...

floatboat helped me to do this which involves 32bit Grub and also putting the FreeBSD kernel and ko's onto the EFI partition and then load the kernel from there and mount zroot.

FreeNAS is a bit different by the looks because if I copy all the contents of a FreeNAS install of /boot onto the efi partition I get no where. (black screen after Grub selection)

haven't given up yet, just need to understand FreeNAS boot process more I guess.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912

tangles

Dabbler
Joined
Jan 12, 2018
Messages
33
I thought Tiamo/PikeAlpha's boot loader was custom made for macOS EFI booting that looks in specific locations to boot macOS. With GRUB2, I can parse different values and have more control over the process. Well, that's how I understand it.

I'm able to boot the MacPro no problems using 32bit Grub2. I'm using version 2.02 of GRUB but it which is old when it comes to ZFS and so it can't mount and boot the kernel directly from the freenas-boot/default dataset. Moving the kernel and .ko files to the EFI partition is how I got around it on FreeNAS, but there's clearly more glue involved with FreeNAS that I still trying to understand.

I think I need to tell GRUB2 to not look for the zfs dataset freenas-boot/default but perhaps one of the bootloader files that exists in the /boot directly and chainload. I just don't know enough the process just yet.
 

Akshunhiro

Dabbler
Joined
Oct 27, 2016
Messages
35
Did you end up getting this working? I'm in the same boat. Spec'ed out 2006 Mac Pro not doing much but may not be worth the power consumption.
 

Akshunhiro

Dabbler
Joined
Oct 27, 2016
Messages
35
Thanks for the update. Hope you get it working. I ended up installing W10 so I can still get some use out of it. Now dual booting El Capitan and W10 Pro.
 
Top