From owner-freebsd-questions@FreeBSD.ORG Tue Feb 13 01:14:30 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 834C816A400 for ; Tue, 13 Feb 2007 01:14:30 +0000 (UTC) (envelope-from martster@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by mx1.freebsd.org (Postfix) with ESMTP id 3E88913C48E for ; Tue, 13 Feb 2007 01:14:30 +0000 (UTC) (envelope-from martster@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so1899672nzh for ; Mon, 12 Feb 2007 17:14:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=rN/xWrxj1oxbE54Oc5f5/JGLAa4sEpKTwMUuNJa+D1UDYDifxUBjkMoCtJ1C0g0VhnWbhLMJ2DlukQ7Xd89gNP+pjIZm871Af8lU75g0DQ3WpW/4WocPQCMoj/ws/kklghaocDoI6YEoupR41XG4MwhRcki1dah4fpao/Xyo0wE= Received: by 10.64.10.2 with SMTP id 2mr22061873qbj.1171329269029; Mon, 12 Feb 2007 17:14:29 -0800 (PST) Received: by 10.65.138.16 with HTTP; Mon, 12 Feb 2007 17:14:28 -0800 (PST) Message-ID: <70063950702121714w580120d9r4119f9ff7d9f4c9d@mail.gmail.com> Date: Mon, 12 Feb 2007 20:14:28 -0500 From: "Marty Landman" To: "Jerry McAllister" In-Reply-To: <20070212152526.GA48628@gizmo.acns.msu.edu> MIME-Version: 1.0 References: <70063950702090446x712d7a94vb3b2a613a426d760@mail.gmail.com> <20070209152714.GA30383@gizmo.acns.msu.edu> <70063950702090906u1504a085j60dc7abc5121c28c@mail.gmail.com> <20070209202645.GA31381@gizmo.acns.msu.edu> <70063950702091348q49a9d997rc3dfcbb02b6375fc@mail.gmail.com> <20070212152526.GA48628@gizmo.acns.msu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: recovery after power outage X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Feb 2007 01:14:30 -0000 On 2/12/07, Jerry McAllister wrote: > > On Fri, Feb 09, 2007 at 04:48:44PM -0500, Marty Landman wrote: > > > >>> Information from DOS bootblock is: > > >>> The data for partition 1 is: > > >>> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > > >>> start 63, size 490223412 (239366 Meg), flag 80 (active) > > >>> beg: cyl 0/ head 1/ sector 1; > > >>> end: cyl 1023/ head 254/ sector 63 > > > > >What does bsd label show for it? > > > > > >> As root, do: bsdlabel ad1s1 > > > > %sudo bsdlabel ad1s1 > > # /dev/ad1s1: > > 8 partitions: > > # size offset fstype [fsize bsize bps/cpg] > > c: 490223412 0 unused 0 0 # "raw" part, > don't > > edit > > % > > > > So where do I stand? > > Hmmm. Well, that looks like a slice that has not been partitioned - > which is essentially what you have been telling us it is. That is > not 'dangerously dedicated'. It is instead an incompletely partitioned > and build slice. This HD was working fine for months until the system crashed due to a power outage. My point is I think it had been done right to begin with but the drive's data has been corrupted now. Since fsck isn't able to deal with it wonder if the data is essentially gone now. It has type 'unused' which is what the 'c' partition should be and > as such, should not be used. Are you saying I should not have set this drive up as the c partition? Instead it should have been something like ad1s1a for example? I am wondering what would happen it you tried to mount /dev/ad1s1 > without the 'c'. %sudo mount /dev/ad1s1 mount: /dev/ad1s1: unknown special file or file system %sudo mount /dev/ad1s1c mount: /dev/ad1s1c: unknown special file or file system % I don't know if fsck might work on that. You might try it (as /dev/ad1s1) > with a '-d' flag to see what it might try without actually writing > anything > to the drive and potentially wrecking something. Make sure it is not > mounted before trying the fsck. %sudo fsck -d /dev/ad1s1 fsck: Could not determine filesystem type %sudo fsck -d /dev/ad1s1c start (null) wait fsck_unused /dev/ad1s1c % Did you build a filesystem on this slice with newfs? I believe that's how I did it. If so, you can try looking for superblocks. How do I do that? If you have space for it somewhere, you could also try to dd some of > the drive. > dd if=/dev/ad1s1 of=some_file_on_another_disk bs=512 count=10000 Ok that works, and there is data there. That would copy 5 MB Then you could play with that data in hex > or with some debugger (hexdump??) that lets you muck with it a byte > at a time in hex, ASCII, octal, etc and see what you can find. ^@%s: not a directory. ^@Not ufs ^@format^@Invalid %s ^@/boot.config^@%s: %s^@/boot/loader^@/boot/kernel/kernel^@ FreeBSD/i386 boot Default: %u:%s(%u,%c)%s boot: ^@^H ^H^@No %s ^@yes^@no^@Keyboard: %s ^@slice^@label^@partition^@%c^H^@error %u lba %u Ok I haven't taken to picking apart the bits in this, but that's the stuff that looked like English in the plaintext version. Are you saying Jerry that if fsck won't deal with this data then my only option is to learn/pick apart the internals of the data on that disk myself? I mean what else can I try? Could I - since have already saved the first 5 MB of the data - try writing a new mbr and see if that let's fsck fix the rest? Pretty much over my head here, would rather not lose this 50 GB of data but not sure what more I can do. Marty -- Web Installed Formmail - http://face2interface.com/formINSTal/ Webmaster's BBS - http://bbs.face2interface.com/