Bookmark and Share

If you are new to Unixmen, you may want to subscribe :

The Master Boot Record (MBR) is the information in the first sector of any hard disk or diskette that identifies how and where an operating system is located so that it can be boot (loaded) into the computer's main storage or random access memory. The Master Boot Record is also sometimes called the "partition sector" or the "master partition table" because it includes a table that locates

each partition that the hard disk has been formatted into. In addition to this table, the MBR also includes a program that reads the boot sector record of the partition containing the operating system to be booted into RAM. In turn, that record contains a program that loads the rest of the operating system into RAM.

Question:

how to erase MBR in Linux ?

Answer :

# dd if=/dev/zero of=/dev/hda1 bs=512 count=1

 

bs = the first 512 bytes of the harddrive to remove the bootloader


Related Articles By Tags:

Comments (2)
  • shortbaldman  - Oops! There goes the partition table!
    avatar

    If you use a figure of 512 bytes to be zeroed out, you will also zero out the disk's partition table. The bs count needs to be less than 512 so that the partition table is retained. (I don't have the actual figure with me at the moment. You should be able to Google for it.)

  • pirat9
    avatar

    Tp wipe out the partition table also, change 446 to 512.

Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [s] [url] [quote] [code] [img]   
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow: