Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Even though I have been able to install and run Ubuntu 11.10 in dual boot in a MacBook Pro 5.1, it seems there is still something to fix: rEFIt gives me two icons to log into Ubuntu. Right now when I start the computer I have to choose between: Apple from HD, Linux from HD and Linux from Partition 3.

rEFIt partition tool says there is no need to sync the tables since "No GTP partition was found", although it also says it couldn't found gtpsync. According to this tool, there are three partitions on the disk: one for Mac, one for LinuxSwamp and one for Ubuntu.

Using the DiskUtility in Mac results differ, showing 4 partitions: 200mb as "boot volume", 173gb as the Mac partition, 1023mb named "disk0S2" (this is the linux swamp) and 59gb named "disk0S3" which is the Ubuntu partition.

Using the DiskUtility in Ubuntu shows 3 partitions (it doesn't show the 200mb one). Gparted shows the same 4 partitions that Mac does, and I remember when installing Ubuntu the installation tool showed some other small "free spaces" between partitions.

To fix the tables, I have tried to install GDISK in Mac and follow the instructions from that Forum post, but after I wrote sudo gdisk /dev/disk0 in Terminal (and after writting my password) I get dyld: unknown required load command 0x80000022 Trace/BPT trap. It might be that Gdisk doesn't work in Leopard?

I have also tried to fix the tables this way . And I have tried to get ride of that extra Linux icon on rEFIt by following by using sudo fdisk -u /dev/disk0 in MacOS Terminal, but then the only Linux icon I get -which is the Partition3 one- won't boot (so I have to follow the last way to fix tables to get grub reinstalled to /sda).

So..... any ideas what to do?? Right now it's not a big deal, since I can work with everything.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I can't be positive, but my hunch is that you're seeing two BIOS boot options for Linux, one based off the MBR and one based off the boot partition. If they both work, then deleting the MBR code should eliminate the duplicate; however, there is a risk that if you do this, it'll backfire and Linux won't work at all. If you care to try, do this from Linux:

sudo dd if=/dev/sda of=/path/to/external/medium/backup.mbr bs=512 count=1
sudo dd if=/dev/zero of=/dev/sda bs=440 count=1

Be very very careful with these commands! If you mistype either of the dd commands, you could end up wiping out critical data. Note in particular that the second command uses a bs=440 option, not bs=512 as in the first command. Also be sure to include the count=1 option for both commands, but especially for the second. Change /path/to/external/medium to a directory where you've got a removable disk mounted. That will provide you with a recovery option, should something go badly wrong; you'll be able to boot with an emergency system and re-issue the first command, but reverse the if= and of= options, to restore the disk to its original state.

Another option is to switch from rEFIt to its more recent fork, rEFInd, and to convert from a BIOS-booting option to boot in EFI mode, as described here. You'll then be able to disable scanning for BIOS boot loaders and limit the boot list to however many EFI boot loaders you care to install. This will give you more flexibility, but it will take some effort to set it up, and there's also a risk that it won't work right -- some Macs still have hardware that Linux can't properly initialize when booted in EFI mode, although that problem is much less significant than it was in the past.

share|improve this answer
    
Hey, I never replied to you! Thanks for your help, I ended up formating the laptop and staying with Mac all alone. Ubuntu would heat up the computer like crazy!! So I'll be back to it when I need a new machine. –  aderojas Nov 29 '12 at 18:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.