Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
AussieJohn

Data Recovery [solved]

Recommended Posts

I have the above item with loads of pictures I took recently on a long round trip. I know the picture data recorded in the camera AOK because I was able to view the various images on the Camera right up till I got home. I removed the card and inserted it into a card reader on my computer (Mandriva2010). The card reader gave a few (3) orange blips on its led but nothing more happened. The Device Notifier did not show a usb device detected.

Returned the Compact flash into the Camera but the Camera gave an error message that the "Compact Flash Card not initiated".

I was very careful to make sure that the Camera was Switched off before any actions of removing or installing the card was done and also all images were previously set to "Protected" in the Camera to ensure no accidental deletion.

 

I had no trouble dealing with a 2Gb XD card at that time, both before and after experiencing this problem so I believe the Computer, Card reader and Camera are ok. I don't have a Windows computer to be able to see if it is a fat32 problem on the Compact Flash Card or whatever. A Near identical Kingston 16Gb Compact Flash works flawlessly in the Camera and the Computers' Card reader.

That seems to tell that the SanDisk Compact Flash is faulty and nothing else.

 

So..........My question is this. Would I be likely to have any luck recovering the images by launching a Live Mandriva CD or PCLinuxOS CD and trying to read the card that way ???????????.

 

I have found that there is a company that SanDisk recommends for data recovery from SanDisk Compact Flash Cards and it seems pretty modest for 2Gb Cards which this is. I would like to save the money and inconvenience if at all possible.

 

Any advice is greatly welcomed. Cheers. John.

Share this post


Link to post
Share on other sites

After you plug in the CF card, what's the output of

dmesg | egrep -i 'usb|scsi' | tail -n 40

Share this post


Link to post
Share on other sites

Hello Greg. Thanks for coming in on this. I get the following both without and also with the card inserted in the reader.

I can't see any difference between them so I think the reader cannot see the card.I know the reader is Ok because it reads the Kingston card AOK.

I have also included the Kingston card result.

 

Without the Card:-

[root@dethermy john]# dmesg | egrep -i 'usb|scsi' | tail -n 40

generic-usb 0003:046D:C52B.0006: hiddev2,hidraw5: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:13.2-2/input2

sd 0:0:0:0: Attached scsi generic sg0 type 0

sd 1:0:0:0: Attached scsi generic sg1 type 0

scsi 2:0:0:0: Attached scsi generic sg2 type 5

sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray

sr 2:0:0:0: Attached scsi CD-ROM sr0

Initializing USB Mass Storage driver...

scsi6 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 6

usb-storage: waiting for device to settle before scanning

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:0: Attached scsi generic sg3 type 0

scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:1: Attached scsi generic sg4 type 0

scsi 6:0:0:2: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:2: Attached scsi generic sg5 type 0

scsi 6:0:0:3: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:3: Attached scsi generic sg6 type 0

sd 6:0:0:1: [sdd] Attached SCSI removable disk

sd 6:0:0:2: [sde] Attached SCSI removable disk

sd 6:0:0:3: [sdf] Attached SCSI removable disk

usb-storage: device scan complete

sd 6:0:0:0: [sdc] Attached SCSI removable disk

usb 1-4: new high speed USB device using ehci_hcd and address 7

usb 1-4: New USB device found, idVendor=13fd, idProduct=1340

usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-4: Product: External

usb 1-4: Manufacturer: Generic

usb 1-4: SerialNumber: 57442D574341525734323535

usb 1-4: configuration #1 chosen from 1 choice

scsi7 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 7

usb-storage: waiting for device to settle before scanning

scsi 7:0:0:0: Direct-Access Generic External 2.10 PQ: 0 ANSI: 4

sd 7:0:0:0: Attached scsi generic sg7 type 0

usb-storage: device scan complete

sd 7:0:0:0: [sdg] Attached SCSI disk

usb 1-4: USB disconnect, address 7

 

