Categories
FreeBSD/Unix

MBR backup and restore with dd

In order to backup only the first few bytes of your hard drive that contains the MBR and the partition table you can use dd as well.

dd if=/dev/adx of=/path/to/image count=1 bs=512

To restore those bytes:

dd if=/path/to/image of=/dev/adx