Thursday, September 18, 2008

Delete the MBR

Okay, if you're anything like me, you like to mess around with your pc. Not just a bit, but turn it into an unbootable slop that requires hours (which turns in to less as you get more experienced) of work to repair. So, this is just a little fix. Suppose letsay, that you don't have a DVD burner. And you want to download a 4.1Gb file who's name happens to be openSUSE 11. So, earlier I bought an 8Gb pendrive, succesfully installed Ubuntu 8.04 and then messed it up by formating it later. Now the MBR is all screwed up, and I need to get rid of it so:

Linux-based solution:

dd if=/dev/zero of=/dev/hd(x) bs=512 count=1 - This deletes your MBR completely! At own risk!

dd if=/dev/zero of=/dev/sdb bs=446 count=1 - This just zero's your MBR, and you keep it.

Remember, you must be logged in as root ('sudo su root' for Ubuntu & variants, 'su' for everything else)

(x) is where your HDD is. 'a' is located at / and 'b', and 'c' are usually USB drives.

No comments: