You are not logged in.

#1 2009-07-12 16:17:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

file recovery util for Linux (flash memory/digital camera) [SOLVED]

I found tons of $$$ windows utils that claim to offer recovery options for FAT/FAT32 partitions like those found on SD flash devices like digital cameras.  Is there an opensource application for Linux that you guys can recommend for me to try?  The goal is to recover some digital photos that were deleted from a FAT32 formatted-SD flash on my digital camera.

Thanks!

Last edited by graysky (2009-07-12 17:06:58)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-07-12 16:23:54

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

Fist make a dd image of the card

 dd if=/dev/card of=/home/whatever/card.imge

Then install and run foremost, works great for me.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#3 2009-07-12 16:23:55

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

TestDisk and PhotoRec are probably about as good as any:

http://www.cgsecurity.org/wiki/TestDisk

http://www.cgsecurity.org/wiki/PhotoRec

You can find them both on lots of liveCDs, such as the Parted Magic LiveCD.


oz

Offline

#4 2009-07-12 17:06:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

@ozar - thank you very much for the suggestion.  PhotoRec is fantastic and recovered the lost photos easily.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2009-07-12 17:34:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

Added to the wiki: http://wiki.archlinux.org/index.php/File_Recovery

Last edited by graysky (2009-07-12 17:45:26)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2009-07-12 17:37:42

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

graysky wrote:

Nice!


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#7 2009-07-12 17:49:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

lifeafter2am wrote:

Fist make a dd image of the card

 dd if=/dev/card of=/home/whatever/card.imge

Then install and run foremost, works great for me.

My digital camera is connected via a USB cable and gets automounted by Gnome, appearing as an icon entitled, "Fuji Photo Film Co., Ltd FinePix F40fd (PTP)" on my Gnome desktop.  I don't see it either by a mount or by a df -h. I would like to make an image of the flash memory as you suggested.  How can I discover the if= part of the dd line?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2009-07-12 18:11:29

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

Usually it will still show up as some type of device in /dev .  I would have a look through /dev and see if it pops up.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#9 2009-07-12 20:24:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

I did, but there's nothing obvious to me that it's a camera at all.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2009-07-12 20:47:57

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

What program are you using?  Just Nautilus or something else?


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#11 2009-07-12 20:51:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

@life - I believe it's just Nautilus automounting the thing.  I had a look through my /var/logs/dmesg.log for the thing but didn't see anything there.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2009-07-12 21:02:53

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

The last place you may be able to look is with lsusb -v.  It will provide a lot of output though, so be prepared.  wink


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#13 2009-07-12 21:45:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

OK... without the verbose switch I get:

$ lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 045e:00db Microsoft Corp. Natural Ergonomic Keyboard 4000 V1.0
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 047d:1013 Kensington Mouse*in*a*Box Optical Pro
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 009: ID 04cb:01c5 Fuji Photo Film Co., Ltd FinePix F40fd (PTP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

If I throw in the -v switch, the relevant info for device 009 is:

Bus 001 Device 009: ID 04cb:01c5 Fuji Photo Film Co., Ltd FinePix F40fd (PTP)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x04cb Fuji Photo Film Co., Ltd
  idProduct          0x01c5 FinePix F40fd (PTP)
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                2 USB PTP Camera
  iSerial                 3 592E313235320713238E03302008C6
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower               50mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         6 Imaging
      bInterfaceSubClass      1 Still Image Capture
      bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval              11
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

You can see that it's Device 009, but beyond that, I have no idea how that gets used nor do I know if there is an equilivant under /dev somewhere.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2009-07-12 22:03:03

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

I didn't notice this earlier, but your camera is using PTP mode, which, if I remember correctly, is transparently handled by libgphoto and/or libptp.  Transparently as in, I don't think you get a block device that you can work from.  You can google around and see what other *NIX users say about the camera, but most of the time people only want to get the images off, not try and recover them.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#15 2009-07-12 22:05:55

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: file recovery util for Linux (flash memory/digital camera) [SOLVED]

I see... I don't see an option for other modes in this thing... guess I'll have to get a card reader if I want a block device.  Anyway, thanks for clearing this up for me.  The Arch Community is the best on the 'Net smile

Last edited by graysky (2009-07-12 22:08:23)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB