Linux Delete / Remove MBR

To delete or remove the Master Boot Record (MBR) in Linux, you can use the dd command. The dd command can be used to overwrite the MBR with zeros or other data. Here’s how you can use dd to delete the MBR:

  1. Determine the device name of the disk you want to delete the MBR from:
$ lsblk

In this example, the device name is /dev/sda. Make sure to replace this with the device name of your disk.

  1. Unmount the disk:
$ umount /dev/sda
  1. Use the dd command to overwrite the MBR with zeros:
$ dd if=/dev/zero of=/dev/sda bs=512 count=1

The bs option specifies the block size, and the count option specifies the number of blocks to be written. In this case, we’re writing 1 block of size 512 bytes to the disk.

  1. Verify that the MBR has been deleted:
$ dd if=/dev/sda bs=512 count=1 | hexdump

If the MBR has been successfully deleted, the output from the hexdump command should be all zeros.

Note that deleting the MBR will cause all data on the disk to be lost. Make sure to back up any important data before proceeding with this operation.

Leave a Comment