Ubuntu and Windows Vista dual boot on a MacBook

I ended up needing Windows for various reason, so I decided to set up dual booting on my MacBook. I like the rEFIt bootloader which is a nice EFI bootloader and this guide explains the few steps needed in order to dual (or triple boot if you want OS X as well) a MacBook. This guide is pretty brief as it assumes you know what you are doing.

The recipe:

  • Install OS X (if you do not have it on the machine already). When installing OS X it also creates a 200MB EFI partition in the beginning of the disk. We need this.
  • In OS X we need to install rEFIt. Felipe Alfaro Solana has a nice guide on how to install rEFIt on the EFI partition, which is what we want. I have added the necessary steps here for your convenience:
    • Create a mount point for you to mount the EFI partition:
      sudo mkdir /efi
    • Mount the EFI partition:
      sudo mount -t msdos /dev/disk0s1 /efi
    • Download the rEFIt tarball from the rEFIt site and copy the
      refit

      directory to

      /efi
    • Bless the EFI partition (telling the OpenFirmware on the machine to boot from the partition):
      sudo bless --mount /efi --setBoot --file /efi/efi/refit/refit.efi --labelfile /efi/efi/refit/refit.vollabel
  • Now insert an Ubuntu Live CD and reboot. On reboot you should now see the rEFIt bootmanager, where you can select to boot from the CD your have inserted.
  • Boot into the Live CD environment and open a terminal and run:
    sudo gparted

    This opens the GParted partition manager. Now delete all partitions except the first 200MB EFI partition. Create a NTFS partition for Windows Vista (the Windows Vista installer recommends at least 12 GB). Apply the changes, insert a Windows Vista DVD and reboot. I suppose you could use the partition tool on the Vista install disk to partition your disk but I do not recommend it as it might trash your EFI partition.

  • Boot from the Vista DVD and install Vista on the partition you just created. Once you have Vista installed reboot with an Ubuntu Live CD in the drive.
  • In the Ubuntu installer create whatever partition layout you want (but of course leave the EFI and Vista partitions alone). Before you click “Install” remember to change the target location of the boot manager GRUB that Ubuntu uses. The default is (hd0) but this would mean that it overwrites the Vista boot manager, so instead change it to your Ubuntu boot partition (if you did not create one then set it to the Ubuntu root partition). This is very important as you want rEFIt to choose what OS you start and if the Windows boot manager is deleted then rEFIt will boot into GRUB and then you have to use GRUB to select what OS to boot, which just seems silly.

Ok, you are done. However, you may want to install some Windows Vista drivers for the MacBook that are part of the Apple BootCamp package. Just remember not to install everything! If you install the Apple BootCamp Drivers then the you trash your rEFIt install. So instead of running

Setup.exe

in the root of the BootCamp Drivers directory, go into the

Drivers

sub-directory, locate the drivers you want, and install them using the executables in their respective directories.

2 Comments

  1. Posted July 29, 2008 at 7:42 pm | Permalink

    For what reason did you need Windows Vista?

  2. Posted July 29, 2008 at 11:45 pm | Permalink

    Peter: Mostly because the Nokia software for my Nokia N95 8GB does not run in Linux. It may be possible to get it to work through wine and I will try to accomplish that sometime soon but it will be troublesome since the Nokia software expects its own “phone drivers” to be installed.

Post a Comment

Your email is never shared. Required fields are marked *

*
*