recovery after power outage

Marty Landman martster at gmail.com
Tue Feb 13 01:14:30 UTC 2007


On 2/12/07, Jerry McAllister <jerrymc at msu.edu> 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/


More information about the freebsd-questions mailing list