boot problem with macbook

Hi, I’ve been preparing to install opensuse 11.2, as a dual boot with OSX. When I removed my previous linux distro jolicloud, (a short lived experiment, a pre-beta as they called it, I should have known better) I realised that I had unwittingly on that installation put grub in the first partition along with the MBR. This was confirmed when I used the jolicloud live cd’s gparted showing root in the first partition.
I have googled for a remedy, tried adjusting partitions using OSX’s disk utility as suggested by someone having a related problem, however no improvement. (Curiously, Disk Utility seems also to not have recognised that I have wiped the distro in the third partition, continuing to show some shading for data when there is now none). Upon starting the macbook when it goes to refit it still indicates that there is a linux installation, of course it cannot go anywhere except to a screen with the one word; grub.
In googling I learnt a little about OSX, EFI and MBR, but haven’t been successful in finding an answer for this particular issue. I have learnt that fdisk may be part of the answer. I haven’t used the command line much, and so am unfamiliar with what might be the right input for fdisk.
any suggestions appreciated on how to resolve this puzzle, so I can get on and install opensuse.

possibly relevant info:
macbook 2,1
osx snow leopard
partition 1 EFI and MBR (and that grub!)
partition 2 OSX
partition 3 now blank

fdisk won’tsolve the problem … on the contrary. fdisk let you edit the mbr and that’s exactly what you’re not supposed to do on a Mac. You should use rEFIT to resynchronize GPT and MBR. Once you’re done, never touch the MBR and put grub in the root partition while installing Linux

rEFIt - Documentation - Using the EFI Shell

thanks for steering me in the right direction. Some puzzles remain, synced the efi and mbsr in refit but I’m still getting the penguin in refit as though I had a linux OS in one of my partitions, and when I looked at gparted again it still showed “root” in the flag section of the table for partition 1. Am I just misreading the significance of this? Curiously partition 3 in disk utility showed that it had 30 files and 115.3 MB used. I erased it again, no change, is this something to do with the GUID partition?

Well … some people have been able to play with gparted an create logical paritions for Linux. I guess it’s not so bad, since logical partitions geometry is not stored in the MBR. What you should avoid is writing to the MBR under Linux, which means NOT use gparted, fdisk and such programs. This is the price to pay if you want to dual boot OSX and Linux, or generally speaking two OS, the one using GPT and the other one MBR. Things might change with Grub2 (shipped with Ubuntu but not with openSUSE yet).

The safest way to install a dual boot OS X/Linux (using legacy Grub) is :

  • Install Snow Leopard
  • Resize your partition with disk utilities and create one or two partitions (you might want to have a swap partition for Linux. Otherwise you can use a swap file too)
  • Install ReFIT
  • Boot from openSUSE CD and in partition setup select the last option “Create partition setup”. So you’re not going to modify the geometry anymore (you did that with disk utilities on OS X). All you’re going to do is to change partitions ID. That’s OK.
  • Select your swap partition (if you made one) and your root partition, mount it as “/” and format it as ext4.
  • DO NOT INSTALL GRUB in MBR but in Linux root partition. Don’t activate that partition (see in advanced properties ).

This is an old method. There might be other ones. But that one is working.