Gentoo Archives: gentoo-user

From: Dan Farrell <dan@×××××××××.cx>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Corrupt USB pen drive
Date: Fri, 18 May 2007 14:15:19
Message-Id: 20070518090917.07abb935@voyager.g.spore.ath.cx
In Reply to: Re: [gentoo-user] Corrupt USB pen drive by Mick
1 On Fri, 18 May 2007 14:11:14 +0100
2 Mick <michaelkintzios@×××××.com> wrote:
3
4 > On Friday 18 May 2007 13:25, Hans-Werner Hilse wrote:
5 > > Hi,
6 > >
7 > > On Fri, 18 May 2007 12:50:07 +0100 Mick <michaelkintzios@×××××.com>
8 > > wrote:
9 >
10 > > > No matter if I use vfat, msdos, or ntfs. It seems to me that I
11 > > > need to reconstruct the hex of the partition table - but don't
12 > > > know how to do this and testdisk does not see the device to
13 > > > recover previous partition tables.
14 I agree that you probalby need to get the partition table, or at least
15 information about the partition in question. Althought it is possibe
16 that the disk is all one filesystem, I have never seen windows do it
17 that way for a usb stick. I assume it's all one big partition,
18 formatted vfat, just like all the others I've seen.
19 > > I'm pretty sure someone borked the first sectors of that stick. It
20 > > might have contained a partition table at some point in the past,
21 > > and the partition table might be gone now (HD mode).
22 I agree, this eems to be the case.
23 > > But there is
24 > > also the possibility that there wasn't a partition table but just a
25 > > single filesystem on the stick (superfloppy mode).
26 > >
27 > > My suggestion is to take a hex editor and search for the start of a
28 > > partition. Most partition types are easily recognizable by some
29 > > magic bytes. It would, however, help a lot if you could tell what
30 > > kind of filesystem there was. If you found the start of the
31 > > filesystem, just use dd again and skip the bytes until the real
32 > > start of the FS. You can then mount the resulting file (w/o
33 > > partitioning and such).
34 I agree. I've been reading about vfat filesystems a little and I think
35 this article http://en.wikipedia.org/wiki/VFAT seems to have all the
36 information we need. However,
37 > ==============================================
38 > 000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
39 If there are zeroes all through here...
40 > 0001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
41 > 000200 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
42 and FF's all through here, I'm not sure there's enough left over to
43 recover filesystem information.
44 --
45 gentoo-user@g.o mailing list