Clearing master boot record (Linux)

Print

hard-drive-iconQ. I'm trying to wipe clean a hard drive. No matter what I do, I can't get rid of this GRUB on my screen. How do I wipe it out?

A. You have to delete the master boot record on the disk. Regular format will not do it.

 

Be careful, running those commands can mess up your working hard drives, if you don't specify the proper device.

1. If you are working under Linux, this is the command to clear it:  

# dd if=/dev/zero of=/dev/sda bs=512 count=1

Where /dev/sda is your device.

 

2. If you have access to Windows/MSDOS tools:

fdisk /mbr

or

fixmbr [device_name]

This will clear it to windows default. The fixmbr command is only available when you are using the Recovery Console.

Linux
Comments (3)
feedbak
3 Friday, 28 June 2019 21:26
noj
awesome
just great
2 Friday, 13 February 2015 01:56
Vlad
this command will remove both mbr and partition table
to clear mbr only use dd if=/dev/zero of=/dev/sda bs=446 count=1
gparted
1 Saturday, 03 November 2012 12:59
WSmart
Believe gparted and most gui based partition editors will also write a new master boot record/boot sector.

Thanks all.

Be real, be sober.
yvComment v.1.24.0