-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount error: unknown entry type 0xca #33
Comments
That's interesting, I've never seen such entry type before. Did you use this drive in a camera, media player or some other device (i.e. not a PC)? Could you post the output of |
ok I will On Sun, Apr 10, 2016 at 12:17 AM, relan notifications@github.com wrote:
|
I've got a similar error on an SDXC card formatted in a camera. I think I've got a fix for it. :) I analyzed the situation last night. The superblock says the The root directory only has a few entries (aside from the mandatory So whatever the first byte of that random data block is (0xE2 in my http://ntfs.com/exfat-directory-structure.htm it is told that an entry with type 0x00 is simply considered to be the Here's the respective patch:
(Edit: sorry, there's one stray fprintf() too much in the patch file, left from debugging.) |
Thanks for your analysis! This explains why fuse-exfat fails to mount this SD card. However, the statement about EOD (0x00) entry in this document is incorrect. To check this I've created a fresh image and formatted it into exFAT in Windows 7 with 4 KB cluster. The root directory cluster looked like this (my comments on the right):
Then I've filled the last 1 KB of this cluster with random values:
Windows' I think the guys who wrote the doc assumed exFAT works with directories in the same way as FAT32. That's not the case: exFAT does not use EOD. Could you |
Well, reformatting the card right now is not an option. We first Maybe Windows doesn't care if the garbage is simply beyond 64 KiB, I'd upload you a dump file containing the first few megabytes that I've (temporarily) uploaded it to http://uriah.heep.sax.de/outgoing/exfat-data.bz2 (Unfortunately, since I did have it in OSX meanwhile, the root |
I've made the same experiment with 128 KB cluster and got the same result: I've inspected this image an can confirm that it looks exactly as you described. So, the conclusion is: it's buggy camera software. Workaround: create filesystem using |
I had a fellow coworker run chkdsk on that card on his Windows 7. Yes, Nevertheless, both Windows as well as OSX do not have troubles reading We cannot fix that kind of buggy camera firmware, but as this bug Since there is no point in searching for further valid directory However, exfatfsck might (and should) complain about the garbage, just (If you want me to supply a suggestion for this, just tell me.) Спасибо большое за Вашая работа! |
That's true. I agree that it's better to make things just work even if a hack is needed for this. BTW what camera model is this?
This approach will work fine for reading. But garbage in a directory should also be handled somehow when new entries are being created. Right now I'm thinking of another "fix": forcefully zero out directory from the 1st zero (type 0x00) entry to the end of the directory. This would be quite simple to implement and test. Do other directories contain garbage too or it's only root directory that is broken? |
A compact camera from Rollei. Exact model I currently don't know. It's already a few years old now, so quite possible exFAT implementations were not that widely used already by the time of its development.
I'd be reluctant to forbibly zero out something unless really needed.
From a glance at the next two directories (DCIM, and DCIM/103DICAM), they look OK. |
I think it is really needed because working with a corrupted FS is asking for problems. It's easier to clear a minefield and then work safely than permanently keep in mind that there are mines over here.
In the early versions of fuse-exfat I did maintain a EOD (i.e. type 0x00) entry. Believe me, it's a mess. Microsoft's decision to get rid of it makes a lot of sense.
Great. This means that camera's FS creation code is buggy (not FS driver). Thus we need to handle only root directory in a special way. |
I agree adding more hacks is not a good idea. My suggestion:
|
Heh. I was just working on a patch to do a dangerous-read-only mount for data recovery. In my case, I was getting corrupt checksums leading to unreadable directories which exfatfsck couldn't fix (windows could) and I just wanted my data back. |
Я знаю ... можно помогать, немножко. |
I called it "dangerous" for a reason. I disabled all the enforcement on error conditions just so that I could read my file system. Then I reformatted my device as FAT32 because I've had 3 corrupted exfat volumes this week and no unusable FAT32 in decades. |
Note that exfatfsck does not currently 'fix' things -> issue #3 |
I stumbled into a similar issue last night. It's been working great for a couple of months but now I can't access the pen drive on my Linux machine. (worked after reboot though) I have a USB 3.0 64GB pen drive which I have mounted in fstab: /dev/sda1 /media/sda1 exfat-fuse auto,nofail,uid=33,gid=33,umask=0007 0 0 Here the output from dumpexfat: dumpexfat 1.1.0 This is what I've found in the syslog, around10 times every second: Dec 30 19:39:37 localhost mount.exfat-fuse: unknown entry type 0x96 I also see that I have a huge amount of errors when running exfatfsck (1148...) of files which haven't been allocated. What's the reason for this? |
Kalekulan, you are using a very old exfat-utils version (1.1, current is 1.2.5). I'd recommend to update. Updating will hardly solve this particular issue though. Please post the output of |
Thanks for the response. I've updated now to 1.2.4. Version 1.1 is the one in the stable debian jesse rep. I also see that I have a huge amount of errors when running exfatfsck (1148 of them...) of files which haven't been allocated (most of them are photo syncs from my iPhone 6). Snip: I put the pendrive in my Windows machine, trying to repair the allocation issues. When I run mount.exfat-fuse -d I get this (snip): getattr /123/abc/files/test.png For the files which are unallocated. |
This means the volume is heavily damaged. Try
This was fixed in v1.2.5: it'll report an error and continue checking. Do you get unknown entry type 0x96 error with v1.2.4? |
Ok, thanks! No, the check stops when I get the invalid cluster number 0. I've tried it with 1.2.5 now: ERROR: 'Photo-2016-12-17-15-06-58_2246.JPG' directory starts with invalid cluster 0. Totally 10463 directories and 37884 files. |
The FS is damaged and I've no idea why. I'd recommend to save files from this USB stick (possibly with photorec) and format it. Keep an eye on it, this could be a hardware failure. |
exfatfsck in v1.3.0 can now fix this kind of error. |
Thanks for the fix! I'm afraid the camera with the buggy firmware is meanwhile already broken :), but it's good to know there's an option in exfatfs that can fix it in case it might happen again somewhere. Спасибо большое! |
KaOS (2016)
KDE Plasma 5.6.1
framework 5.20.0
Qt 5.6.0
Kenel 4.4.5-1
64-bit
gui mount KDE Dolphin:
An error occurred while accessing '119.7 GiB Removable Media', the system responded: The requested operation has failed: Error mounting /dev/sdb1 at /run/media/jimslinux/9C33-6BBD: Command-line
mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdb1" "/run/media/jimslinux/9C33-6BBD"' exited with non-zero exit status 1: stdout:
FUSE exfat 1.2.3'
stderr: `ERROR: unknown entry type 0xca.
'
Create dir for card to mount to:
[root@jim-pc ~]# mkdir /media/newhd
[root@jim-pc ~]# mount /dev/sdb1 /media/newhd
FUSE exfat 1.2.3
ERROR: unknown entry type 0xca.
The text was updated successfully, but these errors were encountered: