relan / exfat

Free exFAT file system implementation
GNU General Public License v2.0
789 stars 179 forks source link

Empty folders on sdxc from camera #123

Closed koudi closed 5 years ago

koudi commented 5 years ago

Hello,

I'm having troubles reading photos from camera. I can mount the card (128gb micro sdcx) and see everything on the root - some nikon file and DCIM folder, which should contain photos, but it's empty.

Fsck show no errors

> exfatfsck /dev/sda1
exfatfsck 1.3.0
Checking file system on /dev/sda1.
WARN: volume was not unmounted cleanly.
File system version           1.0
Sector size                 512 bytes
Cluster size                128 KB
Volume size                 116 GB
Used space                   17 MB
Available space             116 GB
Totally 1 directories and 1 files.
File system checking finished. No errors found.

And dumps shows this.

> dumpexfat /dev/sda1
Volume label             NIKON D5100
Volume serial number      0x4eb9b849
FS version                       1.0
Sector size                      512
Cluster size                  131072
Sectors count              244252672
Free sectors               244218624
Clusters count                953984
Free clusters                 953979
First sector                   32768
FAT first sector               16384
FAT sectors count              16384
First cluster sector           32768
Root directory cluster             4
Volume state                  0x0000
FATs count                         1
Drive number                    0x80
Allocated space                   0%

Is there anything I can do to fix this?

Thank you.

relan commented 5 years ago

Could you share FS dump?

  1. Insert your SD card into a PC.
  2. Erase the SD card: dd if=/dev/zero of=/dev/sda1 bs=4M.
  3. Insert into the camera.
  4. Format it.
  5. Take a photo of something you can share.
  6. Insert the SD card into a PC again.
  7. Unmount the FS if it was mouted autmatically.
  8. Dump the whole FS: dd if=/dev/sda1 of=exfat.img.
  9. Compress the dump: xz exfat.img.
koudi commented 5 years ago

Thank you. I was going to send you the dump, but after zeroing-out the card and formatting it once again, it started working. (I can send you the dump anyway if you will, but I think it's pointless now).

I'm sorry - I should have thought of properly erasing it first myself.

relan commented 5 years ago

This could happen if the SD card is defective. Keep an eye on it and let me know if you stumble upon this issue again.

koudi commented 5 years ago

I bought two identical card and both behaved the same way. They presented few files in the root and emty dcim folder. After zeroing out the whole card everything is ok. I lost one of them, so if I purchase it again, I will try to provide image of the factory state.

Thank you for your work.