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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.