With the SanDisk Card (which doesn't work):-

[root@dethermy john]# dmesg | egrep -i 'usb|scsi' | tail -n 40

generic-usb 0003:046D:C52B.0006: hiddev2,hidraw5: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:13.2-2/input2

sd 0:0:0:0: Attached scsi generic sg0 type 0

sd 1:0:0:0: Attached scsi generic sg1 type 0

scsi 2:0:0:0: Attached scsi generic sg2 type 5

sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray

sr 2:0:0:0: Attached scsi CD-ROM sr0

Initializing USB Mass Storage driver...

scsi6 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 6

usb-storage: waiting for device to settle before scanning

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:0: Attached scsi generic sg3 type 0

scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:1: Attached scsi generic sg4 type 0

scsi 6:0:0:2: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:2: Attached scsi generic sg5 type 0

scsi 6:0:0:3: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:3: Attached scsi generic sg6 type 0

sd 6:0:0:1: [sdd] Attached SCSI removable disk

sd 6:0:0:2: [sde] Attached SCSI removable disk

sd 6:0:0:3: [sdf] Attached SCSI removable disk

usb-storage: device scan complete

sd 6:0:0:0: [sdc] Attached SCSI removable disk

usb 1-4: new high speed USB device using ehci_hcd and address 7

usb 1-4: New USB device found, idVendor=13fd, idProduct=1340

usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-4: Product: External

usb 1-4: Manufacturer: Generic

usb 1-4: SerialNumber: 57442D574341525734323535

usb 1-4: configuration #1 chosen from 1 choice

scsi7 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 7

usb-storage: waiting for device to settle before scanning

scsi 7:0:0:0: Direct-Access Generic External 2.10 PQ: 0 ANSI: 4

sd 7:0:0:0: Attached scsi generic sg7 type 0

usb-storage: device scan complete

sd 7:0:0:0: [sdg] Attached SCSI disk

usb 1-4: USB disconnect, address 7

 

With the Kingston card (which works correctly):-

[root@dethermy john]# dmesg | egrep -i 'usb|scsi' | tail -n 40

generic-usb 0003:046D:C52B.0006: hiddev2,hidraw5: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:13.2-2/input2

sd 0:0:0:0: Attached scsi generic sg0 type 0

sd 1:0:0:0: Attached scsi generic sg1 type 0

scsi 2:0:0:0: Attached scsi generic sg2 type 5

sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray

sr 2:0:0:0: Attached scsi CD-ROM sr0

Initializing USB Mass Storage driver...

scsi6 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 6

usb-storage: waiting for device to settle before scanning

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:0: Attached scsi generic sg3 type 0

scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:1: Attached scsi generic sg4 type 0

scsi 6:0:0:2: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:2: Attached scsi generic sg5 type 0

scsi 6:0:0:3: Direct-Access Generic STORAGE DEVICE 9317 PQ: 0 ANSI: 0

sd 6:0:0:3: Attached scsi generic sg6 type 0

sd 6:0:0:1: [sdd] Attached SCSI removable disk

sd 6:0:0:2: [sde] Attached SCSI removable disk

sd 6:0:0:3: [sdf] Attached SCSI removable disk

usb-storage: device scan complete

sd 6:0:0:0: [sdc] Attached SCSI removable disk

usb 1-4: new high speed USB device using ehci_hcd and address 7

usb 1-4: New USB device found, idVendor=13fd, idProduct=1340

usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-4: Product: External

usb 1-4: Manufacturer: Generic

usb 1-4: SerialNumber: 57442D574341525734323535

usb 1-4: configuration #1 chosen from 1 choice

scsi7 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 7

usb-storage: waiting for device to settle before scanning

scsi 7:0:0:0: Direct-Access Generic External 2.10 PQ: 0 ANSI: 4

sd 7:0:0:0: Attached scsi generic sg7 type 0

usb-storage: device scan complete

sd 7:0:0:0: [sdg] Attached SCSI disk

usb 1-4: USB disconnect, address 7

 

 

I hope you can see something which may give you some ideas for me to try.

 

Thanks heaps. John.

Share this post


Link to post
Share on other sites

I get the following both without and also with the card inserted in the reader.

That's very strange. Are you using a USB hub? As user (not root) please open a terminal and do

/sbin/udevadm monitor --udev

then insert the CF card, and post the output you receive.

Share this post


Link to post
Share on other sites

I would do this:

 

fdisk -l

 

as root, that's a lower case L. Do this with the card inserted, and other than your usual hard disks do you see it? Does it have a partition table? If not, don't worry. I suggest then that you install testdisk, and use this to recover the partition table. It will detect it, and then should recover it. Then after this, you can look at recovering the files.

 

testdisk runs under linux, if it's not available in the repo, you can download the file and just extract it and run it. Available here:

 

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

Share this post


Link to post
Share on other sites

Thanks Greg.

 

Here is the result:-

 

[john@dethermy ~]$ /sbin/udevadm monitor --udev

monitor will print the received events for:

UDEV - the event which udev sends out after rule processing

 

UDEV [1271205153.013435] change /devices/pci0000:00/0000:00:13.5/usb1/1-7/1-7:1.0/host6/target6:0:0/6:0:0:0 (scsi)

UDEV [1271205153.050198] change /devices/pci0000:00/0000:00:13.5/usb1/1-7/1-7:1.0/host6/target6:0:0/6:0:0:0/block/sdc (block)

 

Does the word (block) have significance ???.

 

Ianw. Wow wow wow. I did as you suggested and installed an rpm of TestDisk which contains Photorec.

In Konsole as root typed in photorec and followed the directions.(You MUST read the "How to" documentation First)

 

It recovered every picture and video that was on the card.

 

What I found as a result of this recovery was that the total was 1.9Gb and the card is rated as 2.0Gb but is detected by the system as Approx.1.9Gb so I am wondering if that has caused a jamup of some kind. I also found that 26 files (about 308Mb) from a shoot back in Sept2008 were still on the card even though I am pretty sure I had deleted them. I have used the card numerous times since 2008 and would have normally picked that up because I download the folder rather than the individual pics. Very strange indeed.

 

 

Since I hope that the Card can be saved as well I did the fdisk -l that you requested and got the following result. :-

 

[root@dethermy john]# fdisk -l

 

Disk /dev/sda: 320.1 GB, 320071851520 bytes

240 heads, 63 sectors/track, 41345 cylinders

Units = cylinders of 15120 * 512 = 7741440 bytes

Disk identifier: 0x69205244

 

Device Boot Start End Blocks Id System

/dev/sda1 * 1 846 6395728+ 83 Linux

/dev/sda2 847 41345 306172440 5 Extended

/dev/sda5 847 2296 10961968+ 83 Linux

/dev/sda6 2297 2365 521608+ 82 Linux swap / Solaris

/dev/sda7 5971 33911 211233928+ 83 Linux

/dev/sda8 33912 41345 56201008+ 83 Linux

/dev/sda9 2366 3214 6418408+ 83 Linux

/dev/sda10 3215 4629 10697368+ 83 Linux

/dev/sda11 4630 5970 10137928+ 83 Linux

 

Partition table entries are not in disk order

 

Disk /dev/sdb: 164.7 GB, 164696555520 bytes

255 heads, 63 sectors/track, 20023 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00000000

 

Device Boot Start End Blocks Id System

/dev/sdb1 * 2728 20023 138930120 83 Linux

/dev/sdb2 1 2727 21904596 5 Extended

/dev/sdb5 1 1040 8353737 83 Linux

/dev/sdb6 1041 1170 1044193+ 82 Linux swap / Solaris

/dev/sdb7 1171 2727 12506571 83 Linux

 

Partition table entries are not in disk order

 

Disk /dev/sdc: 2048 MB, 2048901120 bytes

64 heads, 62 sectors/track, 1008 cylinders

Units = cylinders of 3968 * 512 = 2031616 bytes

Disk identifier: 0x00000000

 

Disk /dev/sdc doesn't contain a valid partition table

 

 

Now that I have the Data saved I hope there is a way that I can reformat the card or whatever needs to be done.

 

Your ideas are eagerly awaited.

 

Thanks in train loads. John.

Edited by AussieJohn

Share this post


Link to post
Share on other sites

What I found as a result of this recovery was that the total was 1.9Gb and the card is rated as 2.0Gb but is detected by the system as Approx.1.9Gb so I am wondering if that has caused a jamup of some kind. I also found that 26 files (about 308Mb) from a shoot back in Sept2008 were still on the card even though I am pretty sure I had deleted them. I have used the card numerous times since 2008 and would have normally picked that up because I download the folder rather than the individual pics. Very strange indeed.

That sounds about right as 2GB at the brochure is in the real world 2,000,000,000 bytes which translates to 1.862645GB.

 

Yes TestDisk/Photorec is an amazing tool, it doesn't look at the partition table which in your case was corrupt but goes straight to the partition and finds the files and it is not surprising that it found deleted files as when you delete a file you just remove its location from the partition table.

 

As far as resurrecting the card goes if the camera can't do it you could try gparted as the Mandriva tool "diskdrake" doesn't seem to see any cards inserted in the reader. I've never tried that but its worth a try.

 

Ken

Edited by K Bergen

Share this post


Link to post
Share on other sites

Thanks for your contribution, Ken.

 

What sort of thing could have caused the Partition Table to be corrupted???.

 

I haven't tried reformatting the card in the camera yet. Would that be capable of fixing it ???.

 

I'll download Gparted and burn it to CD. I gave away my earlier copy.

 

Cheers. John

 

 

UPDATE :- I managed to reformat the card in the camera. The Card is operating correctly again. I have done 3 lots of 10 shots each and it performs normally again.

 

Sincere thanks for everyones help, especially Ians' fantastic lead.

 

This case is now SOLVED.

Edited by AussieJohn

Share this post


Link to post
Share on other sites

I would now format the card in the camera as usual. Something happened that borked the partition table. Formatting again in the camera should bring it back to a sanitised state.

 

Just for info, testdisk is good at recovering the partition table, and files that existed and their filenames. If you are sure that something is not right, then you can perform data carving, which is what photorec does. Photorec doesn't care about the partition table or even what filesystem was on the disk. It will just look at a sector level (I think) and recover the pictures. Of course, because of this recovery process, it doesn't know about filenames, so they get assigned numeric values. However it does know by file type, hence the extension should stay the same, as jpg, doc, etc, etc.

Share this post


Link to post
Share on other sites

Thanks Ian.

As I said in my update in my previous post, the camera reformatted the Card successfully.

 

Photorec allocated new numbering to the recovered images. While the majority were in proper sequence some were mixed about but with a little effort I renumbered the mis-ordered ones to get the series correct even if the numbering is not exactly numerically sequential. I consider this was an infinitely small price to pay for what could have been lost work.

 

I will also be making a donation to the team to help keep up the good work.

 

Cheers. John.

Share this post


Link to post
Share on other sites

I used testdisk and photorec in a much more difficult situation. A hard disk in a laptop had been encrypted. Problems were encountered with the machine, and so they decrypted the hard disk. Problem was, after decryption, entire partition table was lost - similar to what you experienced. They also had more than one partition on disk, which meant it would be hard to re-create it and hope for the best.

 

testdisk did the partition table magic, and I used this to get the majority of the files back. Then I used photorec just to be sure, which gives the random naming because it works at a much deeper level than testdisk. testdisk is good in everyday stuff, but worst case scenario photorec will get you going.

 

And I'm glad it got you sorted out too.

Share this post


Link to post
Share on other sites

Hello Nexus.

 

5mins to search via google, 3mins to download and install. 10 mins to read and get to understand the routine to be conducted.

 

Then the amazing thing is that it took exactly 5 minutes for the extraction. Less than a half an hour from wo to go.

 

This time is for a 2gb memory card so obviously the time taken would be determined by the size of the card. The developers emphasize

that the amount of Computer Memory you have will also determine extraction time. I have 4Gb (4 x 1) of DDR2 Corsair Memory so that helped a huge amount.

 

This is one application that together with Filelight and OpenShot Video, Will be regularly installed on all my OSs in future.

 

Cheers. John.

Share this post


Link to post
Share on other sites

Thanks for the prompt reply John.  I'm trying to gauge how long I can expect to wait for it to perform the same job on a 20Gb hard drive.  Oh and isn't OpenShot a great app :D

Share this post


Link to post
Share on other sites

This is one application that together with Filelight and OpenShot Video, Will be regularly installed on all my OSs in future.

 

Cheers. John.

John,

 

You might want to add gparted to that list as you only need the bootable CD if you need to work on system partitions. Anything you can unmount gparted can handle from within a running system.

 

Ken

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×