Is there a way to read exfat SD / USB cards?

Check whether /dev/sdc is readable or not: dd if=/dev/sdc count=1 | hd
and whether it has any partitions: cat /proc/partitions | grep sd

Finally got back to looking at this. This is the result

Code:
humax# dd if=/dev/sdc count=1 | hd                                                                                                                                                           
dd: can't open '/dev/sdc': No such device or address                                                                                                                                         
humax# cat /proc/partitions | grep sd                                                                                                                                                       
   8     0         64 sda                                                                                                                                                                   
   8     1       2044 sda1                                                                                                                                                                   
   8    16 1953514584 sdb                                                                                                                                                                   
   8    17    1052251 sdb1                                                                                                                                                                   
   8    18 1941969327 sdb2                                                                                                                                                                   
   8    19   10490447 sdb3                                                                                                                                                                   
   8    32    1048576 sdc

So it's says it can't open and no partitions?
 
Had an idea to look at the sd card in window 10 computer management to see what it said about partitions and this is what it says

1664321108300.png

so could the humax be struggling with the fact that there is 16MB allocated at the beginning?
 
I found another card reader, a simpler one, just one port and still no luck. I am going to have to find another memory card and see if I can play around with the formatting.to see what works and what doesn't.

In the meantime, is there any way I can tell or check that the exfat plugin has installed correctyl and will auto mount a drive?

for reference:
Web interface version: 1.5.0-1
Custom firmware version: 3.13 (build 4028)
Humax Version: 1.03.12 (kernel HDR_CFW_3.13)
Loader Version: a7.33


Thanks

Rodp
 
Hi All, Came back to trying the same SD card and the same hub and got a different response today - perhaps slightly better?

Code:
humax# dd if=/dev/sdc count=1 | hd                                                                                                                     
1+0 records in                                                                                                                                         
1+0 records out                                                                                                                                       
512 bytes (512B) copied, 0.005000 seconds, 100.0KB/s                                                                                                   
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|                                                                         
*                                                                                                                                                     
000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 0a  |................|                                                                         
000001c0  09 02 07 fe ff ff 00 80  00 00 00 d0 6e 07 00 00  |............n...|                                                                         
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|                                                                         
*                                                                                                                                                     
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|                                                                         
00000200                                                                                                                                               
humax# cat /proc/partitions | grep sd                                                                                                                 
   8     0         64 sda                                                                                                                             
   8     1       2044 sda1                                                                                                                             
   8    16 1953514584 sdb                                                                                                                             
   8    17    1052251 sdb1                                                                                                                             
   8    18 1941969327 sdb2                                                                                                                             
   8    19   10490447 sdb3                                                                                                                             
   8    32   62367744 sdc                                                                                                                             
   8    33   62351360 sdc1

In the Rag log i got this:

Code:
224    32469:23/10/2022 21:56:07: Scanning /media/drive2 for signed packages
223    32469:23/10/2022 21:56:07: Checking for packages.
222    32469:23/10/2022 21:56:07: Checking for bundles.
221    32469:23/10/2022 21:56:07: ------------
220    32469:23/10/2022 21:56:07: Source files
219    32469:23/10/2022 21:56:07: Scanning /media/drive2 for packages/bundles
218    32469:23/10/2022 21:56:06: Considering package scan on /media/drive2
217    32469:23/10/2022 21:56:06: <<< /mod/etc/mdev/z9samba
216    32469:23/10/2022 21:56:06:     /media/drive2 /tmp/tmp.I1q1cF
215    32469:23/10/2022 21:56:06: >>> /mod/etc/mdev/z9samba add /dev/sdc1
214    32469:23/10/2022 21:56:06: <<< /mod/etc/mdev/ntfs-3g
213    32469:23/10/2022 21:56:06:     /media/drive2 /tmp/tmp.Cdu19D
212    32469:23/10/2022 21:56:06: >>> /mod/etc/mdev/ntfs-3g add /dev/sdc1
211    32469:23/10/2022 21:56:06: <<< /mod/etc/mdev/exfat
210    32469:23/10/2022 21:56:05:     /media/drive2 /tmp/tmp.CMkr8v
209    32469:23/10/2022 21:56:05: >>> /mod/etc/mdev/exfat add /dev/sdc1
208    32469:23/10/2022 21:56:05:   mount FAILED after 0 seconds.
207    32469:23/10/2022 21:56:05:   found orphaned mount point /media/drive2
206    32469:23/10/2022 21:56:04: Waiting for the disk to mount...
205    32469:23/10/2022 21:56:04: /dev/sdc1 partition type dos
204    32469:23/10/2022 21:56:04: /dev/sdc1 is connected via USB.
203    32469:23/10/2022 21:56:04: /dev/sdc1 is removable.
202    32469:23/10/2022 21:56:04: /dev/sdc1 is NOT formatted as ext2/3
201    32469:23/10/2022 21:56:04:   disk ready after 1 second
200    32469:23/10/2022 21:56:03:   still waiting...
199    32469:23/10/2022 21:56:03: Waiting for disk to become ready...
198   
197    32469: Disk:       sdc
196    32469: Device:     /dev/sdc1
195    32469: Model:      HDR
194    32469: ACTION:     add
193    32469: MDEV:       sdc1
192    32469: Date:       Sun Oct 23 21:56:03 UTC 2022

