Thursday, November 21, 2013

CentOS 6 on Apple hardware

I don't know how long Apple have been using intel hardware. I have never owned or used any and I know pretty much nothing about OS-X.

Inevitably, a user asked me if they could have Linux on the their mac. They have both a MacBook Pro and in iMac. I said I would look into it and my findings are listed below.

There are two main areas which cause trouble installing on to Mac hardware, drivers and booting. Drivers is relatively easy. Most hardware is supported by recent OS versions. Booting is much more complex. UEFI, GPT, 64bit support, bootcamp and rEFIt are all intentionally shrouded in mystery and made unnecessarily complex.

The aim is to leave a working OS X install for admin tasks but boot into linux for every day use. The starting point is a working OS X install with GPT partitioning.

MacBook Pro 7,1 (13-inch, Mid 2010)

Status: Not Supported

The Nvidia MCP89 is not supported. This means no hard disks to install onto.
There are a number of setpci commands floating around the internet which promise to activate the chipset as an AHCI controller. None of the commands I tried could get this to work.

Some other observations:
CentOS 6 UEFI boot did not work. The GRUB menu works but it will not boot any entries. Escape will return you to the menu. Entering quit on the command line will take you back to the OSX boot environment (I was using rEFIt).

I wanted to use our corporate PXE boot environment. I burned an iPXE boot CD which worked once. It successfully booted into pxelinux and booted CentOS-6 installer. After the initial success, I could not get it to work ever again. It would lock up after prompting to press ^B.

iMac 27"

Status: Supported (using bootcamp and rEFIt)

Installation was a bit involved and seems to vary depending on the current version of OS X and bootcamp. The procedure was:
  • Boot into OSX
  • Install rEFIt (not rEFInd) (and reboot two times to activate)
  • Run bootcamp (because we will not use EFI booting)
  • Create a fat32 filesystem to keep bootcamp happy
  • Boot off a CentOS-6 CD
  • Remove the fat32 partition
  • Create a /boot partition (/dev/sda3)
  • Create a LVM partition (/dev/sda4)
  • Select /dev/sda as the boot loader location
  • Complete the install and reboot
  • Boot into the CD rescue mode
  • open a shell
  • chroot /mnt/sysimage
  • grub-install /dev/sda
  • parted /dev/sda
  • toggle 3 legacy boot
  • quit
  • exit
  • exit
  • reboot
  • Open rEFIt partition tool
  • Synchronise partition tables
  • Boot linux from rEFIt
  • Install ATI binary video drivers
  • Done

iMac 7,1 (20-inch, Mid 2007)

Status: Supported (using rEFIt)

Installation was done using our PXE network install. Substituting a CentOS Install CD for iPXE would presumably also work.
  • Boot into OSX
  • Install rEFIt (and reboot two times to activate)
  • Boot into OSX
  • Run the Disk Utility
  • 'Partition' the disk and change the size of 'Macintosh HD' to make room for linux (I used 50Gig)
  • Download iPXE and burn to CD
  • Reboot into rEFIt
  • Boot of iPXE CD (by selecting the CD icon from rEFIt)
  • PXE boot into the CentOS-6 installer
  • Select 'Use free space'
  • Install boot loader to /dev/sda
  • Complete the install and reboot
  • Reboot into CentOS rescue mode
  • open a shell and run these commands:
  • chroot /mnt/sysimage
  • grub-install /dev/sda (probably not needed if grub was installed to /dev/sda during the install)
  • parted /dev/sda
  • toggle 3 legacy boot
  • quit
  • yum update (there seems to be a bug in the kernel/initd shipped with 6.4 where a fresh install can't find the hard disk. Fixed with an update)
  • exit
  • exit
  • reboot
  • Open rEFIt partition tool
  • Synchronise partition tables
  • Boot linux from rEFIt
  • ATI binary video drivers are not compatable
  • Done

Conclusion

It is possible to run CentOS on your Mac. The procedure is complex and unpredictable.

I will update this page if I identify any ways to simplify the process.

52 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. We provide high Quality wrought iron gates works for residential, industrial, and commercial customers. From decorative, custom, ornamental iron design to repairs and replacements, we offer a full range of steel and iron works at affordable prices. Visit our website for more details.

    ReplyDelete
    Replies
    1. Peoples are doing blogging activity nowadays and looking for doing as I was searching for online thesis writing help for my upcoming projects use and working on a daily basis.

      Delete
  3. Many higher security options are available, as the use dictates. In every case for exterior access, the function of all of the above reentry options are basically the same; They are all used to retract the latching mechanism of the panic device in some way, allowing entry from the pull side of the door.antique tractor pulling

    ReplyDelete
  4. The iMac has a huge 27-inch IPS display that makes all the difference to a designer. If you work in digital, web or video design then this is the Mac to get. imac para fotografo

    ReplyDelete
  5. Well you describe it, certainly not one person will like it.

    Alex

    ReplyDelete
  6. great article, I was very impressed about it, wish you would have stayed next share
    Raft Wars 2

    ReplyDelete
  7. Offer a thoughtful welcome by taking the child's perspective as you explore your new surroundings. Make sure your kids are happy with how it all works and where to find things like cups, cookies, and a TV set remotely.

    شركة نقل اثاث
    شركة نقل عفش بالخرج

    ReplyDelete
  8. I am very happy to have found this information that I have been looking for.
    Click Javelin Fighting to play

    ReplyDelete
  9. If you are bored because of lockdown, play online plants vs zombies at home for free.

    ReplyDelete
  10. Also in today's open source roundup: How to install Linux on a Mac, and is it worth it to install Linux on a MacBook?

    file

    ReplyDelete
  11. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing. click to download

    ReplyDelete
  12. I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information.
    SEO Agency

    ReplyDelete
  13. Impressive. Thanks to the great minds behind this project!
    https://www.lynnlaw.com/

    ReplyDelete
  14. this is piya sen thanks for sharing your site very beautiful and useful

    ReplyDelete
  15. Your data was very informative and helpful. I think you’ll proceed posting and updating frequently. Looking forward to your subsequent one. Feel free to visit my website; 일본야동
    일본야동
    국산야동
    일본야동
    한국야동

    ReplyDelete
  16. Hi! Thanks for the great information you havr provided! You have touched on crucuial points! florida wellness center

    ReplyDelete
  17. Thank you for taking the time to publish this information very useful!
    trauma therapist near me

    ReplyDelete
  18. You have choose very good topic here that really useful for every visitor. I hope I will see more good news in coming future. Thanks. 사설토토

    ReplyDelete
  19. There’s a lot of surprising information. I enjoyed it very much. I also want to share useful information. I’ll come back again. 파워볼게임

    ReplyDelete
  20. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. substance abuse counseling near me

    ReplyDelete
  21. did you find a way to make the pcspkr beep on an imac7,1 ?
    maybe using the beep , or ping -a 127.0.0.1 commands ?

    ReplyDelete
  22. I recently came across your blog and have been reading along. I thought I would leave my first comment come my web site 토토사이트

    ReplyDelete
  23. You have choose very good topic here that really useful for every visitor. I hope I will see more good news nice info for you 먹튀검증

    ReplyDelete
  24. I know your expertise on this. I must say we should have an online discussion on this. Writing only comments nice info for you 토토사이트

    ReplyDelete
  25. I recently came across your blog and have been reading along.토토사이트

    ReplyDelete
  26. I recently came across your blog and have been reading along. I thought I would leave my first comment come my web site 안전놀이터

    ReplyDelete
  27. There’s a lot of surprising information. I enjoyed it very much. I also want to share useful information. I’ll come back again. 온라인카지노

    ReplyDelete
  28. Wish to see much more like this. Thanks for sharing your information. 카지노사이트

    ReplyDelete
  29. Your blog got me to learn a lot, thanks for sharing.
    토토사이트

    ReplyDelete
  30. This comment has been removed by the author.

    ReplyDelete
  31. This type of article that enlighted me all throughout and thanks for this.This going to be excitement and have fun to read. thank to it. check this out to for further exciting.
    my blog:watermark-remover-software

    ReplyDelete
  32. I wanted to thank you for this good read!! I certainly enjoyed every little bit of it.토토사이트

    ReplyDelete
  33. This is a fabulous post I seen by virtue of offer it. It is genuinely what I expected to see look for in future you will continue subsequent to sharing such an extraordinary post. only good info for you 안전놀이터

    ReplyDelete
  34. thank you for penning this simple and thrilling weblog. It's miles very easy to apprehend. I'm absolutely inspired and need to realize your efforts. check my site 먹튀검증

    ReplyDelete
  35. "It's an awesome article in support of all the web visitors; sportstoto they will take advantage from it I am sure.

    토토사이트
    파워볼사이트
    먹튀검증

    ReplyDelete
  36. I really loved it and thank you very much for sharing this with us.Great site with an awesome post. Thanks for sharing.
    Fencing Baton Rouge

    ReplyDelete
  37. This comment has been removed by the author.

    ReplyDelete
  38. I appreciate your positive feedback and thank you for sharing your thoughts. Your compliment is valued, and I'm glad you enjoyed the content on this excellent site. Your gratitude is truly appreciated.
    mobile app development company in USA

    ReplyDelete
  39. Thanks for sharing this details and insights. Being a app developer and a learner it will help me a lot in my future projects. At Bebecan, we prioritize your baby's comfort and development, offering a comprehensive array of top-notch products like teethers, remote teethers, bibs and push walker for new parents.

    ReplyDelete