Archive for the ‘Operating Systems’ Category

Linux, Boot Camp, Parallels

Sunday, December 31st, 2006

Parallels Desktop is undoubtedly one of the killer apps that drive the strong demand for the Intel Macs. There are two important reasons for that. Firstly, Parallels was first to the market. Technically, it still is, because it’s biggest contender, VMware, has only recently released a mere beta version of its virtualization software. Secondly, because Parallels Desktop was the first application to use Intel’s hardware virtualization technology (VT-x, previously known as Vanderpool), which is supposed to make virtual machines blazingly fast.

One good thing about Parallels is that it keeps evolving. A recent beta build (3036) of the application introduced a handful of new features, most notably, the ability to boot a Windows system off a Boot Camp physical partition. One could run simple applications directly from Parallels, and natively boot straight into Windows for direct hardware access — all that using a single Windows installation1.

While I couldn’t care less about Windows, I embraced this feature with open arms: I sometimes need direct access to hardware in my Linux installations.

Officially, Parallels only supports Windows in Boot Camp configurations, but I figured, since booting is, all in all, a simple process, that making it run Linux instead wouldn’t be much of a hassle. I couldn’t be more wrong.

I won’t go into details of the whole installation process. If you’re new to Linux or have no idea what a partition table is, skip this post and do something different instead, start iMovie or whatever, there’s a fair chance you’ll lose your data.

So, you still there? No Christmas footage to edit? Rrright

Here are some tips to make the installation process less tedious:

  • Use a recent Linux distribution. Fedora Core 6 will do, but something newer would be even better.

    Since Windows XP doesn’t support the GPT partition scheme, Boot Camp makes a standard, DOS-compatible copy of the partition table for it to use. Therefore, you should be able to use any Linux distribution, but explicit GPT support in the distro’s partitioning tool won’t hurt.

  • Install the operating system natively.

    Insert the installation CD, hold Option at boot, follow the instructions. It is possible to install the OS from a virtual machine, it’s just more complicated.

  • Don’t modify the partition layout.

    Better safe than sorry. The swap partition isn’t really necessary, and makes absolutely no sense under Parallels. Install the system on the single partition, the only available. You can always make a swapfile later if you need to.

  • Install GRUB in the partition’s boot sector.

    Installing the Linux boot loader in the disk’s master boot record will probably cause your system to stop booting.

    In Fedora’s installer, you need to select “Configure advanced boot loader options” checkbox, and then proceed to install GRUB at /dev/hda3 (that is, if you only have one additional partition).

These should get you through the installation process, but once you’re through it and try to boot your fresh Linux install from Parallels, you’ll face another problem: all you’ll get is GRUB’s command prompt.

Here’s the catch. Parallels changes the partition layout the virtual machines see. Consider the following scenario: a brand new MacBook Pro has 2 partitions: the EFI partition, which contains the firmware used to boot the machine, and the HFS+ partition with OS X. GRUB, Fedora’s boot loader, recognizes them as (hd0,0) and (hd0,1), respectively. Boot Camp’s partitioning utility creates another partition at the end of the disk ((hd0,2) in GRUB-speak, but hda3 in Linux-speak), and that’s where Linux will sit.

Parallels modifies partition layout

Enter Parallels: when you boot your Boot Camp virtual machine, Parallels hides the first two partitions to prevent data loss2. The whole disk now appears to contain one single partition, and your (hd0,2) becomes (hd0,0). Now GRUB, of course, is configured to look for (hd0,2), and while it’s a very flexible boot loader, this is a little bit too much for it to handle.

Basically, when you boot your Linux under Parallels, you’ll be confronted with GRUB’s command line. You’ll then need to direct GRUB to the right config file, and then change the config to point to the correct partition. You’ll need to type configfile (hd0,0)/boot/grub/grub.conf at the command prompt, then press e, and press it again twice to change the line that says root (hd0,2) to root (hd0,0). Press enter to confirm and b to boot3 using the modified config.

This sounds a bit complicated, especially that you’ll have to repeat this process every time you boot your Linux installation under Parallels. I don’t know of any solutions that would simplify or automate this procedure.

You can, of course, change the GRUB’s configuration file permanently, which might save you some trouble if you intend to use Parallels more often that boot natively.

This is, by far, the most important thing you need to remember when using Boot Camp with Linux, but certainly not the only one.

For starters, I advise you to use at least build 3094 of Parallels. Build 3036 has some weird (and possibly buggy) sanity checks that will prevent booting the virtual machine from the Boot Camp partition (or, FWIW, booting it at all). That’s not to say 3094 hasn’t got them, they’re just less obtrusive.

Also, avoid unclean shutdowns. If the virtual machine is not shut down cleanly (ie. your Linux freezes), a bug in Boot Camp partition handling will prevent you from using it again — Parallels will refuse to access the partition. You’ll need to restart the system, boot natively into your Linux installation, and shut it down cleanly to be able to use Parallels with that install again.

I hope this article will encourage you to use Parallels and Boot Camp to run Linux on your Mactel systems. I’d appreciate any feedback, positive or negative. Any suggestions on the GRUB config issue are also welcome.


  1. To give credit where it’s due, it’s hardly a major breakthrough, various versions of VMware Workstation have supported booting from physical partitions for as long as I can remember. However, Workstation is not available for OS X and the Fusion beta surprisingly lacks this feature. [back]
  2. Concurrent access of two operating systems to the same physical partition is never a good idea, especially with the advent of journaling filesystems. [back]
  3. Fedora Core uses partition labels to indicate which partitions to use / mount during boot. Any system which uses partition numbers instead of labels will require additional changes to boot properly. [back]

Tick Off The Whine

Tuesday, August 8th, 2006

The whine I mentioned in the previous post is, by the way, not exclusively an Apple thing.

Actually, if my experience was representative, I’d say about 40% of all Intel laptops suffer from overloaded, “singing” capacitors, as this is inherent to how the Intel CPU power management is designed1. And, bear in mind, these are not only generic brands like Compal, but also Dells and the highly-respected IBM ThinkPads2.

How come the manufacturers don’t acknowledge and fix those flaws? (more…)


  1. I’ve never seen an AMD-equipped laptop that would make use of C3, so I can’t tell if they are also affected. [back]
  2. See here and here for some reports, or just google it. [back]