Clear (erase) MBR in Linux. Explained

By neokrates, written on July 21, 2010

howto

Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4 out of 5)
    Loading ... Loading ...
Ad
Poll
  • Virtualized OS can be used for?

    • Something else (100%, 9 Votes)
    • Portable OS (0%, 0 Votes)
    • Standardized OS versions (0%, 0 Votes)
    • More Flexibility/Scalability (0%, 0 Votes)
    • Games (0%, 0 Votes)
    • Build environments (0%, 0 Votes)
    • Test environments (0%, 0 Votes)
    • Development environments (0%, 0 Votes)
    • Nothing useful (0%, 0 Votes)

    Total Voters: 9

    Vote

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:

Sometimes it is needed to clear (remove, erase) the Mbr. Of course, you must first know where it is. Here is a simple workflow to erase it under Linux

All of the following must be executed as root, so sudo bash.
 
[!] After Mbr is lost you will not be able to boot, so make sure that you know exactly what to do next, like installing a clean boot manager (Lilo, Grub, etc).

1

Locate MBR

Where is your MBR (find Boot Device)? fdisk -l

Normally it is one of:

  1. /dev/hda if your have IDE disk
  2. /dev/sda if your use SCSI disk

 
Of course, your case may be different.

2

Clear MBR

Clear with:
dd if=/dev/zero of=$YOUR_MBR_DEVICE bs=512 count=1

# dd if=/dev/zero of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 9.5923e-05 s, 5.3 MB/s

 
Mbr is cleared, good luck ;)

 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +2 (from 2 votes)
2 votes 'YES'  0 votes 'NO'

LEARN MORE (amazon bookstore)

TAGS

RELATED
Pages
Posts
    nope :(

SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

INCOMING SEARCH TERMS


Leave a Reply