[CLUE-Tech] Clear HDD of old OS, etc?

Ed Hill ed at eh3.com
Fri May 31 12:01:24 MDT 2002


On Fri, 2002-05-31 at 11:41, Warren wrote:
> Dave Price <davep at kinaole.org> wrote:
> 
>  > dd if=/dev/random of=/dev/hdX 
>  > Is there maybe a better dd invocation ?
> 
> Can't you just do an 'fdisk /mbr' ?


Heres a better command which will write all zeros to the first 100
512-byte blocks:

  dd if=/dev/zero of=/dev/hdX bs=512 count=100

In the past, when loading NT 4.0 on to a disk formerly used by Linux, I
had all sorts of problems.  Even after using "fdisk /mbr" and doing a
fresh NT 4.0 install, the NT boot loader had problems.  Apparently,
there was still conflicting junk left in the boot sector of the disk.

My solution at the time was to run the above dd command.  After the
fact, I found out that some disk manufacturers (eg. IBM) ship a DOS
utility that will "zero" a disk in a nearly identical fashion to the dd
command.  In fact, this all-zeros-in-the-boot-sector is the condition
that the disk is supposed to be in when shipped (brand new).

hth,
Ed

-- 
Edward H. Hill III, PhD    |  Email:       ed at eh3.com, ehill at mines.edu
Post-Doctoral Researcher   |  URLs:        http://www.eh3.com
Division of ESE            |   http://wasser.mines.edu/people/edhill.php
Colorado School of Mines   |  Phone:       303-273-3483
Golden, CO  80401          |  Fax:         303-273-3311
Key fingerprint = 5BDE 4DA1 66BE 4F7B BC17  3A0C 932B 7266 1E76 F123



More information about the clue-tech mailing list