# Gentoo on MacPro

## daedius

I wanted to start a thread about Gentoo on MacPro and my trials and tribulations.  At the moment, the current status of gentoo on Mac Pro is it doesn't work.  I will attempt to dissect the issues and also present what does work.  But first, some background information.

MacPro uses EFI architecture as an interfa[/b]ce to the hardware

Apple provides an EFI CSM modules to emulate BIOS atop of its EFI drivers

Every implementation of the EFI modules per Mac hardware is different

BootCamp is a bootup EFI module created by Apple that allows you to boot to partitions and cds easily and also provide support for windows XP

rEFIt is a bootup EFI module that gives the user access to EFI shell, various open source EFI modules (ftp, ifconfig, etc), and has specific support for linux

Please correct me if any information here is wrong.  Also note, I use a ubuntu disk in some of these experiments but the results with gentoo were always very similar.

Setup:

I have resized my hard drive into 

 38gb OSX

 80gb linux

 30gb windows

Test Trial 0: No BootCamp No rEFIt

Ubuntu AMD64 live cd. I hold down C at the startup of MacPro.  Ubuntu starts with no VGA problems.  I click to start up Ubuntu (option 1).  Hangs due to some kernel panic when mounting live file system. Not sure why.

Test Trial 1: BootCamp 1.1

Ubuntu AMD64 live cd. I hold down option/alt at the startup of MacPro.  Ubuntu starts with no VGA problems.  I click to start up Ubuntu (option 1).  Hangs due to some kernel panic when mounting live file system. Not sure why.

Gentoo AMD64 live cd. I hold down option/alt at the startup of MacPro.  4 penguins appear.  I see two messages show up immediately.

i8042.c controller not found

- from what i've read this is a really common error ( and may not necessarily be a bad thing )

cdrom_pc_intr: The drive appears confused (ireason = 0x01)

cdrom_pc_intr: The drive appears confused (ireason = 0x01)

- this seems like the more serious issue. I've read on other bugs that have this problem that the IRQs of the system were screwed up

 Hangs due to some kernel panic when mounting live file system. It looks like it can't find the the cdrom on /dev/hda.  It finds the hard drive partitions though.  Cdrom problems would make sense with the cdrom_pc_intr messages.

Test Trial 2: rEFIt

Gentoo AMD64 live cd. rEFIt detects cd.  I click on cd.

Starting legacy loader

Error: Not found while loading legacy loader

I still need to search through the source code on what this error code exactly means.  My gut feeling tells me that rEFIt doesn't yet know how to work with the MacPro efi modules.

Test Trial 3: Windows

Windows XP Pro SP1.  Insert disk, was able to get pretty far in the installation, hard drives were formated, basic files were copied to the NTFS windows partition.  Then I got a BSOD.  I need SP2 for the installtion to work right, but I was surprised to see that it was able to get much farther than linux.

Where to now?

Well, I need to read up alot more about EFI.  My gut feeling tells me something is fucked up with the cdrom efi drivers. I've heard of SATA related problems elsewhere on MacPro, so I wouldn't be surprised if there were other problems like that in other drivers.  I'd love to be able to fix rEFIt, perhaps there is someway I can manaully reproduce the legacy boot of a cd through the EFI shell, and look into the code to see what is different.  Any advice from people familiar with EFI and especially EFI on Macs, i'd be really happy to hear your opinions.

- Daedius

----------

## daedius

From http://forums.macrumors.com/showthread.php?t=226003

Apparently some guy has been able to get sabayon linux mini-edition to work fully work on a MacPro after seeing the same messages that I have seen above with gentoo.  He suggests that using the IRQPOLL option on the kernel helps other distros out alot.  I will test this when I get home.  In the meantime, here is some information about this option I found.

----------------------------------------------

Some guy gives an example of using irq poll in grub

  kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/ hda=ide-scsi irqpoll

Then in LILO

  append="hda=ide-scsi root=LABEL=/ irqpoll"

---------------------------------------------

Hmm.. on second thought, i'm finding very little info on irqpoll.  My guess is that it hits up all the IRQed devices and makes sure theres no conflicts and re-assigns if there is.  I'll look up more specific informations to boot time on gentoo.

- Daedius

----------

## daedius

Blah, so more updates.

I tried Sabayan linux but had no luck.  I saw the same errors with the cdrom and eventually it froze.  I tried taking the advice of using irqpoll in a few boots.  This did not work either, though it did stop the cdrom bug from popping up.  With irqpoll, something fritzs out once it starts to load the sata_nv module.

I need to research more about this A20 patch i've heard about.  I wonder if it is releated in any way.

----------

## daedius

So apparently other threads on MacPro linux issues have inspired the creator of rEFIt to integrate changes to support MacPro.  rEFIt 0.8 can now boot up OSX, Windows, and Linux.  However, Linux problems still persist.  The last major hurdle is getting past all these bootup problems.  I feel happy to know the problem is localized to linux at this moment.

P.S. I'm posting this article from my Windows XP Pro installation on MacPro =)

----------

## kernelOfTruth

great, keep the community informed !   :Smile: 

hope that you'll be successful soon *fingers crossed*

I played with the idea to buy one, but it unfortunately was "a little" too costly   :Rolling Eyes: 

----------

## daedius

i'm reposting this info here for the benefit of any gentooers. I feel like I must be the only one trying to get linux on MacPro =) 

A ) If your macpro came with a sony dw-d150A cdrom drive, you should have no problem booting up linux through the normal bootcamp route. At least, i've heard reports of this being successful.

B ) If you are unfortunate like me and recieved a Pioneer dvr-111d, you are screwed. The efi CSM (bios emulation) driver of this is crappy and does not work for any distro out there. I.e. your cd will not boot. To make matters even worse, at this moment you cannot buy the sony dw-d150

C ) Theres a chance you might be able to boot from USB, but thus far I haven't had much success (but admitedly I have little knowledge in this area)

D ) The most recent version of parallels allows you to boot linux. Its all emulated yes, but it works, and is pretty fast I might add. There are other problems that seem apparent though. There are reports of the parallels solution not working, and for some reason MacPro does not have its vt-x enabled. There are fixes for macmini for this problem, but i'm not sure if the same apply to mac pro. I do know one way to turn vt-x on during an osx session is to put your machine in sleep for 10-20 seconds and turn it back on with a click, etc.

Gah... so as you can see, the picture is unclear. Apple still has alot of work to do to get its BootCamp right ( though i'm not sure if linux is in the big picture or not anytime soon ).

Thats all the news from the frontline.

Be Vigilant,

- Daedius

P.S. please post your experiences!

----------

## daedius

Breaking news! I was able to get a gentoo boot by dding the minimal image onto a hard drive partition, then booting off the same image on cd, have it fail cd detection yet find the hard drive image.

----------

## matlock

Hi,

I have excatly the same problem with my MacPro, can you please describe more detailed how you get the gentoo install cd booting?   :Very Happy: 

----------

