Jump to content

Repair/rebuild MBR on Mac?


CrArC
 Share

4 posts in this topic

Recommended Posts

Hi there, got a laptop with three HFS Journaled partitions. The first one is set as bootable and is the OS X partition. The other two are time machine and documents.

 

I have to keep the installation DVD in the drive to boot Leopard. Using OSX86Tools to reinstall EFI works perfectly, but without the install disc I still get a blinking cursor; it seems that my MBR is corrupt or missing.

 

The output from Partition Inspector:

 

*** Report for internal hard disk ***

Current GPT partition table:
No GPT partition table present!

Current MBR partition table:
# A	Start LBA	  End LBA  Type
1 *		   63	 92568502  af  Mac OS X HFS+
2	   92568546	208826209  af  Mac OS X HFS+
3	  208826226	234441647  af  Mac OS X HFS+

MBR contents:
Boot Code: None

Partition at LBA 63:
Boot Code: Unknown, but bootable
File System: HFS Extended (HFS+)
Listed in MBR as partition 1, type af  Mac OS X HFS+, active

Partition at LBA 92568546:
Boot Code: None
File System: HFS Extended (HFS+)
Listed in MBR as partition 2, type af  Mac OS X HFS+

Partition at LBA 208826226:
Boot Code: None
File System: HFS Extended (HFS+)
Listed in MBR as partition 3, type af  Mac OS X HFS+

 

 

 

Look at MBR contents where is says boot code: None. Does this mean I need to rebuild my MBR? If so how exactly can I achieve this? I tried poking about using Gparted from Parted Magic running off a bootable USB stick, but there's no option to rebuild an MBR there. Is there a terminal command or something?

 

Short of erasing the drive and starting again I'm not sure what to do!

Link to comment
Share on other sites

  • 1 year later...

It looks like the MBR (Master Boot Record) is damaged and due to this you are having problem with your Mac system. You need to repair the corrupted MBR. I don’t know the terminal command yet but with the help of Mac Data Recovery you can repair the corrupted MBR too. It is a read only application that does not have any harmful effect on the files or file system. Once the MBR is repaired, all the problem will be solved. I had used this one and recovered the corrupted iPhoto library with this so can say that it will work in your case too.

Link to comment
Share on other sites

Note that there are two distinct parts to the MBR (three, if you use a looser definition):

 

  1. The boot loader code, which occupies the first 440 bytes of the sector.
  2. The primary partition table, which occupies 64 bytes near the end of the sector.
  3. The logical partition definitions, which occupy sectors scattered about the disk; they aren't really part of the MBR per se, but they are part of the overall set of partition structures on MBR-partitioned disks that use logical partitions.

 

These distinctions are important because you use very different tools to manipulate, or repair damage to, the different parts of the MBR.

 

It appears from your Partition Inspector report that your boot loader code is missing (note the line "Boot Code: None" from the report); however, I don't know what triggers that precise report. It could be that your boot code has been zeroed out, or it could be that Partition Inspector just doesn't recognize what's there. Your partition table itself appears to be intact -- at least, there's nothing obviously wrong with the partitions reported by Partition Inspector.

 

Thus, you should focus on the boot loader. Chances are that re-installing the MBR part of whatever boot loader you're using (Chameleon, PC-EFI, Boot Think, etc.) will get your system booting; however, you may need to re-install additional parts of the boot loader, too.

Link to comment
Share on other sites

  • 2 years later...

try boot from the original dvd (or thumb drive), from disc utility select the hd, then partition and decrease slightly the size of the mac osx partition, then apply. It should work. (I know that's an old discussion, but I searched for this argument and it comes out from google, so for future visitors.... )

Link to comment
Share on other sites

 Share

×
×
  • Create New...