How do I clear the master boot record of a hard disk without erasing the partition table?

Updated -

Warning: Please take extra care when doing this as a single typo can wipe out valuable data!

This only applies to DOS style disk layouts; non-x86 architectures use different layouts. The blanked disk will no-longer be bootable unless the MBR is subsequently rebuilt or restored.

  1. Assuming the device in question is /dev/sda<...>

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content