From owner-freebsd-questions Fri Sep 5 22:03:00 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA22353 for questions-outgoing; Fri, 5 Sep 1997 22:03:00 -0700 (PDT) Received: from gdi.uoregon.edu (cisco-ts13-line6.uoregon.edu [128.223.150.155]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA22348 for ; Fri, 5 Sep 1997 22:02:54 -0700 (PDT) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.5/8.8.5) with SMTP id WAA07499; Fri, 5 Sep 1997 22:02:45 -0700 (PDT) Date: Fri, 5 Sep 1997 22:02:44 -0700 (PDT) From: Doug White X-Sender: dwhite@localhost Reply-To: Doug White To: Nick Johnson cc: freebsd-questions@FreeBSD.ORG Subject: Re: Crash recovery In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, 4 Sep 1997, Nick Johnson wrote: > I had a disk crash, but only lost 200 or so sectors. I am limping this > drive along until my replacement disk comes. The new disk is of the same > type and configuration. > > The drive in question has an evil operating system on the first partition > and FreeBSD on the second. > > Here is my plan: > > dd if=/dev/wd0 of=/dev/wd1 bs=128k > bad144 -s /dev/wd1s2 No, this isn't a great idea IMHO. You'd be better to disklabel & newfs the new disk, then use `tar cf - * | tar xf -' or dump/restore to copy the files. Tar will preserve the permissions. Check the tar man page though before beginning. dd'ing the filesystem is asking for trouble; it seems like a horrible hack and bound to fail because of simple errors or filesystem/disk inconsistencies. > 1) dd may not copy over the partition information (not a big deal, as I > can always partition the new drive exactly like the old one) > 2) bad144... does anyone know if it will replace the old bad sector table? > dd will most likely copy over the bad sector table, which will be invalid > for the new disk. Well, don't use dd and you won't have that problem. > If anyone can shed some light on these issues, please drop me a note. If this is a Western Digital drive, see Western Digital's site for a program to help out with bad sector remapping. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major Spam routed to /dev/null by Procmail | Death to Cyberpromo