Posts

Showing posts from September, 2012

How to backup and restore GPT header and table / MBR on mac ?

Mac OS X systems use GPT based partition table on a physical hard disk. Sometimes due to disk errors or any other reasons the GPT partition table may get corrupt. In such situations the operating systems restore the GPT table from the secondary GPT header lying at the end of the disk. There are some situations when secondary header is also corrupt then it is very hard to recover the partition schema of that disk. We can take a backup of the GPT table from the mac in the form a device file and can use it to restore back onto disk. 
The GPT table and header of the disk can be backed-up as below :
         $ sudo dd if=/dev/disk0 of=GPT bs=512 count=34
The GPT table and header of the disk can be restored as below :
$ sudo dd if=GPT of=/dev/disk0 bs=512 count=34


Similarly for MBR disks back up can be taken as below:
         $ dd if=/dev/disk0 of=MBR bs=512 count=1

MBR header can be restored back as :
$ dd if=MBR of=/dev/disk0

How to remove firmware password prompt on mac if password is forgotten ?

Image
We might end up  in a problem where we forgot the password which we have kept for firmware on mac.  We might see following screen when mac powers on, without leaving any option to reset the password using the DVD or any other mac os x installer disks.
We  can remove this firmware password  prompt by resetting the NVRAM, by following below specified steps: Change the memory configuration of your mac either by removing one of the RAM's or by adding another RAM to existing setup.Turn on the mac, Immediately hold command + option + P + R keys on your mac keyboardPerform NVRAM reset  for 3 times (here you will hear mac chiming for 3 times )Release the command + option + P + R keys.  This should have removed the firmware password prompt.