From owner-freebsd-questions Tue Apr 9 06:39:19 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA11439 for questions-outgoing; Tue, 9 Apr 1996 06:39:19 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA11433 for ; Tue, 9 Apr 1996 06:39:14 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id XAA16140; Tue, 9 Apr 1996 23:33:51 +0930 From: Michael Smith Message-Id: <199604091403.XAA16140@genesis.atrad.adelaide.edu.au> Subject: Re: hard reading error To: richardc@CSUA.Berkeley.EDU (Richard Chang) Date: Tue, 9 Apr 1996 23:33:50 +0930 (CST) Cc: joerg_wunsch@uriah.heep.sax.de, questions@freebsd.org In-Reply-To: from "Richard Chang" at Apr 9, 96 01:47:14 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Richard Chang stands accused of saying: > >>> I am experiencing a problem with my FreeBSD partition with a hard >>> reading error on my hard drive since someone accidentally kicked the >>> machine while it was running. I had fixed the problem in DOS by >>> repairing it with Norton Disk Doctor, is there a way to do it under FreeBSD? >> >> Error messages? > > Here they are: > > 1006499 of 1006496-1006511 (wd0s2 bn 1112995; cn 1104 tn 2 sn 37)wd0: status 59< > seekdone,drq,err> error 40 > wd0s2e: hard error reading fsbn 1006499 of 1006496-1006511 (wd0s2 bn 1112995; cn > 1104 tn 2 sn 37)wd0: status 59 error 40 > wd0s2e: hard error reading fsbn 1006499 of 1006496-1006511 (wd0s2 bn 1112995; cn > 1104 tn 2 sn 37)wd0: status 59 error 40 The 'badsect' command is the easiset way of dealing with this. Read the 'badsect' manpage for intimate details on the process. The "bad sector number" you want is the 'fsbn' (filesystem block number) value, ie 1006499. If we assume that /dev/wd0s2e is mounted as /foo, you would say : # cd /foo # mkdir BAD # badsect BAD 1006499 # cd / # umount /foo # fsck /dev/rwd0s2e (respond as detailed in the badsect manpage) > Richard -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[