Backup partition table and bootloader
In this article I will be explaining how to backup the MBR record of a hard-drive.
The MBR record contains the partition table and bootloader.
Having a backup of the MBR is useful in case you want to copy data from an older drive to a new one or in case you want to restore data from a damaged drive.
How to backup the MBR record
dd if=/dev/sdX of=MBR.bck bs=512 count=1
Please note that you have to replace /dev/sdX with your actual drive. This can be /dev/sda, /dev/hda, etc.
How to restore de MBR record
dd if=MBR.bck of=/dev/sdX bs=512 count=1
Again you have to replace /dev/sdX with your actual drive.
If you also want to keep a human readable copy of the partition table you can run:
fdisk -l > part.table
I hope it helps !
If you enjoyed this post, make sure you subscribe to my RSS feed!
- October 13th


















Now everyone is talking about the American economy and eclections, nice to read something different. Eugene