[Wolves] Master Boot Record

James Turner james at turnersoft.co.uk
Tue Nov 23 09:20:30 GMT 2004


On Tuesday 23 Nov 2004 09:01, Schwuk wrote:
> On Tue, 2004-11-23 at 08:18 +0000, Rob Annable wrote:

> I've also heard reference to "zeroing out the
> MBR" but I don't know the actual process.

If I recall correctly, this will do the job under Linux:

dd if=/dev/zero of=/dev/hda bs=512 count=1

(adjusting the output file (specified using "of=") depending on whether the 
disc is the primary master, slave, etc).

A similar process can be used to wipe the boot sector of a specific partition, 
for example:

dd if=/dev/zero of=/dev/hda1 bs=512 count=1

If you want to show off, you can even swap boot sectors around (on the same 
disc, depending on operating system - I've done it successfully between Linux 
and Windows NT), save and restore them as files, and still have them work, 
such as:

dd if=/dev/hda1 of=/home/james/boot-sect-hda1 bs=512 count=1
dd if=/dev/hda2 of=/dev/hda1 bs=512 count=1
dd if=/home/james/boot-sect-hda1 of=/dev/hda2 bs=512 count=1

Be careful if you try any of the above on a disc that has data on it that 
you'd like to keep.

Have fun!

James



More information about the Wolves mailing list