How do I set up Grub properly to quad-boot Windows, Mac OS X, Linux, and FreeBSD?

Solution 1:

Okay, it sounds like your GRUB installation was messed up, and then Boot Repair overwrote it with the Windows MBR.

Boot into the Ubuntu 12.04 LiveCD and reinstall Grub2 from the terminal. I'm presuming you aren't upgrading from some older Ubuntu that came with Grub Legacy. Either way, you want Grub2, which comes with Ubuntu by default.

These are commands you'll want to run, replacing /dev/sdAX with the partition that you have Ubuntu on (which appears to be /dev/sdb5 - you can check with 'sudo fdisk -l'):

sudo su
mkdir /mnt/root

mount -t ext4 /dev/sdaX /mnt/root
mount -t proc none /mnt/root/proc
mount -o bind /dev /mnt/root/dev
mount -o bind /sys /mnt/root/sys

chroot /mnt/root /bin/bash

sudo grub-install /dev/sda
sudo update-grub

Basically, it loads the necessary files from Ubuntu, then uses them to find all your OSes and setup a grub.cfg file.

Some more information on installing Grub2 here.