Home Linux Basics Backup and Restore MBR in Linux

Backup and Restore MBR in Linux

by Bella

The Master Boot Record (MBR) is the first 512 bytes of a storage device. The MBR is not a partition, it is reserved for the operating system’s boot-loader and the storage device’s partition table.

MBR Total Size
446 + 64 + 2 = 512

Where,
446 bytes Bootstrap.
64 bytes Partition table.
2 bytes Signature.

To backup the MBR:

dd if=/dev/sda of=/path/mbr-backup bs=512 count=1

To restore the MBR and partition table:

dd if=/path/mbr-backup of=/dev/sda bs=512 count=1

Restoring the MBR with a mismatching partition table will make your data unreadable.

To restore the MBR:

dd if=/dev/zero of=/dev/sda bs=446 count=1

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment