Gentoo Archives: gentoo-user

From: Dan Farrell <dan@×××××××××.cx>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Corrupt USB pen drive
Date: Thu, 17 May 2007 14:54:01
Message-Id: 20070517094559.14586f21@pascal.spore.ath.cx
In Reply to: [gentoo-user] Corrupt USB pen drive by Mick
1 On Thu, 17 May 2007 12:36:25 +0100
2 Mick <michaelkintzios@×××××.com> wrote:
3
4 > Hi All,
5 >
6 > A colleague used a USB stick on his home machine and when he brought
7 > it to work he can no longer access it using WinXP. I offered to help
8 > with my Gentoo laptop (as one ought to rise to the challenge!) but it
9 > seems that Linux is also struggling to get to it:
10 > ==========================================
11 > usb 2-1: new full speed USB device using uhci_hcd and address 2
12 > usb 2-1: configuration #1 chosen from 1 choice
13 > scsi0 : SCSI emulation for USB Mass Storage devices
14 > usb-storage: device found at 2
15 > usb-storage: waiting for device to settle before scanning
16 > scsi 0:0:0:0: Direct-Access USB BAR 1.89 PQ: 0
17 > ANSI: 2 SCSI device sda: 255744 512-byte hdwr sectors (131 MB)
18 > sda: Write Protect is off
19 > sda: Mode Sense: 03 00 00 00
20 > sda: assuming drive cache: write through
21 > SCSI device sda: 255744 512-byte hdwr sectors (131 MB)
22 > sda: Write Protect is off
23 > sda: Mode Sense: 03 00 00 00
24 > sda: assuming drive cache: write through
25 > sda: unknown partition table
26 > sd 0:0:0:0: Attached scsi removable disk sda
27 > sd 0:0:0:0: Attached scsi generic sg0 type 0
28 > usb-storage: device scan complete
29 > UDF-fs: No VRS found
30 > Unable to identify CD-ROM format.
31 > FAT: bogus logical sector size 65535
32 > VFS: Can't find a valid FAT filesystem on dev sda.
33 > NTFS-fs warning (device sda): is_boot_sector_ntfs(): Invalid boot
34 > sector checksum.
35 > NTFS-fs error (device sda): read_ntfs_boot_sector(): Primary boot
36 > sector is invalid.
37 > NTFS-fs error (device sda): read_ntfs_boot_sector(): Mount option
38 > errors=recover not used. Aborting without trying to recover.
39 > NTFS-fs error (device sda): ntfs_fill_super(): Not an NTFS volume.
40 > hfs: can't find a HFS filesystem on dev sda.
41 > VFS: Can't find ext3 filesystem on dev sda.
42 > VFS: Can't find an ext2 filesystem on dev sda.
43 > ReiserFS: sda: warning: sh-2021: reiserfs_fill_super: can not find
44 > reiserfs on sda
45 > ==========================================
46 >
47 > I tried to dd the boot sector so that I can look at it on my hard
48 > drive, but it cannot access /dev/sda. Is there anything that I can
49 > do with my Gentoo to recover the files on this USB?
50
51 have you tried reading raw from the device like
52 | dd if=/dev/sda of=sda.image
53 ? That might do the recovery. How to get it out of the image is the
54 same problem but once the backup succeeds you can plug it into a
55 windows xp box and reformat, and you will probably end up with the same
56 partition structure as originally. Then you can try to read the right
57 part of the image out of the image, once you get the numbers from fdisk
58 on the newly formatted drive, and end up with an image of sda1. From
59 there you should be able to mount sda1 and read out the data, if it
60 isn't corrupted.
61
62 I also am wondering what happened to the partition table. I bet your
63 coworker has a security-compromised box at home (oh, runs windows?
64 right...) At any rate, if the data is recoverable, it may be possible
65 to rebuild the partition table if you can find out where the partition
66 started and ended. People have done it before, i've read online about
67 it.
68 --
69 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Corrupt USB pen drive Mick <michaelkintzios@×××××.com>