# Macbook PRO installer freeze



## ummon (Mar 15, 2010)

Hello, I am trying to install FreeBSD 8.0 amd64 on my Intel Core 2 Duo Macbook Pro and was running into a problem.

When I boot the install CD, it starts printing hardware information and appears to freeze at:


```
acpi0: <APPLE Apple00> on motherboard
```

I waited several minutes and it didn't do anything. Is there something I am doing wrong or is there a bug in the installer?

Thanks for any help,
Ummon


----------



## User23 (Mar 15, 2010)

http://wiki.freebsd.org/AppleMacbook



> FreeBSD 8.0 issues
> 
> If your system stops early at boot, try reverting r189055: http://svn.freebsd.org/viewvc/base?view=revision&revision=189055



i hope this will help you.


----------



## trev (Mar 17, 2010)

User23 said:
			
		

> http://wiki.freebsd.org/AppleMacbook
> i hope this will help you.



Running a kernel from a year earlier with today's user land is not generally recommended. But you're right, it's the only work-around at present


----------



## Zare (Mar 17, 2010)

Why? Linux users do it all the time hehe


----------



## rah (Apr 1, 2010)

User23 said:
			
		

> http://wiki.freebsd.org/AppleMacbook
> 
> 
> 
> i hope this will help you.



I tried to install 8.0-RELEASE on my MacBook a couple of months ago, and I also had the installation hang up.  I did a websearch and found the link posted by User23, but I didn't understand what to do with it.  What does it mean to "revert" r189055?  Do I need to do something with the installation CD?


----------



## ummon (Apr 2, 2010)

I haven't done so yet, but I think it means to install FreeBSD 7.x.  Perhaps it may also be possible to change the ACPI handling code back to the 7.x version, and compile FreeBSD 8.0 from source. However, that is something I am not experienced enough to do.


----------



## rah (Apr 2, 2010)

Thanks ummon.  Maybe I'll try 7.3 sometime.

I never had an Apple until this MacBook, and I hate the OS!  I loaded Ubuntu beside it and I'm very happy with that -- been using it on and off since 5.04 Hoary Hedgehog -- but I think I might really enjoy FreeBSD . . . if I can ever get it installed!


----------



## Miah (Apr 2, 2010)

User23 said:
			
		

> If your system stops early at boot, try reverting r189055: http://svn.freebsd.org/viewvc/base?view=revision&revision=189055
> i hope this will help you.


Actually, this doesn't help me in the least. If there's a way to make an installer disk for FreeBSD without having FreeBSD, I would like to know. I cannot seem to install the 7.3 version as it hangs and/or panics every time I boot from the disk.


----------



## ummon (Apr 3, 2010)

Yes. Could one of those lucky enough to have FreeBSD already installed do us unfortunate people a favor and build freebsd with the ACPI revision reverted? :e


----------



## lunaticitizen (Apr 11, 2010)

ummon said:
			
		

> Yes. Could one of those lucky enough to have FreeBSD already installed do us unfortunate people a favor and build freebsd with the ACPI revision reverted? :e


I have a computer with FreeBSD and now I'm trying to install FreeBSD on another computer (a Mac Mini). I'm wiling to do the job but how do you actually do it?


----------



## klanger (Apr 11, 2010)

you could also try pc-bsd bootonly/net-install disk since it has an option to install FreeBSD and it works on a macbook.


----------



## tingo (Apr 11, 2010)

@ummon, @Miah: have you tried disabling acpi from the boot menu? Perhaps this will allow you to install the os.


----------



## ummon (Apr 12, 2010)

tingo said:
			
		

> @ummon, @Miah: have you tried disabling acpi from the boot menu? Perhaps this will allow you to install the os.



Sorry if this has an obvious answer, but how do you do that? I never get the chance to give any input when I boot the installer. I just tell my firmware to boot from the CD, and it tries to do that, and I think it succeeds in loading the installer or maybe the bootloader for the installer and then I get the crash at the ACPI.

