About Linux FAQ

Browse More FAQs:

UNIX / Linux: copy master boot record (MBR)

Posted by Vivek Gite [Last updated: September 20, 2007]

Q. How do I copy MBR from one hard disk to another hard disk under Debian Linux? I need to do this because of RAID 1 configuration.

A. To copy MBR simply use dd command. dd command works under all Linux distros and other UNIX like oses.

dd command to copy MBR

Type dd command as follows:
dd if=/dev/sda of=/dev/sdb bs=512 count=1

Above command will copy 512 bytes (MBR) from sda to sdb disk.

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. caiken Says:

    This is correct for EXACTLY the same partition sizes. In the case you want the MBR only on a drive that has a root partition of a different size then issue the same command with a smaller block size.

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

    Thus preserving the partitioning schema.

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.