Linux Basics Tips & Tricks

How to restore and backup MBR in Linux

Backup MBR
Backup MBR

How to  restore and backup MBR in Linux

This post explains how to restore / backup MBR on Linux. Master Boot Record (MBR) is the first sector of any hard drive. It consists of information about where is the operating system located. It helps to load the operating system into the computer’s primary storage, so it is critical to backup Master Boot Record.

Backup Master Boot Record:

 
dd if=/dev/sda of=/root/mbr.back bs=512 count=1

The above command will backup Master Boot Record (First 512 bytes of the hard disk).

NOTE: Replace /dev/sda with the actual device name.

Restore MBR from backup:

 
dd if=/root/mbr.back of=/dev/sda bs=512 count=1

The above command will restore the MBR from the previously taken backup.

Also, read more about Master Boot Record from Here

Also Read:

That’s it!

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Topics