As for how to compile with the ACPI changes reverted, I have no clue (I'm not experience enough to know how to tweak these things and make custom compiles).


----------



## lunaticitizen (Apr 12, 2010)

Btw I just installed 7.3-RELEASE i386 and it seems to work just fine. The only drawback is that it only recognizes 2.8 GB of RAM instead of 4 GB. I haven't tried the PAE kernel but someone said that it causes the computer to hang. And it appears that the amd64 version of any FreeBSD release wouldn't work at all, at least in intel mac mini.


----------



## leopard (Apr 17, 2010)

lunaticitizen: I have a Macbook Pro and was considering installing FreeBSD on it in the near future. Did you try the amd64 arch 7.3 release on your Macbook Pro or just the Mac Mini? 

OP: Did you ever get it running disabling ACPI? After you boot from the CD, disabling ACPI should be the second or third option on the list.


----------



## lunaticitizen (Apr 18, 2010)

leopard said:
			
		

> lunaticitizen: I have a Macbook Pro and was considering installing FreeBSD on it in the near future. Did you try the amd64 arch 7.3 release on your Macbook Pro or just the Mac Mini?
> 
> OP: Did you ever get it running disabling ACPI? After you boot from the CD, disabling ACPI should be the second or third option on the list.


I only have a Mac Mini and the releases I have tried to install are 8.0 i386, 8.0 amd64, and 7.3 i386. So far it only works with 7.3 i386. I haven't tried PAE kernel but according to this post it doesn't work.


----------



## trev (Apr 19, 2010)

> Did you ever get it running disabling ACPI?



This has no effect - I have tried it before.


----------



## oldnavy (Apr 19, 2010)

trev said:
			
		

> This has no effect - I have tried it before.



It appears something usb related with the boot loader,
First of all, it will not count down to 10, if you don't hit anything for about 3 seconds, it will automatically start booting the default, and the counter will still say "10"

If you hit anything other, it appears to take it off to no-where land or something, because it will just hang at "all memory above 4gig will be ignored"

When I hit the space bar, to pause it, the counter then read "-61730"
so this tells me, something strange happening with bootloader & usb.

What I am trying to say, disabling the ACPI might actually work, but it appears this option isn't really being passed when you select #2.


----------



## Miah (Apr 19, 2010)

oldnavy said:
			
		

> What I am trying to say, disabling the ACPI might actually work, but it appears this option isn't really being passed when you select #2.


Im pretty sure this is passing *something*. The area it fails is different depending on my selection.

"Normal": http://img.skitch.com/20100419-8bws2aa6f9b3jq373b9ctdjp4j.jpg

ACPI off OR safe boot: http://img.skitch.com/20100419-bk1n192x48rfaadmp238kdd59h.jpg

These are from 7.3. 

8.0 also fails naturally.


----------



## uchman (Apr 22, 2010)

*Installing 7.3.*

Hi, im trying to install 7.3 (everything works out nicely) but the installer screws the other two partitions. I dont understand the fdisk manual. How can I fix the partitions?


----------



## uchman (Apr 23, 2010)

*fdsik.*

Well. I managed to fix the problem with darwins fdisk-tool. But the keymap is veery wrong. what keymap works? (I have a swedish macbook pro 7,1)


----------



## lunaticitizen (Apr 24, 2010)

uchman said:
			
		

> Well. I managed to fix the problem with darwins fdisk-tool. But the keymap is veery wrong. what keymap works? (I have a swedish macbook pro 7,1)


Was there no Swedish keymap listed when you did the installation with sysinstall? I was able to install Japanese keymap here and it works just fine.


----------



## uchman (Apr 25, 2010)

Yes there is. But it seems to be another problem. No keymaps seems to work actually. 

What model of MacBook Pro do you have and what version of FreeBSD did you install?


----------



## ummon (May 8, 2010)

Sorry I didn't post earlier. I can't disable the ACPI because I never get to the boot screen. Before I have selected any option, the installer hangs.


----------



## zeroseven (Jun 13, 2010)

Has anyone found a suitable solution for this?  I also have  a Macbook Pro 5, 1 and have the same problem as the OP.  I've also looked at the references to revert back to whatever revision.  I also don't understand what I should do with it.


----------



## Miah (Jun 13, 2010)

From what I understand, in order to revert that change, you would need to install a 7.x version, revert that change in the 8.x update data, and then apply 8.x.

Of course, this is a moot point for both you and me (I have a 5,1 as well) because 7.x won't install either.

I've asked if there's another way to generate a boot disk without having FreeBSD installed in the first place. No explanation nor any premade disk has as of yet been forthcoming. Right now it's impossible to tell if that one revision is holding us back or if there' more to it, because right now, from what I understand and with the truly minimal feedback I've been given, installing on a MBP5,1 is simply impossible.


----------



## zeroseven (Jun 14, 2010)

Thanks for the reply.

That is what I feared.


----------



## bombuzal (Jul 18, 2010)

Hello,

I have a Macbook 6,1 and have the same problem with 8.0 and 8.1-RC2 (i386), disabling ACPI does get the kernel further but it freezes again after receiving some errors about memory and devices, and then finally on an error about the ohci/USB subsystem.

It looks like I'm going to try 7.3 and/or a couple of AMD64 builds to see if I can get any further; It's a shame because FreeBSD could be a perfect OS for macbooks, I hope the issue is resolved in the upcoming 8.1-RELEASE.


----------



## klanger (Jul 18, 2010)

Isn't mac os x "a perfect OS for macbook"?


----------



## bombuzal (Jul 18, 2010)

> Isn't mac os x "a perfect OS for macbook"?



Haha, well... I'm not an Apple fanboy and only got this macbook after tiring of hacking OS X to run on my other hardware as a general, well-supported 'desktop' OS -- it doesn't cover all my needs though, and I've always been a FreeBSD+OpenBSD user too so... 

7.3 kernel+sys boots fine on the Macbook 6,1 by the way.


----------



## bombuzal (Jul 19, 2010)

Just a quick update. 7.3 has some issues with the Apple USB keyboard as described in the link below. After 2 attempts with an old external USB keyboard (also Apple :/) I eventually got a working system but the keyboard situation is so sensitive that I haven't been able to login yet (characters appear as extended ASCII/ansi-style symbols).

I found this which reports the same keyboard problems and also some more info on fixing 8/9 so that it will boot on newer Macbooks:

http://old.nabble.com/Keyboard-problem-with-new-MacBook-Pro.-td28354669.html


----------



## rah (Jul 23, 2010)

Thanks for the updates.  I still want to get into FreeBSD but I think I may buy a separate machine for it.  For years I had a desktop machine partitioned 10 different ways with many flavours of Linux and I enjoyed that very much.  But my MacBook 6,1 is working nicely with Ubuntu, and I don't have much space left anyway, so I'll probably leave it alone to ensure I have a working machine.

It's unfortunate that I've never gotten FreeBSD to load though.  I don't mind having to set up everything else -- in fact, I look forward to it -- but when I can't even get a base system to run! :\


----------



## bombuzal (Jul 23, 2010)

I'm sorry to hear that rah.  To be honest Ubuntu 10.xx is probably the most suitable UNIX-like OS/Linux distro for the MB6,1 for hardware compatibility at the moment.  This issue with macbooks has been known for nearly a year, since before the final 8.0-RELEASE - I was kind of hoping that 8.1R would've fixed it (there're even some notes referring to it in the old 8.0 TODO list - http://wiki.freebsd.org/8.0TODO).  

If I don't reinstall Linux onto that part of the disk I'll probably just keep the half-working 7.3 install until some proper patches to fix all macbook boot issues are available - it's certainly not practical to run 8.0 userland with a 7.3 kernel .

I hope you do get a separate machine to install FreeBSD onto - it truly is a great, stable and secure OS... but not without its quirks!


----------



## ernie (Jul 30, 2010)

Just to confirm that the same type of freezing (after the acpi0: <APPLE Apple00> on motherboard)  occurs with the latest Mac Mini Server, and FreeBSD 8.1-RELEASE

No doubt the hardware has a lot in common with the latest Macbook here is some info on it:



> Hardware Overview:
> 
> Model Name:	Mac mini aluminum
> Model Identifier:	Macmini4,1
> ...




I would love to get FreeBSD running on the Mac Mini Server, it's a great little box.


----------



## Rukulusalat (Jul 31, 2010)

I am experiencing the same problem on a MacBook Pro 5,3 using the FreeBSD 8.1-RELEASE amd64 CD-DISC ISO.

I tried searching for this bug in FreeBSD's bug reports, but I seem unable to find it, which makes me wondering if a bug report has been submitted?


----------



## zeroseven (Sep 2, 2010)

Bump

Does anyone know the proper method to get this noticed?  I tried freebsd a few months ago for the first time in years and really hate having to use a linux right now..


----------



## ummon (Sep 3, 2010)

zeroseven said:
			
		

> Bump
> 
> Does anyone know the proper method to get this noticed?  I tried freebsd a few months ago for the first time in years and really hate having to use a linux right now..



I dunno. I had resigned to accepting that FreeBSD will not be usable until they fix the bug, and assumed they knew about it and would work on it. But if they don't know about it, I suppose we should send it off to some mailing list. I'll try to find out what we are supposed to do...


----------



## Miah (Sep 4, 2010)

ummon said:
			
		

> I dunno. I had resigned to accepting that FreeBSD will not be usable until they fix the bug, and assumed they knew about it and would work on it. But if they don't know about it, I suppose we should send it off to some mailing list. I'll try to find out what we are supposed to do...


I have resigned to accepting that FreeBSD will _never_ be useable on these models. The bug is in theory incredibly minor in nature, requiring a single commit revert.

And yet, after 17 months, I'm still waiting. This thread is ignored by anyone able to do anything about it and my ticket was also ignored.


----------



## ummon (Sep 5, 2010)

Miah said:
			
		

> I have resigned to accepting that FreeBSD will _never_ be useable on these models. The bug is in theory incredibly minor in nature, requiring a single commit revert.
> 
> And yet, after 17 months, I'm still waiting. This thread is ignored by anyone able to do anything about it and my ticket was also ignored.



In that case, does anyone in this thread have a working FreeBSD? Could you just manually make the revert and build a copy of FreeBSD for us? :e


----------



## ernie (Nov 10, 2010)

Just tried the Nov 9.0-CURRENT snapshot and it's still freezing just after the acpi probe. If you turn off acpi it still crashes earlier on.


----------



## ummon (Nov 10, 2010)

I just went ahead and installed OpenBSD.


----------



## jkim@ (Nov 22, 2010)

This problem should be fixed in CURRENT as of r215703.  I will MFC the fix for 8.2 before code freeze.


----------



## zeroseven (Nov 23, 2010)

This is exciting, hooray!


----------



## uchman (Nov 23, 2010)

jkim@ said:
			
		

> This problem should be fixed in CURRENT as of r215703.  I will MFC the fix for 8.2 before code freeze.


YEY! What about the new macbook air? 
Hardware Overview:

  Model Name:	MacBook Air
  Model Identifier:	MacBookAir3,1
  Processor Name:	Intel Core 2 Duo
  Processor Speed:	1.4 GHz
  Number of Processors:	1
  Total Number of Cores:	2
  L2 Cache:	3 MB
  Memory:	4 GB
  Bus Speed:	800 MHz
  Boot ROM Version:	MBA31.0061.B00
  SMC Version (system):	1.67f3


----------



## ernie (Nov 26, 2010)

jkim@ said:
			
		

> This problem should be fixed in CURRENT as of r215703.  I will MFC the fix for 8.2 before code freeze.



This is good, I would like to try it out, which means I need a CURRENT bootable iso of some sort. Normally you could get daily snapshots from http://snapshots.us.freebsd.org but that site seems to be down. Does anyone know of another daily snapshot site?


----------



## jkim@ (Nov 30, 2010)

ernie said:
			
		

> This is good, I would like to try it out, which means I need a CURRENT bootable iso of some sort. Normally you could get daily snapshots from http://snapshots.us.freebsd.org but that site seems to be down. Does anyone know of another daily snapshot site?



http://pub.allbsd.org/FreeBSD-snapshots/

FYI, the fix was MFC'd to stable/8.


----------



## ernie (Dec 1, 2010)

jkim@ said:
			
		

> http://pub.allbsd.org/FreeBSD-snapshots/
> 
> FYI, the fix was MFC'd to stable/8.



I tried that site the other day, it gave me an iso with Nov 3 kernel build and not the fix.

Which version should I grab?

Is RELENG_8_1 for amd64 appropriate.

I think I tried HEAD last time.


----------



## jkim@ (Dec 2, 2010)

ernie said:
			
		

> I tried that site the other day, it gave me an iso with Nov 3 kernel build and not the fix.
> 
> Which version should I grab?
> 
> ...



RELENG_8 from Nov 27 or HEAD from Nov 23, I think.  I have confirmed that 8.1-RELENG_8-20101201-JPSNAP and 9.0-HEAD-20101201-JPSNAP have these fixes.


----------



## ernie (Dec 3, 2010)

jkim@ said:
			
		

> RELENG_8 from Nov 27 or HEAD from Nov 23, I think.  I have confirmed that 8.1-RELENG_8-20101201-JPSNAP and 9.0-HEAD-20101201-JPSNAP have these fixes.



Tried the 8.1-RELENG_8-20101202-JPSNAP CD on a new Mac Mini, it boots! However the installer can't find any hard drives to install on. This is the same problem the Linux kernels before 2.6.35 had, not talking to the MCP89 controller chip correctly. Unfortunately I don't know the specifics of the problem, or how the Linux kernel solved it.


- Ernie.


----------



## jkim@ (Dec 3, 2010)

ernie said:
			
		

> Tried the 8.1-RELENG_8-20101202-JPSNAP CD on a new Mac Mini, it boots! However the installer can't find any hard drives to install on. This is the same problem the Linux kernels before 2.6.35 had, not talking to the MCP89 controller chip correctly. Unfortunately I don't know the specifics of the problem, or how the Linux kernel solved it.
> 
> 
> - Ernie.



I don't know much about the problem.  Can you please try loading ahci.ko?


----------



## theobub (Dec 14, 2010)

jkim@,

Tried it without success. I really do not know what to do anymore. I'll try a little bit more, but just for the record, I never went to this much trouble installing FreeBSD before.

Thanks for your time.


----------



## jkim@ (Dec 17, 2010)

ernie said:
			
		

> Tried the 8.1-RELENG_8-20101202-JPSNAP CD on a new Mac Mini, it boots! However the installer can't find any hard drives to install on. This is the same problem the Linux kernels before 2.6.35 had, not talking to the MCP89 controller chip correctly. Unfortunately I don't know the specifics of the problem, or how the Linux kernel solved it.



I just took a look at the Linux patches.  Basically, what they say is new MBP and Mac Mini cannot use MCP89 as a SATA controller.  A workaround they found is adding a quirk entry in SATA driver to ignore this chipset completely, which lets them fall back to generic ATA device driver.  There is an additional patch in the PR to force DMA mode but that's a minor performance issue.  All I can say from the patches is that the firmware does not initialize the chipset properly.  That also means only their proprietary device drivers can be used unless we reverse-engineer them or compare working PCs vs. broken Macs as NVIDIA does not provide any documentation for open source development.


----------



## erok (Dec 23, 2010)

Greetings to all!

I just want to report that I also have that issue... I can boot the 8.2-PRERELEASE FreeBSD disk but the installer can't see the hard disk (I think it shows timeout when it is probing them).

I'd like to say that I'm at the developers disposal, should they have time to waste with this issue, to try different solutions to make it work. 

Thank you!


(HW: Macbook Pro 7,1 - 2010)
(OS: OSX / Sabayon Linux)


----------



## erok (Jan 11, 2011)

Ok, I've been making some advancements...

I've made a patched version based on Jan 2011 8.2 snapshot and I was able to do the partitioning of the disc, altough it was not able do create the second disk label.
I'm going to fiddle a bit more with this issue and today or tomorrow I'll try to post some more news regarding this matter. As soon as I am able to install it on my MBP, I'll try to submit the patch. Honestly, I'm not that motivated to submit it because it is really too hacky for BSD...


----------



## erok (Jan 12, 2011)

Done. 

I have it now installed on Apple hardware. It detects the disk and is able to do the partitioning and slicing 

The wiki for Apple hw and FreeBSD still applies regarding the GTP mess afterwards.


----------



## lunaticitizen (Jan 13, 2011)

Thank you erok and please please submit the patch


----------



## erok (Jan 13, 2011)

noob question: and how should I do that?


----------



## rah (Jan 18, 2011)

I do not speak from experience, but it seems you can submit a Problem Report, and include your patch.  The submission form can be found here:

http://www.freebsd.org/send-pr.html

and guidelines for how to write the Problem Report can be found here:

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/problem-reports/article.html

Thanks for working on this!


----------



## jkim@ (Jan 18, 2011)

*Please test this patch.*



			
				erok said:
			
		

> noob question: and how should I do that?



Actually, I received a private e-mail from you about a week ago.  I replied but you didn't answer.  So, here I am.  If you can test the following patch, please let me know the result.

http://people.freebsd.org/~jkim/apple_mcp89.diff

Also, I'd like to see [cmd=]pciconf -clv[/cmd] output.


----------



## erok (Jan 20, 2011)

Sorry for not replying to your email, but I've been having a lot of work latelly. I'll try to have feedback for you between today and tomorrow.


DC


----------



## de0u (Jan 24, 2011)

jkim@ said:
			
		

> If you can test the following patch, please let me know the result.
> 
> http://people.freebsd.org/~jkim/apple_mcp89.diff



I am having the same problem as the original poster.  I have lashed together an unholy combination of an 8.2-RC2 installer CD and an 8.2-RC2 "memstick" installer, the latter mutilated to the point where I can build a kernel.

Which kernel configuration would you suggest I build?



			
				jkim@ said:
			
		

> Also, I'd like to see [cmd=]pciconf -clv[/cmd] output.



Sure, please see: http://www.andrew.cmu.edu/~de0u/pciconf-clv

Also... "As long as I have you on the line", what would be the best way to get help with the Broadcom BCM5764 wired Ethernet?  The switch thinks the link has been negotiated ok, and FreeBSD declares the interface up, but every attempt to transmit results in a watchdog reset, the link goes down according to both FreeBSD and the switch, and then the sequence repeats.


----------



## de0u (Jan 24, 2011)

Just for kicks I also captured dmesg output, from both the default "atapci0" driver and also the "ahcich0" driver (since the latter's failure message was a bit more verbose).

atapci0: http://www.andrew.cmu.edu/~de0u/dmesg_1

ahcich0: http://www.andrew.cmu.edu/~de0u/dmesg_2


----------



## de0u (Feb 6, 2011)

jkim@ said:
			
		

> If you can test the following patch, please let me know the result.
> 
> http://people.freebsd.org/~jkim/apple_mcp89.diff



I built a GENERIC kernel on my memstick.  If I use the CD to boot into the loader and load the kernel and the mfsroot from the memstick, I can then see both the disk (ad4) and the DVD drive (acd0).  There is a complaint about each that it is UDMA33 because the cabling is "non-ATA66" (which I guess SATA isn't going to qualify as?):  http://www.andrew.cmu.edu/~de0u/dmesg_UDMA33

Next I will re-partition the disk and try an actual install.


----------



## jkim@ (Feb 9, 2011)

de0u said:
			
		

> I built a GENERIC kernel on my memstick.  If I use the CD to boot into the loader and load the kernel and the mfsroot from the memstick, I can then see both the disk (ad4) and the DVD drive (acd0).  There is a complaint about each that it is UDMA33 because the cabling is "non-ATA66" (which I guess SATA isn't going to qualify as?):  http://www.andrew.cmu.edu/~de0u/dmesg_UDMA33
> 
> Next I will re-partition the disk and try an actual install.



Great.  You can safely ignore the warning.  Can you please try one more patch?

http://people.freebsd.org/~jkim/apple_mcp89_2.diff

This patch may not work at all but I want to make sure.


----------



## de0u (Feb 9, 2011)

jkim@ said:
			
		

> Can you please try one more patch?
> 
> http://people.freebsd.org/~jkim/apple_mcp89_2.diff



I will try to do it tonight but it might be a day or two instead.

Thanks for taking the time to work with me on this.


----------



## ElectrumRay (Feb 12, 2011)

jkim@ said:
			
		

> Great.  You can safely ignore the warning.  Can you please try one more patch?
> 
> http://people.freebsd.org/~jkim/apple_mcp89_2.diff
> 
> This patch may not work at all but I want to make sure.



Hi!! i've bought a newer white macbook (7,1) and actually I've tried several distributions (including 9.0). All my attempts failed (some distributions do not detect sata, others do not detect keyboard)... but I'm happy to know that there's a patch...  jkim@ maybe also I can try the patch? Or it is only experimental with de0u??


----------



## plamaiziere (Feb 12, 2011)

ummon said:
			
		

> Hello, I am trying to install FreeBSD 8.0 amd64 on my Intel Core 2 Duo Macbook Pro and was running into a problem.
> 
> When I boot the install CD, it starts printing hardware information and appears to freeze at:



There were some bug on 8.0 with (some) Apple Hardware. Why using an old version of FreeBSD? Try with 8.2.

I'm using a Macbook pro model 3,1 it works fine (but the installation was made using FreeBSD 7.X).

Edit oops, this is an old thread!


----------



## jkim@ (Feb 14, 2011)

ElectrumRay said:
			
		

> Hi!! i've bought a newer white macbook (7,1) and actually I've tried several distributions (including 9.0). All my attempts failed (some distributions do not detect sata, others do not detect keyboard)... but I'm happy to know that there's a patch...  jkim@ maybe also I can try the patch? Or it is only experimental with de0u??



It is highly experimental but you can try, of course.


----------



## de0u (Feb 14, 2011)

ElectrumRay said:
			
		

> jkim@ maybe also I can try the patch? Or it is only experimental with de0u??



The first one worked for me, haven't had time to try the second one yet, so probably most useful if you try that one first, then fall back to the first patch if it doesn't work.

If you want I can upload tonight a 8.2-RC2 memstick image which I have mutilated by (a) replacing /boot/kernel with a kernel compiled with jkim's first patch and (b) re-partitioned so it is 2G instead of 1G, so there is room for a kernel source tree, /usr/obj, etc.

While I'm thinking of it, here are the directions for booting off of such a thing on this machine (firmware will not boot a BIOS-compatibility partition from a USB device, only hard disk or CD/DVD, neither of which will work for you if you're reading this thread):


Insert FreeBSD CD/DVD, restart, hold down "c" while the screen is black
Hit 6 for command prompt (ok to do this while it's still loading the default kernel)
[CMD="ok"]unload[/CMD]
[CMD="ok"]set currdev=disk1s0[/CMD] (Type "*lsdev*" first to make sure disk1 is the right one)
[CMD="ok"]load /boot/kernel/kernel[/CMD]
[CMD="ok"]load -t mfs_root /boot/mfsroot[/CMD] (the actual filename is /boot/mfsroot.gz, but you must *not* type the "*.gz*"!)
[CMD="ok"]lsmod[/CMD] Make sure you see "/boot/mfsroot (mfs_root, 0x400000)"
[CMD="ok"]boot -a[/CMD]
Type [CMD="mountroot>"]ufs:/dev/md0[/CMD] to run the installer or [CMD="mountroot>"]ufs:/dev/da1a[/CMD] for regular file system (e.g., kernel build)


----------



## ElectrumRay (Feb 15, 2011)

Oh, that would be great! Sincerely, I've tried several times compile a custom kernel, but the memstick has no sources. It's a little complicated for somebody like me, that is introduced to FreeBSD. But fortunately between jkim@ and you fixed this bug.

Meanwhile I'm going to try patch the kernel myself. @deOu If it is uploaded, please tell me or post it. I haven't a connection internet but I could download from my school.

Thanks!


----------



## vokoda (Feb 16, 2011)

de0u said:
			
		

> If you want I can upload tonight a 8.2-RC2 memstick image which I have mutilated by (a) replacing /boot/kernel with a kernel compiled with jkim's first patch and (b) re-partitioned so it is 2G instead of 1G, so there is room for a kernel source tree, /usr/obj, etc.



Yeah, please upload this I want to try it.


----------



## de0u (Feb 17, 2011)

ElectrumRay said:
			
		

> @deOu If it is uploaded, please tell me or post it.



I realized that the 2G SD card I was using had a previous life storing personal files, so while there is a file system on the second half the unallocated space may contain bits I'd rather not leak.

As an interim measure I have taken exactly the 8.2-RC2 amd64 "memstick" image and replaced /boot/kernel/* with the "patch 1" kernel I built.  *In theory* this should work well enough for you to do an install (who knows, maybe instead it will destroy everything, including your OS X partition, so make sure you have everything backed up); it's available at http://www.contrib.andrew.cmu.edu/~de0u/boot.html.

I see 8.2-RC3 is out, so presumably I should "start over" with that and apply jkim's second patch.  Not tonight, though.


----------



## NuLL3rr0r (Feb 25, 2011)

Hi jkim@,

I have a MacBook Pro 4.1 and I have this problem http://forums.freebsd.org/showthread.php?t=22083 with 8.2 Release while 8.1 Release works fine.

Is this because of this changes you mentioned above?
If so, Is there any solution?


----------



## jkim@ (Feb 26, 2011)

NuLL3rr0r said:
			
		

> Hi jkim@,
> 
> I have a MacBook Pro 4.1 and I have this problem http://forums.freebsd.org/showthread.php?t=22083 with 8.2 Release while 8.1 Release works fine.
> 
> Is this because of this changes you mentioned above?



Which one?  "8.0/8.1 freeze on Mac" problem was fixed in 8.2.  I am still working on "MCP89 AHCI controller" issue although there is a workaround posted in this thread.  However, this AHCI controller problem won't freeze system, i.e., it just can't find hard disk and times out, and only new models are affected.  So, I guess your problem is something new. :-(


----------



## NuLL3rr0r (Mar 2, 2011)

Thanks for reply and sorry for delay in responding, I was a little bit busy this week.

1. As I said I already had an 8.1 before upgrading to 8.2
(8.2 Discs freeze at boot time, I upgraded using freebsd-update, 8.2 kernel was installed but now cannot boot the system)

2. My MacBook Pro are using ICH8M and not NVIDIA chipsets.

It seems I'll have three solutions:
1. Stick with 8.1
2. Go for 9.0-Current
3. Back to bloody Gentoo/Funtoo

Well I must run some test on 9.0-Current before I decide to go with which one.

Thanks anyway.


----------



## de0u (Mar 9, 2011)

jkim@ said:
			
		

> Can you please try one more patch?
> 
> http://people.freebsd.org/~jkim/apple_mcp89_2.diff



Dumb-question time:  do you intend the second patch to be applied to a pristine source tree, or to be applied after the first one?


----------



## jkim@ (Mar 10, 2011)

de0u said:
			
		

> Dumb-question time:  do you intend the second patch to be applied to a pristine source tree, or to be applied after the first one?



The former.


----------



## de0u (Mar 10, 2011)

Ok, then I can report that it didn't work for me.  There were no long port-probe timeouts, but it didn't find the disks either.  So I reverted back to the first patch and did a successful install (I packaged up an installer image here).

If you want me to try something else, let me know.  I can also upload *boot -v* output and/or *pciconf -clv* output.  But meanwhile it might not be a bad idea to push your first patch out?


----------



## de0u (Mar 11, 2011)

*Detailed directions for installing FreeBSD 8.2 on a MacBookPro7,1*

Here's how I did it (the fourth time):

install-8.2.html

Hopefully it'll save somebody some time.


----------



## jkim@ (Apr 15, 2011)

*Final patch*

Can you please try this patch once again?  This should be the final patch.

http://people.freebsd.org/~jkim/apple_mcp89_3.diff

Sorry for the delay.


----------



## YaNightmare (May 31, 2011)

Hiya All,

New user (both forum and FreeBSD here).

My server has been running FreeBSD happily since last week, however my Macbook doesn't :S I suspect it's the same problem described in this thread. However, I do not know how to include the diff/patch as described above in an image (I will look that up and try it out myself).

I just want to know if people already tried this and if it works or not? The MacBook I'm using is Mo #A1181.

PS, both PC-BSD and FreeBSD (8.2 and 9.0 devel) "crap up" on loading (phun intended).


----------



## de0u (Jun 5, 2011)

YaNightmare said:
			
		

> However, I do not know how to include the diff/patch as described above in an image (I will look that up and try it out myself).



The current state of affairs is documented here: http://www.contrib.andrew.cmu.edu/~de0u/install-8.2.html


----------



## YaNightmare (Jun 5, 2011)

de0u,

Thank you, but I already tried that step by step, but somehow I cannot see the USB device, it will only show the CD and Disk0. (I tried 2 different USB sticks and 1 USB-HDD).

I suspect this is because of my MacBook version? Anyway, I think my only solution would be to burn the kernel with the patch to the installer DVD.


----------



## de0u (Jun 6, 2011)

YaNightmare said:
			
		

> Thank you, but I already tried that step by step, but somehow I cannot see the USB device, it will only show the CD and Disk0. (I tried 2 different USB sticks and 1 USB-HDD).
> 
> I suspect this is because of my MacBook version?



That does not seem like the first thing to suspect.  USB controllers are very similar, even across platforms (i.e., the USB host controller in an ARM netbook is probably EHCI/OHCI, just like MacBook USB controllers).  If you're not seeing actual complaints about USB controllers, I would tend to think they're working.



> Anyway, I think my only solution would be to burn the kernel with the patch to the installer DVD.



While I was working on this I came across directions for doing that.  It's noticeably more complicated than other options.  If you have some other machine running FreeBSD on your network, you could unpack my disk image and export it via NFS--that would probably be easier than messing with creating CD's, though I guess we could pursue that if nothing else worked.

Can you say in detail where my instructions broke down for you?  Maybe provide a transcript of what you tried and what happened?


----------



## YaNightmare (Jun 6, 2011)

de0u said:
			
		

> That does not seem like the first thing to suspect.  USB controllers are very similar, even across platforms (i.e., the USB host controller in an ARM netbook is probably EHCI/OHCI, just like MacBook USB controllers).  If you're not seeing actual complaints about USB controllers, I would tend to think they're working.



I agree, I do not see any USB errors of any kind.



> While I was working on this I came across directions for doing that.  It's noticeably more complicated than other options.  If you have some other machine running FreeBSD on your network, you could unpack my disk image and export it via NFS--that would probably be easier than messing with creating CD's, though I guess we could pursue that if nothing else worked.
> 
> Can you say in detail where my instructions broke down for you?  Maybe provide a transcript of what you tried and what happened?



Gladly: (PS, I'm using a MacBook 4.1 (Early 2008 model, 2.1 duo, 2x 512, 1x120GB)


Partitioning - All steps OK !
Starting BTX - OK
Entering Fixit - OK
  -Type unload - OK
  -Type lsdev - NOK
lsdev results:
CDROM - /dev/cd0
Disk - /dev/disk0 (3 partitions)

For completeness fdisk results from OS-X fdisk

```
Disk: /dev/disk0	geometry: 14593/255/63 [234441648 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: AF 1023 254  63 - 1023 254  63 [    409640 -  117187504] HFS+        
 3: 0B 1023 254  63 - 1023 254  63 [ 117860352 -  116580352] Win95 FAT-32
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused
```

As it doesn't find the Disk1 (USB) as stated in the guide I can't do any of the steps after the setcurrdev

Above steps have been preformed with:
FreeBSD 8.2 CD (had it lying around, wanted to exclude a faulty image)
FreeBSD 8.2 DVD
FreeBSD 9.0 DVD

I was wrong in my first post about number of USB sticks I tried:

1 USB stick 2Gb (1.86Gb), wrote your image to it with "Roadkil's Disk Image" (I'm on Windows 7 on my laptop).
1 USB-HDD 120Gb.
In both cases I wrote the image to a RAW disk, I have another USB stick, but it's only 1Gb thus it will not work with the 1Gb image

I do have a FreeBSD server running as well, so in theory I could stream the image over NFS, I'm only using SMB for filesharing on it at the moment, maybe SMB or SSH streaming is also possible, else I will have to look up how to make a NFS share (I'm fairly new to FreeBSD and im running ZFS on Root on my server which makes my learning curve a bit steep for me at the moment )

Thank you for your time! If you need more information please let me know (pictures etc).


----------



## de0u (Jun 6, 2011)

YaNightmare said:
			
		

> lsdev results:
> CDROM - /dev/cd0
> Disk - /dev/disk0 (3 partitions)



Can you type in exactly what *lsdev* says?  (I guess a picture would work too.)

Also, if you blindly assume disk1, set currdev, etc., can you load a kernel?



			
				YaNightmare said:
			
		

> I was wrong in my first post about number of USB sticks I tried:
> 
> 1 USB stick 2Gb (1.86Gb), wrote your image to it with "Roadkil's Disk Image" (I'm on Windows 7 on my laptop).
> 1 USB-HDD 120Gb.
> In both cases I wrote the image to a RAW disk, I have another USB stick, but it's only 1Gb thus it will not work with the 1Gb image



Just so I'm sure I understand:  you wrote the disk images onto the USB devices from Windows running on the MacBook, or from some other machine running Windows?  If you plug the various USB devices into the MacBook while it's running OS X, do they get detected ok?  When you boot up the FreeBSD installer CD, do you see the lights on your USB devices blinking?  Are the USB devices plugged directly into the MacBook, or are you using a USB hub?

Finally... call it prejudice if you will... if you have a FreeBSD machine running, why not write the disk image onto the USB devices from that machine and get Windows out of the picture?


----------



## YaNightmare (Jun 7, 2011)

de0u said:
			
		

> Can you type in exactly what *lsdev* says?  (I guess a picture would work too.)
> 
> Also, if you blindly assume disk1, set currdev, etc., can you load a kernel?



Attached a picture (clickable for large size)


: 




> Just so I'm sure I understand:  you wrote the disk images onto the USB devices from Windows running on the MacBook, or from some other machine running Windows?



The MacBook runs only OS-X at the moment (and rEFIt for the multiboot part, I wanted to test if this changed anything on the USB boot part).
I wrote the image from my other laptop runnin Windows 7.



> If you plug the various USB devices into the MacBook while it's running OS X, do they get detected ok?



Yes, but OS-X shows a popup that it cannot do anything with it (just like your guide describes).



> When you boot up the FreeBSD installer CD, do you see the lights on your USB devices blinking?



Now that you mention it, no, from the part the DVD is booting until it shows the boot selection screen (where you press 6 for the shell) the light doesn't blink (not even once).

Before this (MacBook EFI & rEFIt) it blinks a couple of times and stops when the actual FreeBSD disk boot takes over.



> Are the USB devices plugged directly into the MacBook, or are you using a USB hub?



Directly.



> Finally... call it prejudice if you will... if you have a FreeBSD machine running, why not write the disk image onto the USB devices from that machine and get Windows out of the picture?



Did this just now (hence the late reply) I wrote the image from my FreeBSD 8.2 RELEASE-p2 server with [CMD=]dd if=FreeBSD-8.2-RC2-amd64-memstick-apple_mcp89.img of=/dev/da0 bs=64k[/CMD] (the above attached picture is also with this new image on the USB stick).

I'm sure the blinking / no access to the USB during boot might be the money shot here, however, I don't have a clue to why or how.

Just so I'm sure on the DVD I'm using, I burned the default FreeBSD 8.2 DVD (~2Gb). When the BTX loader does its job it only loads the loader.conf, /boot/kernel/kernel text, data and syms, after that it displays the boot options (enter default, no acpi etc). It does not load any additional modules.


----------



## de0u (Jul 29, 2011)

jkim@ said:
			
		

> Can you please try this patch once again?  This should be the final patch.
> 
> http://people.freebsd.org/~jkim/apple_mcp89_3.diff



The first and third patches work (when each is applied to a fresh tree).  The second doesn't.

The first one complains about finding a "non-ATA66 cable", and the third doesn't.  Otherwise
they appear to work equally well.

Thanks for putting in the time to work on this, and I apologize for the delay in trying the third patch
(which seems good to go).


----------



## de0u (Jul 29, 2011)

First of all, I'm sorry I didn't see and respond to your detailed answers until now.

Second, it seems as if your earlier guess, that something is going wrong with your USB
system, was correct.

Since your system is older than mine, it's not particularly likely that you need the patch
I did; also, you are having a different problem (I wasn't able to access the internal disk;
you are having trouble accessing USB devices).

So I would suggest you start by booting up the live/rescue system and reporting
where that goes bad.  Is the kernel unable to find the internal disk *and* USB
devices?  It is possible for the boot loader to have trouble with USB but for the
kernel drivers to work, in which case you could try to finesse your way through
with _two_ stock installer images, one on CD/DVD to run the boot loader and
load the kernel, plus another one on a USB stick for the kernel to mount once it's
loaded.


----------



## jkim@ (Aug 2, 2011)

de0u said:
			
		

> The first and third patches work (when each is applied to a fresh tree).  The second doesn't.
> 
> The first one complains about finding a "non-ATA66 cable", and the third doesn't.  Otherwise
> they appear to work equally well.
> ...



Great.  mav@ improved the patch and committed it as r224603:

http://svn.freebsd.org/changeset/base/224603

Unfortunately we missed 9.0-BETA1 but it will show up in BETA2 and later.


----------



## zebracat (Sep 6, 2011)

Hope to see BETA2 soon to test FreeBSD on my Macbook. Any ETA of BETA2 release bthw ?


----------



## zeroseven (Nov 17, 2011)

FreeBSD 9.0-RC2 doesn't hang and installs now, however, I'm not entirely sure how to get it working. When creating the the partitions, it seems FreeBSD is being made to work with MBR, and GUID as well as a few others. I installed with the GPT partitions, which forced a 64k freebsd-boot partition ahead of the freebsd-ufs partition. The install executes smoothly and finishes. However, on reboot, the FreeBSD partition is not available. You can still boot into the HFS partition.

Have I missed something here? Is there a better way to do this?  I thought editing the partition table with fdisk() from the shell within the install program would function in the same manner it did with the FreeBSD 9.0-RC1 hack, however, with the addition of the freebsd-boot partition before the last partition, it negates the recorded information before the install.

Edit:

I solved my own problem. After reading through, Installing FreeBSD Root on ZFS using GPT, I realized that I didn't need to copy any partition information before the install.

I, this may not be the fastest or only way, booted my MacOSX install cd and deleted the bootcamp partition. Then added the freebsd-boot, freebsd-swap and freebsd-ufs partitions with the OSX *gpt* tool in a terminal.

[CMD="gpt"]add -b 126238760 -s 128 -t 83BD6B9D-7F41-11DC-BE0B-001560B84F0F[/CMD]
[cmd="gpt"]add -b 126238760 -s 128 -t 83BD6B9D-7F41-11DC-BE0B-001560B84F0F[/cmd]
[cmd="gpt"]add -b 130433192 -t 516E7CB6-6ECF-11D6-8FF8-00022D09712B[/cmd]

I assume you should be able to do the exact same operation from the shell during the FreeBSD install, using gpart(8)(). This is retrospective and I haven't tested it. When partitioning within the install, I chose to use the shell, ran:
[cmd="newfs"]/dev/ada0p5[/cmd]
then,
[cmd="mount"]/dev/ada0p5 /mnt[/cmd]

Next I edited the /tmp/bsdinstall_etc/fstab to point to the appropriate device

```
#dev        #mount    #fs    #opts   #dump/pass
/mnt        /         ufs    rw      0 0
```

Then exited the shell and the install proceeds automatically. When you get kicked back to the main menu after a successful install, re-enter the shell and re-mount your root device. You need to edit your /etc/fstab to reflect your actual device on mount. I had to change mine from:

```
[color=red]--/mnt           /    ufs    rw    0 0[/color]
[color=green]++/dev/ada0p5    /    ufs    rw    0 0[/color]
```

After reading this, I'm assuming that I could have just used the /dev/ada0p5 in bsdinstall_etc and could have skipped the last step.

After a reboot I realized I needed to install bootcode. The installer didn't do this for me. I previously tried:
[cmd="gpart"]bootcode -b /boot/pmbr -p /boot/gptboot -i 3 ada0[/cmd]
This didn't work for me though, so I ended up using;
[cmd="gpart"]bootcode -p /boot/gptboot -i 5 ada0[/cmd]

Which leads me to believe the freebsd-boot partition isn't needed, though I'm interested to learn how it would actually be utilized. This has allowed me dualboot with Mac OSX. I'm also using reEFIt, I'm not certain that it is required though, I'm going to uninstall and find out.


----------

