From owner-freebsd-hackers Mon Jul 8 14: 8:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8782D37B400 for ; Mon, 8 Jul 2002 14:08:30 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DEB743E09 for ; Mon, 8 Jul 2002 14:08:30 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.4) with ESMTP id g68L8RLA047200; Mon, 8 Jul 2002 14:08:27 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g68L8RMr047199; Mon, 8 Jul 2002 14:08:27 -0700 (PDT) (envelope-from dillon) Date: Mon, 8 Jul 2002 14:08:27 -0700 (PDT) From: Matthew Dillon Message-Id: <200207082108.g68L8RMr047199@apollo.backplane.com> To: Julian Elischer Cc: hackers@FreeBSD.ORG Subject: Re: offtopic: low level format of IDE drive. References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : :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= 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