I still can't seem to mount it either automatically or manually

Code:
/mod/sbin/mount.exfat-fuse /dev/sdc /media/drive2exfat                                                                                         
FUSE exfat 1.2.6                                                                                                                                       
ERROR: exFAT file system is not found.


Is this progress?


Thanks

Rodp
 
errrr help!!! the dd if=/dev/sdc count=1 | hd command have upset my SD card now and can't be read in my camera nor in windows

1666567851100.png

The dd command looks like it's done something bad. I suspect the data is still there so I just need to fix the partition info???

Please help!!

Thanks

Rodp
 
Code:
197 32469: Disk: sdc
196 32469: Device: /dev/sdc1
195 32469: Model: HDR
194 32469: ACTION: add
193 32469: MDEV: sdc1
192 32469: Date: Sun Oct 23 21:56:03 UTC 2022
This looks good.
I still can't seem to mount it either automatically or manually

Code:
/mod/sbin/mount.exfat-fuse /dev/sdc /media/drive2exfat
FUSE exfat 1.2.6
ERROR: exFAT file system is not found.
That should be /dev/sdc1 - there is a partition on the stick, as just proved above.
Is this progress?
Probably.
the dd if=/dev/sdc count=1 | hd command have upset my SD card now and can't be read in my camera nor in windows
What do you mean by can't be read? Your image below shows it mounts OK as F: . What were you expecting?
1666567851100.png
The dd command looks like it's done something bad. I suspect the data is still there so I just need to fix the partition info???
As written, it only reads from the disk, so it can't have done anything to it.
 
it was as this pic before the dd command was run (albeit a different drive letter). It no longer knowns it's exfat. windows just says now it's raw and need formatting.
1666572508336.png
 
Something has changed the partition information so that the filesystem code is RAW instead of exFAT. Let's see the output of sfdisk -d /dev/sdc.
 
Last edited:
Apologies for the late reply - been away.

Here's the output

Code:
humax# sfdisk -d /dev/sdc                                                                                                                             
label: dos                                                                                                                                             
label-id: 0x01ec33d8                                                                                                                                   
device: /dev/sdc                                                                                                                                       
unit: sectors                                                                                                                                         
                                                                                                                                                      
/dev/sdc1 : start=       32768, size=   124702720, type=7                                                                                             
humax#

I've run various recovery programs and they can read / recover the pictures and videos to varying degrees (R-undelete seems to do the best job compared to EaseUs Data Recovery Wizard and Photorec (rather surprisingly!) R-undelete recovers the filenames and directory structure whilst the others don't seem to be able to do that and just rename the files and lose the directory structure. Photos are more or less recovered but got to work through the videos still - I think I've lost a few. Anyone know a good video recovery program that can repair the files (eg inject headers etc) - a bit like mp3val for mp3 files?

Anyway, back to the memory stick. does the output above give any clues? Do you think it's possible that the dd command wasn't the culprit but the mounting process did something? I don't know much about partition info but how easy is it to recreate the partition info? Sorry I'm not that knowledgeable about partitions.

Thanks

Rodp
 
