# FreeBSD 9 on Mac Mini i5 does not see partition after installation



## dahansen (Mar 23, 2012)

I have just completed an installation of FreeBSD 9 on a i5 Mac Mini. The installation went without a hitch - I wiped the disk clean of all Apple software and partitioned/labeled using the installer. The 64-bit (amd64) version was installed from the standard memory stick image.

Booting the Mac pro proves difficult though. It cannot find any bootable partitions and flashes the folder icon with a question mark. Here comes the strange bit however: if I insert a bootable memory stick after this happens, the Mac will identify the FreeBSD partition on the _harddrive_ and then boot from it. If I leave the USB stick in while powering on it won't boot but shows the USB stick as the only bootable option (and of course boot from it if it is selected).

The Mac was never booted into OSX. In retrospect I am unsure if this was a bad idea. Would it have made any difference if I ran BootCamp when I wiped the Apple partition anyway?

Does anybody know how to solve this or has anyone successfully installed version 9 on this type of Mac Mini? Any help would be very much appreciated.


dagS


----------



## dahansen (Apr 3, 2012)

For anyone else running into the problem above: I wrestled with this for quite some time before I gave up and used a bootable USB stick to circumvent the problem. 

It seems the new (mid 2011) Mac's EFI does not recognize the FreeBSD disks/partitions as bootable. One cannot select them as boot disks from the Disk Utility. Since Bootcamp allows Windows to boot I even tried installing a Windows (7) partition and then use the Win bootloader to boot into FreeBSD, but with little luck. I do however believe this is a possible way to navigate around the problem for anyone with more knowledge/patience then me - maybe XP is a better/easier option than Win 7 for this purpose.


----------



## EquZephyr (Apr 4, 2012)

I was able to solve this problem by using MBR partitioning instead of GPT. If the Mac can't find an EFI partition to boot from, it will fall back to looking for an MBR. But it doesn't seem like it supports GPT.


----------



## EquZephyr (Apr 4, 2012)

I should point out that there will be 30 to 45 second delay where the screen is just gray before it will do the MBR boot. But eventually it will give up trying to boot EFI and then try MBR. There are two possible ways I have read about to avoid the delay, but I have not tried either one myself.

1) Use the "bless" utility to bless the bootable disk. I believe this can be accessed by booting from your OS X DVD and then dropping to a terminal. Google will know more if you search for information on bless.

2) Use rEFIt as a bootloader to boot FreeBSD. This is an EFI boot menu ant toolkit. I've never tried using it to boot FreeBSD before, but I have used it with Linux and had good results.

Hope this information proves useful to you.


----------



## robtsgt (Apr 7, 2012)

*one of 3 minis worked with gpt*

I have experienced the same issues: Mac Mini won't recognize GPT disks.  I have three identical Mac Minis all purchased at the same time of summer of 2009, model MB463LL/A (https://support.apple.com/kb/SP505). 

I originally loaded Freebsd FreeBSD 7.x on them and they ran fine.  About a month ago I decided to update them to Freebsd FreeBSD 9.0 so I bought three new Seagate ST9320423AS 320GB drives. I picked one of the Mac Minis at random, replaced its old 250GB drive with the newer 320GB and booted up from the 9.0 RELEASE DVD.  I let the new install process guide me thr*ough* the GPT disk install process and rebooted.  The Mac Mini recognized the new GPT disk and booted from it just fine (slow but fine).  Then I tried the second Mac Mini and no luck. After the install and reboot, the Mac Mini does not recognize the GPT disk (boot with option key depressed and it only shows the DVD).  

I finally copped out and used bsdlabel to set that disk up as MBR, manually loaded the OS from the [shell] command line and it is recognized during boot and boots just fine (slow but fine).  Third Mac Mini same as second - no luck.  I even tried using dd to make a complete image copy of the working 320GB disk, wrote that out to a new 320GB disk and then tried booting from that and no luck. There must be some low level secret handshake between the Mac and the hard drive that isn't working.

If anyone has any experience in debugging a setup like this I'd love to hear what might be going wrong and what I might try to isolate the bug.

Here's the *gpart show* from the working gpt disk:


```
# gpart show
=>       34  625142381  ada0  GPT  (298G)
         34        128     1  freebsd-boot  (64k)
        162   41943040     2  freebsd-ufs  (20G)
   41943202  104857600     4  freebsd-ufs  (50G)
  146800802   52428800     5  freebsd-ufs  (25G)
  199229602  209715200     6  freebsd-ufs  (100G)
  408944802   25165824     7  freebsd-ufs  (12G)
  434110626  182452096     8  freebsd-ufs  (87G)
  616562722    8388608     3  freebsd-swap  (4.0G)
  624951330     191085        - free -  (93M)
```

Thanks-
Rob


----------

