Booting FreeBSD on a Macintosh?

Michael Sinatra michael at rancid.berkeley.edu
Sat Jan 18 20:10:16 UTC 2014


On 01/15/14 11:26, Volker Nebel wrote:
> 
> On Wed, 15 Jan 2014, Michael Sinatra wrote:
> 
>> On 1/15/14 3:01 AM, Volker Nebel wrote:
>>> Dear all,
>>>
>>> looking for a good a computer I bought a Macmini 6,1 with Intel Core i5
>>> last summer, then installed Ubuntu (for amd64) on it and now came back
>>> to FreeBSD (already running on my laptop). Having installed this, the
>>> macmini does not boot anymore, unfortunately. It only shows a blinking
>>> question mark in a folder symbol.
>>>    I searched the web for hints and found half a dozen of pages
>>> describing how to run both, Mac OS and FreeBSD. One page recommanded to
>>> issue
>>> "gpart bootcode -b /boot/pmbr -p /boot/gtpboot -i 1 ada0" after the
>>> installation and before reboot, but this didn't help. I found the hint
>>> to use FreeBSD for i386 - same result. (And it did boot Ubuntu for
>>> amd64.) Someone else recommanded to use MBR partitioning scheme instead
>>> of GPT, but the Partition Editor of the FreeBSD Installer returns "Error
>>> Invalid Argument" when I try to Create a partition of type freebsd-boot
>>> and size 64k or 512K.
>>>    Can anybody help? How can I install FreeBSD 9.2 on a Macmini and
>>> boot?
>>
>> Surprisingly, the way I have gotten it to work is to use a good,
>> old-fashioned BSD-style disklabel.  I just installed FreeBSD 10-RC1 on a
>> Mac Mini, but it was the oldest possible Intel version (a 1,1).
>>
>> If you install 9.2 the way you would install 8--use an MBR partition
>> with BSD disklabel on slice 1, you should get it to boot.
>>
>> I am not close to the machine right now, and it's powered off, but I can
>> fire it up and send you the partition/label parameters.
>>
>> Again, this is a very old 1,1 (still, it's an EFI system, but it's only
>> 32-bit), but the same scheme might work on your system as well.
>>
>> michael
>>
>>
>>
> 
> Hi Michael,
> 
> thank you for the hints! Though I would prefer GTP disk layout because
> booting with MBR may take longer (Apple first looks for GTP file system,
> that's what one of the posts said), I wouldn't mind doing so. But as I
> wrote, I don't get the first slice created. Is type freebsd-boot wrong?

I read that also, but I am not sure it's quite right.  At any rate the
following MBR partition scheme boots just fine on a Mini 1,1:

[kenai] /home/michael# gpart show
=>       63  125045361  ada0  MBR  (60G)
         63  125045298     1  freebsd  [active]  (60G)
  125045361         63        - free -  (32K)

=>        0  125045298  ada0s1  BSD  (60G)
          0  117440512       1  freebsd-ufs  (56G)
  117440512    7604224       2  freebsd-swap  (3.6G)
  125044736        562          - free -  (281K)


Oddly, if you skip the MBR and just do a BSD disklabel on the device
(similar to the old "dangerously dedicated" mode), it will still boot
properly into FreeBSD.

I have yet to find a GPT scheme that will boot from a Mac Mini's EFI (at
least without something like rEFIt, but even that doesn't always work
with GPT schemes).  I assume that's because the Minis I have are really
old; however, I have a newer mini (the one I am composing this message
on--I think it's a 3,1) that also boots with a similar MBR scheme.

The easiest way to install this with the newer bsdinstallers is to
select "Manual" partitioning and then create an MBR partition with the
first slice for FreeBSD, and then label that slice with a BSD dislabel,
in the same way that sysinstall would have done it for 7.x or 8.x.
After that, it should "just work."

michael



More information about the freebsd-amd64 mailing list