Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jul 2002 14:08:27 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: offtopic: low level format of IDE drive.
Message-ID:  <200207082108.g68L8RMr047199@apollo.backplane.com>
References:   <Pine.BSF.4.21.0207081308410.29644-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

:
:One of my FreeBSD development boxes had a hernia last week when it lost
:power while writing to disk. The drive wrote out garbage to a track.
:
:I want to reformat the drive, (low level) but the bios doesn't have any
:support to do this (In the past That is how I did this).
:The machiine has 1 CD drive and no floppy..
:
:anyone with any ideas as to how one can reformat a hard drive feel free to 
:lend me a clue..

   Two things:

    (1) dd if=/dev/zero of=<raw_device> bs=32k 

	This will force the drive to reassign broken sectors.   Run this
	command twice.  If the second run of the command is successful 
	and does not stall (looking at running 'iostat 10' output will tell
	you whether it stalled) then you are golden. 

	Use the base device for the dd output file, e.g. like '/dev/ad0'.
	Do not specify a slice or a partition.

    (2) If the command fails for any reason other then hitting the end of
	the media, or if it stalls on the second go-around, throw the drive
	away and buy a new one.

    If that does work then use fdisk -IB to reinitialize the slice table
    and disklabel to initialize the disklabel, or use sysinstall to
    reinitialize the tables.

						-Matt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207082108.g68L8RMr047199>