7 appears to be the right type, so, sadly, the filesystem on the partition isn't being recognised. If you can mount it on other OSes, something has happened to the FS that Windows doesn't expect; maybe some fsck will fix it. If it won't mount anywhere and no sort of fsck helps and the contents are precious, there are tools for recovering files of a known type, such as photos, from a readable drive whose FS is somewhat screwed.
 
it isn't recognised in the camera anymore, aswell as windows, so I guess that's a different OS which probably means it's not going to be possible to repair the partition info? I've managed to get the files off and am working through them to see what I'm missing. Once fixed, I'll reformat it back to exfat and see if it happens again with the knowledge that I have a back up! :)
 
I wouldn't bother. You've got what data you can off it, now consign it to the bin. In my experience, Flash memory devices which have become troublesome (perhaps due to faulty memory cells in a critical place) remain troublesome.
 
It isn't recognised in the camera anymore, aswell as windows, so I guess that's a different OS which probably means it's not going to be possible to repair the partition info?
There's nothing wrong with the partition info. so I don't know why you keep on wanting to repair it.
The filesystem within the partition is another matter. Just run Chkdsk on it from Windows (or the equivalent GUI action), like /df said (albeit using some fsck instead on Linux - this is /mod/sbin/fsck.exfat or /mod/sbin/exfatfsck on the HDR).
 
In this recent El Reg article, much is made of the supposedly new capability to fix exFAT filesystems in Linux, rather than just detecting errors. I guess that applies to the kernel driver implementation and we have the FUSE version?
 
There's nothing wrong with the partition info. so I don't know why you keep on wanting to repair it.
The filesystem within the partition is another matter. Just run Chkdsk on it from Windows (or the equivalent GUI action), like /df said (albeit using some fsck instead on Linux - this is /mod/sbin/fsck.exfat or /mod/sbin/exfatfsck on the HDR).

Sorry - prp but my lack of knowledge on the difference between partitions and filesystems is showing, I'm learning as I'm going!!

Have just tried both /mod/sbin/fsck.exfat or /mod/sbin/exfatfsck but it reports back the following:

Code:
humax# /mod/sbin/fsck.exfat /dev/sdc
exfatfsck 1.2.6
ERROR: exFAT file system is not found.
humax# /mod/sbin/fsck.exfat /dev/sdc1
exfatfsck 1.2.6
ERROR: exFAT file system is not found.

Code:
humax# /mod/sbin/exfatfsck /dev/sdc
exfatfsck 1.2.6
ERROR: exFAT file system is not found.
humax# /mod/sbin/exfatfsck /dev/sdc1
exfatfsck 1.2.6
ERROR: exFAT file system is not found.

I did a little research and tried fdisk and it seemed to come up with an interesting error about 33 blocks over lapping but perhaps that is a red herring? Again, I'm learning as I go along.

Code:
humax# gdisk
GPT fdisk (gdisk) version 1.0.1

Type device filename, or press <Enter> to exit: /dev/sdc
Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************


Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Rather than just reformat it I want to learn more about this issue so please do bare with me as little longer.

I have a live disc with gparted - should I give this a go?

Thanks

Rodp
 
I think you are making things (or are going to make them) worse. There are specialist tools which understand SD cards and other flash, and in general OS utilities expect things to look like HDDs.
 
Have just tried both /mod/sbin/fsck.exfat or /mod/sbin/exfatfsck
They are the same thing, so there's no point trying both. And it will always be /dev/sdc1 (in this context).
did a little research and tried fdisk and it seemed to come up with an interesting error about 33 blocks over lapping but perhaps that is a red herring?
No you didn't, your quote shows you used gdisk, which is not the same thing at all. Yes it is a red herring.
I have a live disc with gparted - should I give this a go?
No. It won't fix whatever damage has been done - it is a partitioning tool... and you know the rest.
I suspect you screwed up the dd command somehow, somewhere along the line and you've trashed the filesystem. I don't know what you've done and I'm fairly certain you don't either. It's really important not to start guessing with stuff like this, if you value the data of course.
The only option you have left is, as has already been said, to put it in your Windows box and run Chkdsk on it. If that doesn't fix it, then your only realistic option is to re-make the filesystem (i.e. format it).
 
Back
Top