First, there appears to be an error in your GPT layout: The partition beginning at sector 781660160 is identified on the GPT side as an EFI System Partition (ESP); but on the MBR side, it appears as a Linux partition with an ext4 filesystem. Given the way this identification has been done, I trust the MBR data on this one. Chances are you or the installer mistakenly set the "boot flag" on the partition. Using libparted-based programs, setting the "boot flag" on a GPT partition actually sets the ESP type code, which should never be set on a Linux partition. (The ESP is required to hold a FAT filesystem and should hold EFI boot loaders and related files, not a Linux installation.) This error isn't likely to be causing your problem, but it's conceivable it's a contributing factor. Thus, I recommend booting a Linux emergency system and using GParted,
gdisk, or some other tool to adjust the type code appropriately. Using GParted or
parted, remove the "boot flag" from the Linux partition; or using
gdisk, change the type code from EF00 to 8300. Note that these tools will probably show another ESP, this one with a FAT filesystem. You should leave it configured as an ESP (with its "boot flag" or EF00 type code, depending on the tool you use).
Second, I recommend you switch from a BIOS-mode boot of Linux to an EFI-mode boot. This will obviate the need to use a hybrid MBR, which you're using now. Hybrid MBRs are ugly and dangerous hacks. You can install a suitable EFI-mode boot loader without too much difficulty. The easiest to set up is likely to be my rEFInd, which is a fork of the (now-discontinued) rEFIt; however, the procedure I'm about to describe works only with 3.3.0 and later kernels. Ubuntu 12.10 and later, including Ubuntu 12.04.2 (but not the original 12.04) come with suitable kernels. The procedure is:
- Download the rEFInd binary
.zip file from its downloads page.
- Install rEFInd under OS X. This is easily done by using the
- Install the rEFInd driver for ext4fs. You can do this by copying the
ext4_x64.efi file from the rEFInd package to the
/EFI/refind/drivers_x64/ directory (which you'll have to create). (This assumes you install to the default location; if you install rEFInd to your ESP or install manually elsewhere, you'll need to adjust the path appropriately.)
- Reboot. rEFInd should appear.
- In rEFInd, use the arrow keys to select one of the Linux penguin icons, which rEFInd should identify as launching a Linux kernel with a filename that begins with
- With one of the Linux kernels selected, hit F2 or Insert twice. A text-mode text editor should appear.
ro root=/dev/sda2 to the boot options and press Enter. Linux should launch.
- In Linux, run the
mkrlconf.sh script that came with rEFInd. This will create a configuration file that should obviate the need to add
ro root=/dev/sda2 to your Linux options the next time you boot; instead, Linux should launch directly when you select its option and hit the Enter key.
At this point, your system will be basically functional. You can remove the hybrid MBR by using the
gdisk program (specifically, by typing
x followed by
n followed by
w) or by making any minor change to your partitions with
parted or GParted. You may also want to tweak the rEFInd configuration by editing the
/EFI/refind/refind.conf file under OS X; see the rEFInd documentation for details.