Determine what program is in the MBR code

bootgrub2mbruefi

I've done a lot of partitioning / dual booting on my Macbook Pro. Right now I have Mac OS X installed along with Ubuntu 12.04, with Grub installed on the Ubuntu partition.

I am wondering – what is the code in my MBR (the first 446 bytes)? Because Macs use EFI and GUID partitioning, the MBR is only a protective/hybrid MBR (in my case, it is a hybrid MBR).

Q: How can I identify what program is in my MBR (based on its hexdump)? Is there some sort of a signature? I'm guessing it's grub but I did a hexdump of it and it didn't match the code I found in this article detailing the Grub MBR ("Stage 1") code.

EDIT: I am runnning rEFInd, an EFI bootmanager program. It is an EFI application, and thus resides on my EFI system partition. This program is what runs immediately following bootup, but I do not think it places any code in the 446 bytes of the MBR.

EDIT2: I should add that I have had Windows installed for dual-boot as well.

Best Answer

I think I've found the answer: I believe it is Windows boot code. Based on the readable ASCII in the hexdump ("Invalid partition table.Error loading operating system.Missing operating system.") I was able to do a Google search and found a site which discussed windows bootloaders. The hexdump of mine matches the Windows 7 bootloader detailed at http://thestarman.pcministry.com/asm/mbr/W7MBR.htm#CODE. This makes sense, because I have installed Windows 7 in the past on my computer.

Related Question