Overwrite MBR from Linux
February 21st, 2008If, like me, you are experimenting setting up usb drives as bootable Linux devices then you’ll find that after installing grub on the drive just deleting all the files will not remove grub. You need to completely wipe the Master Boot Record (MBR). Assuming your drive is located at /dev/sdb use this command as root:
dd if=/dev/zero of=/dev/sdb bs=512 count=1
Be very careful to do this on the correct drive! One error and you will wipe the MBR on your main hard drive leaving your computer unable to boot.
March 21st, 2008 at 2:00 pm
[...] relation to the post ‘Overwrite mbr from Linux’ this is how to take a backup and restore your current Master Boot Record (mbr) in case you [...]
April 23rd, 2011 at 8:32 pm
Hi,
Wanted to leave a note of appreciation. I actually used a small utility called unetbootin to make a USB drive bootable. I installed linux on the USB drive. Since then I cannot make that drive windows bootable.
Do you think MBR can be over-written with the above command.
Cheers!
April 25th, 2011 at 9:39 pm
Hi,
this command will wipe the MBR of the drive, so yes it will work for you.
Bob Peers