How To Dual Boot Hackintosh and Ubuntu

11

I wrote this post before geekhut recently crashed so I decided to repost the google cache because of the articles popularity.

Well because it is the holidays and I have nothing better to do than drink, I decided to have a few and install OSX86 on my Toshiba Satellite. The problem is Zend Development Environment is not yet available for OSX so I would have to dual boot.

Dual booting was truly a trivial task. There are many forums (Link) with some decent information as to how dual booting any OS with OSX86 can be done. I am comfortable with most Linux flavors so I figured grub would be my best bet. Unfortunately you can’t just point to your darwin mach_kernel and intramfs in /boot/grub/menu.lst, you actually have to chainload the darwin bootloader (which still isn’t so bad). This meant that I would have to install OSX86 first to ensure I could properly tell grub to pass on the bootstrap to darwin bootloader.

So heres how I did it.

PART I – Installing OSX86

1.Get Hackintosh, just search “ToH” on any torrent site and you should be able to find the second release candidate (in ISO format)

2. Burn ISO to DVD and set BIOS to boot from CD (Duhh)

3. Open the OSX Disk Utility and create say a 20 GB Partition, leave enough room for Ubuntu (another 20 gb). Format it for HFS+ Journalized and give it a cool name, like Hard_Disk ( I named mine sda1, remember this name for the next step).

4. Follow the on screen instructions until installation completes, but don’t reboot yet! There is a good chance you’ll end up with a blinking cursor. Open a terminal under the “Utilities” Menu and type :
#/usr/misc/script.sh Hard_Disk (or whatever you named your apple formated disc). Read the scripts output, you may see errors. If so the easiest way to make sure it will work is to unmount the drive, verify it, repair it (using the disc utility) and then run the script again.

5. Once you reboot you will be greeted by a gray screen with a white apple logo (hopefully) and you can proceed to configure your new apple Hackintosh as you wish.

PART II – Installing Ubuntu and configuring grub

1. Boot Ubuntu 7.10 into the live CD environment and follow through with a standard installation. When asked for a partitioning schema, select “Manual”
- This is how your current partition table may look

/dev/sda1 EFI (I am guessing apples boot partition, usually about 200 Mb)
/dev/sda2 Where OSX86 is already installed
/dev/sda3 unformatted / raw, this is where we will install Ubuntu

- Create a swapspace on dev hda3 to a standards size (Double the amount of your RAM)

- Create a root partition with whatever is left, it should be at least 10 – 20 GB

2. Once Ubuntu is installed, we will not immediately reboot, instead lets configure grub while were in a safe environment.

- Open a terminal (alt + f2 -> gnome-terminal)
- Make a directory to hold your Ubuntu partition
$ sudo mkdir /media/ubuntu
- Mount your Ubuntu partition
$ sudo mount /dev/sda4 /media/ubuntu
(sda4 may actually be sda3 depending on how you partitioned your Ubuntu side)
- List the contents of /media/ubuntu to make sure you mounted the correct drive
$ ls /media/ubuntu

If you see :

bin cdrom etc initrd lib media opt root srv tmp var
boot dev home initrd.img lost+found mnt proc sbin sys usr vmlinuz

You are on the right track.

else, try a different partition (hda2 / 3 / 4)

3. Great we’ve mounted our fresh Ubuntu installation and now we are going to edit our boot menu, type :
$ sudo gedit /media/ubuntu/boot/grub/menu.lst
A text editor will popup
- place a # before the “hidemenu” option so you will not have to press escape to access your boot menu.
- you will then look for the section where it lists your installed kernels (usually right at the bottom), at this point it should look something like :
i. your default ubuntu system
ii. your failsafe ubuntu system
iii. your memtest (memory test)
lets add the below text after the default ubuntu block (next line after “quiet”)

title Hackintosh
root (hd0,1)
chainloader +1

If you followed my partitioning scheme, this should work beautifully for you. (NOTE you can change “Hackintosh” to whatever you prefer)

That should be it, once you reboot the livecd, grub should popup and you will have the option to boot ubuntu or “Hackintosh” Enjoy!

Troubleshooting

Problem : When I select Hackintosh from the boot menu, I get an error.
Solution : Try changing /boot/grub/menu.lst to read :
title Hackintosh
root (hd0,2)
chainloader +1
You may have partitioned things weird but youll have to play with the (hd0,1,2,3,4) until it works for you.

Problem : I am still getting an error after changing the root parameter in menu.lst

Solution : Were you actually able to boot into OSX? if yes then keep playing with grub. If no, follow this tutorial closer.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • YahooMyWeb
  • Google Bookmarks
  • Yahoo! Buzz
  • TwitThis
  • Live
  • LinkedIn
  • Pownce
  • MySpace

Comments

11 Responses to “How To Dual Boot Hackintosh and Ubuntu”
  1. johnny says:

    f3a3EX Thanks for good post

  2. r4v3 says:

    Thx…

  3. gordy says:

    Cheers – did exactly what it said on the tin.

  4. Hmm says:

    Is this still up to date? It\’s a little hard to find which DVD I want to download. Is the \"second release candidate\" of ToH still the best thing to get?

  5. aster1sk says:

    Not at all, in fact this was simply a test to see if I could get it going a long time ago. In my honest opinion none of the hacked Leopard images are very reliable and it is more a tease – buy a real mac if you love the OS. On most machines you will waste hours determining if your hardware is supported only to reinstall your stable native OS.

    Recent images are getting better – but once again the buzzword is “HACKintosh” – it is still quite sketchy for most hardware.

  6. Hmm says:

    I don’t know if I love the OS. I want to try it first. :)

  7. aster1sk says:

    I don’t think there is a (wo)man alive who doesn’t love this operating system – hit up the Apple store, click some buttons then bust out the plastic. Hackintoshes just don’t cut it. Believe me, it will be tough to “try” when none of the damn hardware is supported.

  8. Hmm says:

    I’ve used it for a few days here and there and mostly thought it sucked, has a horrible user interface, etc. But a number of people seem to have the exact opposite opinion, so I thought if I try it for a long time, maybe I’d change my mind. But why pay 3 times as much for the same hardware just to try it out?

    “On most machines you will waste hours determining if your hardware is supported only to reinstall your stable native OS.”

    Sounds like Linux. :D

  9. aster1sk says:

    Yeah I was also taken back a few years to fwcutter and ndiswrapper LOL.
    Some prefer it – others do not. You really can’t argue resale value on most Apple devices.

  10. ked says:

    Hi,

    I followed all your instructions, but grub hangs at the Starting Up… stage. Any ideas? I can boot Ubuntu fine, and can boot my iDeneb installation by using Startup Disk when I boot from the DVD, but would be so much better to be able to use grub…

  11. aster1sk says:

    Try playing with root(0,1) root(0,2) root(0,3) etc…
    When I botched my partitioning the first time I had to guess.
    I did however read a great explanation of grub indexes here : http://tinycorelinux.com/install.html
    Hope this helps!
    Edit : Specifically #6

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

Security Code: