Clear (erase) MBR in Linux. Explained

By neokrates, written on July 21, 2010

howto

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 321 views
Rate it
Ad
Poll
  • Your favorite browser?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

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 ;)

Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +3 (from 3 votes)
3 votes 'YES'  0 votes 'NO'


TAGS

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


Leave a Reply