Jump to content

Booting OSX with GRUB2


Did this guide work for you?  

4 members have voted

  1. 1. Did it?

    • Yes
      3
    • No
      1


7 posts in this topic

Recommended Posts

This guide is designed for GRUB2. For a simpler generic guide, try this one.

 

THIS DOES NOT WORK WITH SNOW LEOPARD!!!

GRUB2 DOES NOT AUTODETECT SNOW LEOPARD AT THE TIME OF WRITING!!!

 

WARNING!!!

IF YOU DO STEP #6 YOU MUST DO STEP #8

IF YOU DO ANYTHING WITH THE OSX DISK UTILITIES INVOLVING MAKING/RESIZING/DELETING PARTITIONS YOUR PARTITION TABLE WILL BE PARTLY CORRUPTED!!!

END WARNING!!!

^I think :blink:

 

Download:

Puppy Linux here

Gparted LiveCD here

*buntu 9.10 or later (or any other grub2 linux distro) here

You'll need:

A thumb drive with more then 512 bytes free space

Time:

30min work, 2+hours install?

Procedure:

 

#1) Burn the linux CDVD's

 

#2) Boot the Gparted LiveCD and partition your hard drive including a hfs+ partition greater than 10GB. Give the Linux partition the "Boot" flag.

 

#3) Install your GRUB2 Linux.

 

#4) Boot Puppy Linux and open the command line (click on the console icon) and type.

dd if=/dev/<ata drive  devicename> of=/root/mbr.bin bs=512 count=1

If you're a complete Linux idiot (like I was) look at your desktop for the hard drive icon.** There should be some text beneath it Ex: sda2 Your ata drive devicename is sda.*

 

#5) Find mbr.bin and move it to a portable thumb drive (click on the file icon in the upper left corner of the screen).

 

#6) Install your other OS's

 

#7) Open your OSx86 isntaller and select Disk Utility. Select your HFS+ partition and do a one-pass erase. At this point your computer should boot into the osx86 install and run successfully.

 

#8) Boot into Puppy Linux again and put mbr.bin into the folder you removed it from and type (into the console).

dd  if=/root/mbr.bin of=/dev/<ata drive devicename>

 

#9) In your grub2 Linux os type

sudo update-grub

 

#Cocktail Time) Once you reboot there should be an option "Mac OSX on /dev/<ata drive devicename>"

Link to comment
Share on other sites

  • 2 months later...

More on <ata device drivename>. The first storage device the linux kernel finds (usually the hard drive) gets sda<number>. The first partition on the first device would be sda1. The second partition would be sda2. The second storage device Linux finds (another hard drive or a CDVD drive) would be sdb<number>. The first partition on the second device would be sdb1. The second partition would be sdb2. This goes on until all storage devices have been labeled in this fashion.

 

Other uses for this tutorial (there are a lot):

Backup the MBR to test out bootloaders other than GRUB2 and restore if you don't want them. Do not change your partition tabel between backup and restore or you will pay.

THE PROBLEMS WITH THIS TUTORIAL!!!

You can't pass the chameleon fixes to GRUB2. It boots in verbose mode (-v).

Link to comment
Share on other sites

  • 2 weeks later...

Oh, also, you can copy mbr.bin to your Ubuntu (or other Linux-based OS) filesystem from Puppy.

 

When in Puppy open Console and type:

mount /dev/sda1 /mnt ## Of course replacing sda1 with your Linux OS disk
cp /root/mbr.bin /mnt/mbr.bin ## I used /mnt/home/kyle/mbr.bin but this works better.

 

When you need to replace mbr.bin:

mount /dev/sda1 /mnt ## Replacing sda1 with your disk
cp /mnt/mbr.bin /root/mbr.bin
dd if=/root/mbr.bin of=/dev/sda ## Replace sda with your ATA device name.

Link to comment
Share on other sites

But since they partition first when they go to install their OS' they may forget that the file is there and wipe/delete the file by formatting the drive before install. All linux OS' have that option selected by default on their main drive. There is a chance they might not make that mistake, but I don't want to cause anyone headaches.

Link to comment
Share on other sites

 Share

×
×
  • Create New...