Save and Restore MBR in Linux

by
Share this Article: Facebook1Google+0Twitter2LinkedIn0Reddit0Pinterest0StumbleUpon0Digg

The MBR or Master Boot Record is an area at the beginning of your hard drive. It is very important because it contains the partition table. There are also routine boot whose goal is to load the operating system.


From a general point of view, backup your MBR does not really interest. Unless you intend to perform manipulations risky on your hard drive or install a new Boot Loader (Grub, Lilo …) for examples.

Save the MBR

To make a backup of your MBR, run the following command as root and adapting / dev / sda depending on the path to your hard disk:

dd if = /dev/sda of = MBR.dump bs = 512 count = 1

If you do not know the path to your hard drive, fdisk-l can help you.

Restore MBR

To restore the MBR if problem is a little less straightforward because it will initially start on a liveCD. Once the command prompt on the screen, he can run this (still adjusting the path of your hard drive):

sudo dd if = MBR.dump of = /dev /sda

Note that here we’ve reversed the inputfile and outputfile the dd command to perform the reverse operation.

Via Tux Planet (French) Special Thanks to

{loadposition user9}

Related Articles by Tag :

{module Related Articles Plus}

//

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook1Google+0Twitter2LinkedIn0Reddit0Pinterest0StumbleUpon0Digg