Linux Delete / Remove MBR

https:‮w//‬ww.lautturi.com
Linux Delete / Remove MBR

The Master Boot Record (MBR) is a special area on the first sector of a hard drive or other storage device that contains the bootloader and partition table for the device.

To delete or remove the MBR on a Linux system, you can use the dd command. dd is a utility that allows you to perform low-level input/output operations on devices and files.

Here's an example of how to use dd to delete the MBR of a device:

  1. Identify the device name of the device. You can use the lsblk command to list the block devices on the system, along with their device names. For example:
$ lsblk

This will display a list of block devices, including the device whose MBR you want to delete. The device name will typically be in the form of /dev/sdX, where X is a letter representing the device (e.g., sda, sdb, etc.).

  1. Run dd to delete the MBR. Use the if and of options to specify the input and output files (in this case, the device), and the bs and count options to specify the block size and the number of blocks to write. For example:
$ sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1

Replace /dev/sdX with the device name of the device.

This will write 0s to the first sector (512 bytes) of the device, effectively deleting the MBR.

Created Time:2017-10-29 22:08:53  Author:lautturi