Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Retrieving files from a corrupted USB stick

  1. #1
    Join Date
    Nov 2010
    Location
    Mons (Belgium)
    Beans
    11

    Retrieving files from a corrupted USB stick

    Dear all,

    I am currently trying to retrieve files from a corrupted USB mass storage stick and I could use some help.

    Let’s me explain the issue. When I plug the USB stick into a Windows or Linux PC, the key is detected as not formated while I am sure this was the case case previously.

    On Ubuntu, in the /dev directory on Linux, I can see the /dev/sdb file but no /dev/sdb1 entry. When I tried to mount manually the device via the following command “"sudo mount -t vfat /dev/sdb /media/", I got the following message:
    mount: wrong fs type, bad option, bad superblock on /dev/sdb,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so
    The output of dmesg mentions:
    [ 2530.652525] FAT: bogus logical sector size 65535
    [ 2530.652533] VFS: Can't find a valid FAT filesystem on dev sdb
    I have copied the whole memory image of the USB stick via dd (sudo dd if=/dev/sdb of=sdb.image) in order to examine it with GHex editor and it indeed appears that the 1st sector of the stick is erased and replaced by “0xFF” bytes (this explains why the OS was not able to mount it automatically). However, the remaining part of the image seems intact.

    So my question is the following: could you recommend me some good software to recover the files from the memory image?

    Thanks in advance for any help.

    Best regards

  2. #2
    Join Date
    Nov 2010
    Location
    Mons (Belgium)
    Beans
    11

    Re: Retrieving files from a corrupted USB stick

    By "googling" a little, I found the Photorec software (http://www.cgsecurity.org/wiki/PhotoRec).
    That was all what I needed and I have been able to recover my files.

    For any interested reader, have a look at the following post on a Gentoo forum: http://www.mail-archive.com/gentoo-u.../msg55653.html. This helps me a lot.

  3. #3
    Join Date
    Apr 2008
    Location
    Norfolk, UK/Corinth,MS
    Beans
    814
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Retrieving files from a corrupted USB stick

    Walmit, I have a similar problem, but not identical.
    My usb stick is recognised as present if I use lsusb, and in the file browser, within the /dev directory an sdb file is shown when I plug in the usb stick.

    However it does have a cross across the file icon (not sure what that indicates) and if I try to mount it using "sudo mount -t vfat /dev/sdb /media/", I get a message
    "mount: no medium found on /dev/sdb".

    Is either TestDisk or PhotoRec likely to help in this situation ?

    Regards
    John
    It's like doing jigsaw puzzles in the dark.

  4. #4
    Join Date
    Aug 2010
    Beans
    128
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Retrieving files from a corrupted USB stick

    install testdisk and then run "photorec" on the terminal. Enter your sudo password and then follow photorec's instructions.

  5. #5
    Join Date
    Apr 2008
    Location
    Norfolk, UK/Corinth,MS
    Beans
    814
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Retrieving files from a corrupted USB stick

    Thanks jessejj89. I took your advice, but unfortunately photorec didn't detect the stick, only my hdd.

    I presume from this that this is not a way forward for me ?

    Regards
    John
    It's like doing jigsaw puzzles in the dark.

  6. #6
    Join Date
    May 2006
    Location
    Boston
    Beans
    1,918
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Retrieving files from a corrupted USB stick

    post output of :
    Code:
    sudo apt-get install parted
    sudo parted -l
    Last edited by fdrake; December 25th, 2011 at 10:38 PM.

    blog
    Donations BTC : 12FwoB7uAM5FnweykpR1AEEDVFaTLTYFkS
    DOUBLEPLUSGOOD!!

  7. #7
    Join Date
    Apr 2008
    Location
    Norfolk, UK/Corinth,MS
    Beans
    814
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Retrieving files from a corrupted USB stick

    Quote Originally Posted by fdrake View Post
    post output of :
    Code:
    sudo apt-get install parted
    sudo parted -l

    john@frizzy:~$ sudo parted -l
    Model: ATA HITACHI_DK23FA-3 (scsi)
    Disk /dev/sda: 30.0GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 32.3kB 28.7GB 28.7GB primary ext3 boot
    2 28.7GB 30.0GB 1283MB extended
    5 28.7GB 30.0GB 1283MB logical linux-swap(v1)
    Why aren't you enjoying the holiday ?

    Regards
    John
    It's like doing jigsaw puzzles in the dark.

  8. #8
    Join Date
    May 2006
    Location
    Boston
    Beans
    1,918
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Retrieving files from a corrupted USB stick

    Quote Originally Posted by grey1beard View Post
    Why aren't you enjoying the holiday ?

    Regards
    John
    i am .. ;D
    do you have problem only with this one or others too:
    Code:
    sudo apt-get install lshw
    lsusb && lspci | grep USB
    sudo lshw -c disk -c volume

    blog
    Donations BTC : 12FwoB7uAM5FnweykpR1AEEDVFaTLTYFkS
    DOUBLEPLUSGOOD!!

  9. #9
    Join Date
    Apr 2008
    Location
    Norfolk, UK/Corinth,MS
    Beans
    814
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Retrieving files from a corrupted USB stick

    john@frizzy:~$ lsusb && lspci | grep USB
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 002: ID 058f:1234 Alcor Micro Corp. Flash Drive
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
    00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
    00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)
    00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)
    john@frizzy:~$ sudo lshw -c disk -c volume
    *-disk
    description: ATA Disk
    product: HITACHI_DK23FA-3
    vendor: Hitachi
    physical id: 0
    bus info: scsi@0:0.0.0
    logical name: /dev/sda
    version: 00M6
    serial: 1ZW564
    size: 27GiB (30GB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=8f3ae29e
    *-volume:0
    description: EXT3 volume
    vendor: Linux
    physical id: 1
    bus info: scsi@0:0.0.0,1
    logical name: /dev/sda1
    logical name: /
    version: 1.0
    serial: 0bd3cf5d-fcaa-412e-8150-cc32b4f75cad
    size: 26GiB
    capacity: 26GiB
    capabilities: primary bootable journaled extended_attributes large_files recover ext3 ext2 initialized
    configuration: created=2011-06-16 20:58:23 filesystem=ext3 modified=2011-12-24 00:03:39 mount.fstype=ext3 mount.options=rw,relatime,errors=remount-ro,data=ordered mounted=2011-12-25 21:05:58 state=mounted
    *-volume:1
    description: Extended partition
    physical id: 2
    bus info: scsi@0:0.0.0,2
    logical name: /dev/sda2
    size: 1223MiB
    capacity: 1223MiB
    capabilities: primary extended partitioned partitioned:extended
    *-logicalvolume
    description: Linux swap / Solaris partition
    physical id: 5
    logical name: /dev/sda5
    capacity: 1223MiB
    capabilities: nofs
    *-cdrom
    description: DVD reader
    product: DVD-ROM SD-R2412
    vendor: TOSHIBA
    physical id: 1
    bus info: scsi@1:0.0.0
    logical name: /dev/cdrom
    logical name: /dev/cdrw
    logical name: /dev/dvd
    logical name: /dev/scd0
    logical name: /dev/sr0
    version: 1015
    capabilities: removable audio cd-r cd-rw dvd
    configuration: ansiversion=5 status=nodisc
    *-disk
    description: SCSI Disk
    physical id: 0.0.0
    bus info: scsi@2:0.0.0
    logical name: /dev/sdb
    I've used the Quote tags - should I have used the Wrap Code tags for these large quotes ? Still a newbie.

    John
    It's like doing jigsaw puzzles in the dark.

  10. #10
    Join Date
    Apr 2008
    Location
    Norfolk, UK/Corinth,MS
    Beans
    814
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Retrieving files from a corrupted USB stick

    Just re-read your post, and realise I'm stumbling blindly on.
    No, I don't have any probs with any other usb sticks etc.
    Getting late here, and pills and bedtime approach !!

    John
    It's like doing jigsaw puzzles in the dark.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •