Skip to content
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

ERROR: unknown entry type 0xc1 #89

Closed
redongh opened this issue Feb 12, 2018 · 7 comments
Closed

ERROR: unknown entry type 0xc1 #89

redongh opened this issue Feb 12, 2018 · 7 comments

Comments

@redongh
Copy link

redongh commented Feb 12, 2018

systems used

machine_A
  • Fedora 27 (64bit)
  • Kernel: 4.14.16-300
  • fuse-exfat.x86_64: 1.2.7
machine_B
  • Windows 8.1 (x64)

steps to reproduce issue

  • create GPT-partitioning scheme using machine_A (not tested with MBR)
  • create 1 partition of type 'microsoft basic data'
    -> /dev/sdb1 (size probably irrelevant, in my case 2TB)
  • format partition specifying a custom ID and a label with at least one dot-symbol (.):
    # mkfs.exfat -i DEADBEEF -n A.B.C /dev/sdb1
  • mount newly created partition
  • create a directory with pretty much any name you like
  • put some test-files into that folder (warning: these files may be lost!)
  • umount from machine_A
  • (optional step:) run dumpexfat:
    -> output:
    Volume label                   A.B.C
    Volume serial number      0xdeadbeef
    FS version                       1.0
    Sector size                      512
    Cluster size                  131072
    Sectors count             4294967296
    Free sectors              4294634496
    Clusters count              16776703
    Free clusters               16775916
    First sector                       0
    FAT first sector                 128
    FAT sectors count             131200
    First cluster sector          131328
    Root directory cluster            19
    Volume state                  0x0000
    FATs count                         1
    Drive number                    0x80
    Allocated space                   0%
  • (optional step:) runexfatfsck:
    -> output:
    exfatfsck 1.2.7
    Checking file system on /dev/sdb1.
    File system version           1.0
    Sector size                 512 bytes
    Cluster size                128 KB
    Volume size                   2 TB
    Used space                  163 MB
    Available space               2 TB
    Totally 1 directories and 2 files.
    File system checking finished. No errors found.
  • mount on machine_B (win 8.1 in my case)
  • check with device-manager
    -> lists partition named 'A.B.C'
  • (optional:) mount if automount is not acivated
    -> volume mounts without errormessage
  • browse volumes content with windows-file-explorer
    -> shows empty disk (!)
  • view properties through windows-file-explorer's context-menu:
    -> shows a matching percentage of the filesystem's space as used
  • unmount / eject from machine_B
  • try to mount again with machine_A
    -> Mount error: unknown entry type 0xc1
    -> Data seems lost and filesystem broken =(

note

  • windows seems to break the filesystem, not fuse-exfat !
  • windows (tested with 8.1) won't allow a volume-name containing a dot, as this issue did not occur when using a volume-name without a dot i suspect this might cause this issue.
  • not sure if this issue may be related with Mount error: unknown entry type 0xca #33

suggestion

  • either disallow characters in volume names that windows also won't allow or let the user know that his filesystem will likely become garbeled once mounted to windows (at least some versions).
@redongh redongh changed the title Mount error: unknown entry type 0xc1 ERROR: unknown entry type 0xc1 Feb 12, 2018
@relan
Copy link
Owner

relan commented Feb 12, 2018

Thanks for detailed report!

Sounds like #81. That bug happened when you put a file with long name into the root of a freshly created FS. Could you test fuse-exfat 1.2.8?

This is not #33 because in that bug it was buggy camera software that created FS.

windows (tested with 8.1) won't allow a volume-name containing a dot, as this issue did not occur when using a volume-name without a dot i suspect this might cause this issue

That's strange. I'll try to reproduce.

@redongh
Copy link
Author

redongh commented Feb 16, 2018

retesting with fuse-exfat 1.2.8 without the described issue.
I'll therefore consider this as fixed and close this one.
Thanks for your efforts and feedback!

@redongh redongh closed this as completed Feb 16, 2018
@relan
Copy link
Owner

relan commented Feb 16, 2018

Thanks for verifying!

@BlitzKraft
Copy link

BlitzKraft commented Mar 18, 2018

I am currently facing this issue, with exfatfsck 1.2.8. I am on Ubuntu 17.10. Not sure how this started in the first place.

Windows thinks the drive is corrupt. This is a 2TB SSD, less than ~6 months old. It is possible this might be #81, but I don't know a way of verifying it.

This is what I get with exfatfsck :

FUSE exfat 1.2.8
ERROR: unknown entry type 0xc1

I get the same with mount.exfat-fuse. Only thing that can get an output is dumpexfat -s.

Volume serial number 0x4468bc26
FS version 1.0
Sector size 512
Cluster size 524288
Sectors count 3907024896
Clusters count 3815422
First sector 2048
FAT first sector 2048
FAT sectors count 30720
First cluster sector 32768
Root directory cluster 4
Volume state 0x0002
FATs count 1
Drive number 0x80
Allocated space 32%

This is interrupting boot up and dropping me to an emergency console with root. Ctrl-D doesn't work, starting x from the console doesn't work either.

Looking through the journalctl -xb logs shows

mount.exfat [997] : unknown entry type 0xc1
media-disk-name.mount: Mount process exited, code=exited status=1
Failed to mount /media/user/disk-name

-- Subject: unit media-disk-name.mount has failed
-- Defined-By: systemd

-- The result is dependency.
-- user systemd[1]: Dependency failed for local file systems.

There are some lines skipped in the above log. I am transcribing this using a different computer looking at the console of the ubuntu machine.

Edit: I am able to boot back into ubuntu by disabling the automount via fstab. Ubuntu root is on a different hard disk. The fuse-exfat in ubuntu repos is 1.2.7, I downloaded the master branch and installed it to check if 1.2.8 might fix it. I tried using the fsck from the repair branch as well. Made no difference so far.

@relan
Copy link
Owner

relan commented Mar 18, 2018

@BlitzKraft, smells like #81. The bug is fixed in fuse-exfat 1.2.8, but the fix will not repair already broken file systems.

I tried using the fsck from the repair branch as well. Made no difference so far.

Could you post its output?

@BlitzKraft
Copy link

BlitzKraft commented Mar 18, 2018

fsck from the repair branch failed with the same error message as the master one:

FUSE exfat 1.2.8
ERROR: unknown entry type 0xc1

Edit: I forgot to re-compile when I switched the branches. That's probably why it behaved the same. I just switched branches last night. I need to run make again. Didn't realize until now. Will post the output when I get to it.

@BlitzKraft
Copy link

Just an update, I couldn't recover the data and the drive was corrupt. I used testdisk, gpart. So, I formatted the drive and restored from a back up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants