MacOS – Presence of a Linux partition causes FileVault2 setup to fail

disk-utilityfilevaultmacospartitionunix

I'm currently dual booting Mountain Lion and Ubuntu 12.04 on a rMBP. Everything works fine, but enabling FileVault fails with the error message: "Some information was unavailable during an internal lookup." I receive the same error message if I run "Verify Disk" in Disk Utility.

By experimenting over the course of half a dozen reinstallations, I made the following observations:

  1. Install Ubuntu 12.04 (x64, alternative Mac version) and GRUB -> ERROR
  2. Add a ext4 or btrfs partition using Gparted on a LiveCD without installing GRUB -> ERROR
  3. Removing the Linux partitions (but leaving the hybrid MBR) -> NO ERROR

As a result, my best guess is that OS X throws an error as soon as it detects a filesystem that it doesn't recognize. Has anyone else encountered this problem? How do get OS X to ignore my Linux partitions?

Update 1

Adding 128 MiB of padding between partitions solves the "Verify Disk" error. Unfortunately, I still get the same error message when I attempt to enable FileVault 2. Interestingly, "Verify Disk" started returning errors as soon as I attempted to "Repair Disk." Disk Utility seems quite adept at corrupting its own partition tables…

Update 2

I get more information if I run fsck_cs from the terminal. It looks like this may be related to FireVault2 using CoreStorage. Here's the output:

$ sudo fsck_cs /dev/disk0
** Checking volume.
   Content Hint for disk0 is not Apple_CoreStorage
** disk0: Scan for Volume Headers
   Invalid Volume Header @ 0: invalid field value
   Invalid Volume Header @ 251000192512: invalid field value
** disk0 is not a CoreStorage volume

Best Answer

I believe I found the issue: Apple expects 128 MiB of free space between every partition. Disk Utility hides this free space, similar to how it hides the ESP. If this padding isn't present, it generates the error I described above.

Easy fix: Tell Gparted to use +128 MiB as the beginning offset for each partition.

Edit: Nevermind, this only solves the "Verify Disk" problem...I still can't enable FileVault. See above for an update.