A master boot record (MBR) is a type of boot sector popularized by the IBM Personal Computer. It consists of a sequence of 512 bytes located at the first sector of a data storage device such as a hard disk. MBRs are usually placed on storage devices intended for use with IBM PC-compatible systems.
MBR Total Size
446 + 64 + 2 = 512
446 bytes – Bootstrap.
64 bytes – Partition table.
2 bytes – Signature.
Linux or Unix provides “dd” tool to backup any file. Usually, you must be “root” so that you can use it.
# dd if=/dev/sda of=/backup/mbr_sda.bak bs=512 count=1
Above command will copy 512 bytes (MBR) from sda to mbr_sda.bak
To restore the MBR and partition table, type the following command
# dd if=/backup/mbr_sda.bak of=/dev/hda bs=512 count=1
To restore the MBR, type the following command
# dd if=/backup/mbr_sda.bak of=/dev/hda bs=446 count=1
- How To Find Hard Drive Specifications
- How To Test Disk I/O Performance With dd Command
- How To Flush The Entire Contents Of Memcache Server
- How To Extract RAR Files Under Linux
- Linux Password Protect Files
- 10 lsof Command Examples
- How To Add/Create Swap File
- How To Install Monit On Centos / Redhat
- Linux Hard Disk Speed Tests
- Setting Up An SSH Certificate