You can delete the mbr (master boot recored) using the dd command itself. A master boot record (MBR) is the 512-byte boot sector that is the first sector of a partitioned data storage device of a hard disk.
Understanding MBR size
The mbr size is as follows in bytes:
| Tutorial details | |
|---|---|
| Difficulty | Advanced (rss) |
| Root privileges | Yes |
| Requirements | dd |
| Estimated completion time | N/A |
- 446 bytes - Bootstrap.
- 64 bytes - Partition table.
- 2 bytes - Signature.
WARNING! These examples may crash your computer if executed. The following command will completely delete your MBR including all your partition information. So make sure you use the correct device name and block size in bytes.Option #1: Command to delete mbr including all partitions
Open a terminal and type the following command command to delete everything:
# dd if=/dev/zero of=/dev/sdc bs=512 count=1
Sample outputs:
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.00308483 s, 166 kB/s
Where,
- if=/dev/zero - Read data from /dev/zero and write it to /dev/sdc.
- of=/dev/sdc - /dev/sdc is the USB drive to remove the MBR including all partitions.
- bs=512 - Read from /dev/zero and write to /dev/sdc up to 512 BYTES bytes at a time.
- count=1 - Copy only 1 BLOCK input blocks.
Option #2: Command to delete mbr only
The following command will erase mbr, but not your partitions:
# dd if=/dev/zero of=/dev/sdc bs=446 count=1
Where,
- bs=446 - Read from /dev/zero and write to /dev/sdc up to 446 BYTES bytes at a time.
See also
- Linux: How to backup hard disk partition table (MBR)
- man pages - dd
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 8 comments… read them below or add one }
IIrc, fdisk /mbr does not “delete” your MBR. Instead, it overwrites it with a fresh one. Pasting zeroes on your MBR means it’s no longer a valid boot device (no 55AA signature at the end), it no longer has a bootstrap code on it (typically, it wont say “not bootable partition” if left in a booting computer), and has no structure to welcome new partitions.
Maybe that still does the trick to ensure another tool will not complain that “there is already something installed on this device”, but I remain skeptic over the actual benefit of this step.
Sylvainulg,
Linux has a perfect and very easy tool for partitionning anything, fresh devices
without mbr for instance : cfdisk (see: man cfdisk).
This command delete ALL THE DISK, not just MBR. If you have no idea about what are you writing, better STOP writing.
For you fault I’ve lost all my disk. This blog is a shit.
I could understand why you are upset. however, you should have read, its pretty clear to me: “The following command will completely delete your MBR, which contains all your partition information….”. BTW, you could have restore your partition. Lastly, there is a link you could have used to delete only the bootstrap part. Don’t get angry after people because you execute command without reading and understanding them first. Again, there is no error in the information provided.
I loll’d
LOL
Indeed the above comments is valid , you could (shall) destroy the partition info, alias everything, leaving many readers in a very unpleasant condition.
dd if=/dev/zero of=/dev/sdc bs=446 count=1
to clear the MBR
and
dd if=/home/dd-mbr.raw of=/dev/sdc bs=446
to restore it from a backup.
Note: To create a backup, one indeed need bs=512, then the partition info is also saved.
Please update the page as this is totally unclear
Alright, the faq has been updated as per request so that new users will not get confused.