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.

37 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. McAfee premium security has everything you need to defend against viruses and potential cyber assaults. You can get it now from Mcafee.com/activate . All you need to do is, visit this website, log in or create a new account, redeem your activation code, and then download the installer file.
    Mcafee.com/activate | Mcafee.com/activate | Mcafee.com/activate | Mcafee.com/activate

    ReplyDelete
  13. Connect for beautiful and hot girls entertaining services
    Dubai Escorts
    Escorts in Dubai

    ReplyDelete
  14. 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
  15. Impressive. Thanks to the great minds behind this project!
    https://www.lynnlaw.com/

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

    ReplyDelete
  17. Additionally, you can make a booking anytime of the night or day we make it easy to make it easy for you to book the most desirable models for your special occasion in rudrapur. With our 24/7 operating hours, it won't matter when you decide to meet with one of our models. You'll also have an enjoyable and stimulating time thanks to our fantastic models. They won't be missed in a flash.
    what's app rudrapur girls number
    phone call lucknow girls
    hot call Mount Abu girls number.
    call dehradun girls phone number
    call haridwar girls phone number
    what's app beawar girls number

    ReplyDelete
  18. شركة تنظيف مكيفات بخميس مشيط
    شركة تنظيف مكيفات
    تمثل المكيفات دور هام في حياتنا في اشهر الصيف
    بغض النظر عن أنها يمكن أن تخلصك من الحرارة، لكن يؤكد كثير من الباحثين أن مكيفات الهواء غير صحية، حيث إن لها العديد من الآثار السلبية على صحتك إذا لم يتم تنظيفها بانتظام.
    تعمل عملية تنظيف المكيفات علي التخلص التام من الاوساخ و الاتربة التى تكون عالقة بالتكييف و التى تسبب العديد من امراض الحساسية، زيادة قوة دفع الهواء الخارج من المكيف، حماية التكييف من الاعطال المحتملة و المتكررة
    كما تساعد على خروج الهواء النقي
    شركة الهرم تقدم خدمات تنظيف المكيفات بالادوات الخاصة للمكيف مع ارخص الاسعار وعمالة مدربة ومتخصصون في هذا المجال
    تكييف الهواء هو جهاز يثبت في الغرف أو السيارات ونحوها، وتديره القوة الكهربية، لتقوم بخفض الحرارة فتبرد الجو في فصل الصيف أو يتم رفعها في فصل الشتاء حتى تقوم بتدفئة الجو، ويوجد العديد من أنواع أجهزة التكييف فمنها ما هو مناسب للمنازل ومنها ما يناسب الشركات والمصانع وحتى المراكز التجارية والمعروف عن أجهزة التكييف هو حاجتها للتنظيف باستمرار وبطريقة معينة حتى لا تتسبب الأتربة في تلفها.

    ReplyDelete
  19. 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
  20. Keep up the good work , I read few blog posts on this website and I believe that your weblog is rattling interesting. Thank you for this effort, I will give you 5 stars for this. Kindly check the link below Thank you! Feel free to visit my website; 일본야동
    일본야동
    국산야동
    일본야동
    한국야동

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

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

    ReplyDelete
  23. 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
  24. 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
  25. 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
  26. 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
  27. I recently came across your blog and have been reading along. I thought I would leave my first comment come my web site 토토사이트

    ReplyDelete
  28. 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
  29. 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