Clearing hard disk's MBS

Markku Kolkka markkuk at tuubi.net
Wed Aug 9 11:17:50 UTC 2006


Irvine Short kirjoitti viestissään (lähetysaika keskiviikko, 9. 
elokuuta 2006 11:18):
> On Wed, 2006-08-09 at 08:47 +0200, Przemyslaw Gawronski wrote:
> > Hi, how can I clean hdd's Master Boot Sector? For example
> > after I've put there GRUB.
>
> dd if=/dev/zero of=/dev/hda bs=1024 count=8192
>
> Make sure you get the device right in the line above! Not sure
> if the count above is enough though.

It's much too large if you only want to clear the MBR. Use bs=512 
and count=1 to leave the rest of the disk intact. MBR is just 
the first 512-byte sector of the boot disk.

-- 
 Markku Kolkka
 markku.kolkka at iki.fi




More information about the fedora-list mailing list