I am not able to download the contents of my SD card which is full of photos from my Nikon camera.
When I put the card into my camera, I can view the photos, without a problem. But when I put the SD card into the card reader of my IBM X40 notebook or an external USB card reader on another computer, I get some scrambled content.
In windows explorer it looks like this:
In linux, when I insert the card in the card reader and do
dmesg I get:
[ 76.531535] mmc0: new SD card at address b368 [ 76.602280] mmcblk0: mmc0:b368 SDC 1.86 GiB [ 76.606556] mmcblk0: p1
sudo cfdisk /dev/mmcblk0 gives me a partition and some empty space:
cfdisk (util-linux 2.21.2) Festplatte: /dev/mmcblk0 Größe: 2007498752 Bytes, 2007 MB Köpfe: 28 Sektoren pro Spur: 27 Zylinder: 5186 Name Flags Part. Typ Dateisystemtyp [Bezeichner] Größe (MB) ------------------------------------------------------------------------------- Pri/Log Freier Bereich 0,14 * mmcblk0p1 Boot Primäre vfat 2007,37 *
sudo parted /dev/mmcblk0 print shows only one partition:
Modell: SD SDC (sd/mmc) Festplatte /dev/mmcblk0: 2007MB Sektorgröße (logisch/physisch): 512B/512B Partitionstabelle: msdos Disk Flags: Nummer Anfang Ende Größe Typ Dateisystem Flags 1 131kB 2007MB 2007MB primary fat16 boot
It is no problem to mount the card with
sudo mount -o uid=erik /dev/mmcblk0p1 /mnt/test/ and listing the cards root directory:
[erik@mars test]$ ls -l /mnt/test/
insgesamt 96 drwxr-xr-x. 254 erik root 32768 16. Feb 12:34 DCIM drwxr-xr-x. 224 erik root 32768 16. Feb 12:34 MISC -rwxr-xr-x. 1 erik root 512 16. Feb 12:34 NIKON001.DSC
But when I try to list the content of the directories on the card via
ls, it takes forever and
dmesg shows this:
[ 337.246359] FAT-fs (mmcblk0p1): error, fat_get_cluster: invalid cluster chain (i_pos 0) [ 337.246372] FAT-fs (mmcblk0p1): Filesystem has been set read-only [ 347.729392] FAT-fs (mmcblk0p1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
Question: Any idea, what the problem could be? Why is the cards contents readable in the camera but not within windows or linux with a card reader (builtin in notebook or external usb card reader).
Is it maybe not vfat/fat32 formatted? What else should I try?
I managed to download the pictures with photorec.
- After that I formatted the card with
mkfs.vfat(linux), but it was not recognized in the camera.
- I then formatted the card with windows explorer. But the camera again claimed, that the card was not formatted and asked me if it should be formatted by the camera.
This time I selected yes, took a test photo and inserted the card in the card reader again. Now all directories were readable. cfdisk showed me, that it was formatted as vfat again. Strange …