Backup your MBR

March 21st, 2008

In relation to the post ‘Overwrite MBR from Linux’ this is how to take a backup and restore your current Master Boot Record (MBR) in case you accidentally wipe it. This assumes your main disk is called /dev/sda plus all command must be run as root.

To backup:

dd if=/dev/sda of=~/mbr.image  bs=512 count=1

This saves your MBR in your home directory and names it mbr.image

Now to restore:

dd if=~/mbr.image of=/dev/sda  bs=512 count=1

Leave a comment