Triple boot Linux, Windows and Mac using Grub2

There are numerous posts on how to get triple boot working using Grub2. Grub2 is the newer version of grub and is a lot more confusing.  Most of the posts online did not work for me so I tried a few options mixing various options from various posts and finally one worked for me. I have tried to list a step by step  procedure below. 
I have 3 oeprating systems installed  – 1. Windows 7, 2. Ubuntu 14.04 beta and 3. Mac OSX 10.8.2 (Niresh). This setup was tested on a 320 gb HDD running on a Dell Vostro 3300. Initially, I tried by just updating the grub using the command update-grub. Grub detects OS X however, the parameters passed for booting to the OS are wrong. The OS does not boot up. It gets stuck after trying to boot for sometime.
Bootloaders were also a problem as popular bootloaders Chameleon and Chimera did not work in my case. Finally, a package named USB BootLoader.pkg available along with Niresh 10.8.2 iso worked

What you need:
1. Any Linux Live CD/USB 
2. USB BootLoader package
3. Bootable USB for Mac
Steps:
1. Go your grub screen , drop to the command line by pressing c. Then you can list the partitions using the ls command. It will show you the drives how grub lists the drives. For me it shows like this
(hd0) (hd0,msdos2) (hd0,msdos3) (hd0,msdos5) (hd1,msdos7) (hd1,msdos8)
2. Make a note of the partitions and boot into Linux. 
3. List the corresponding partitions from inside Linux using sudo fdisk -l

#sudo fdisk -l
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   209922047   104857600    7  HPFS/NTFS/exFAT
/dev/sda3   *   209922048   269922047    30000000   83  Linux
/dev/sda4       269922048   625141759   177609856    5  Extended
/dev/sda5       269924352   405921791    67998720   83  Linux
/dev/sda6       405923840   409921535     1998848   82  Linux swap / Solaris
/dev/sda7       409923584   558483455    74279936    7  HPFS/NTFS/exFAT
/dev/sda8       558485504   620947455    31230976   af  HFS / HFS+
/dev/sda9       620949504   625141759     2096128   82  Linux swap / Solaris
4. Edit /etc/grub.d/40_custom using your favourite text editor and paste in the following
menuentry “MacOS X 10.8” {
        insmod hfsplus
        set root=(hd0,msdos8) #change X to the Mac SL partition
        multiboot /boot
}
Notice that I have used msdos8, which is in line with fdisk output i.e. /dev/sda8.  
6. Once done, restart your pc  and boot into your Mac OS X using a bootable USB for mac. 
7. Install the USB BootLoader.pkg in the Mac partition and reboot. 
8. If you get a boot0 error, use the Linux Live CD/USB to recover grub. During the process of recovering grub the Mac partition will be recognized. If grub remains unaffected, reboot into the Linux partition and update grub using update-grub command.
That’s it. Your triple boot from Grub is ready.

Leave a Reply

tuxtrixmod
Scroll to Top