Error exfat file system is not found

Добрый вечер! Возникла проблема - после перебрасывания около 100 ГБ данных на внешний HDD с exFAT (одной папкой, условно New Folfer) при попытке прочитать любой файл из New Folder возникла ошибка Очевидно, что диск после этого не читается никак.
  • Печать

Страницы: [1]   Вниз

Тема: Устранение ошибок ФС exFAT  (Прочитано 4161 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
int1bh

Добрый вечер!

Возникла проблема — после перебрасывания около 100 ГБ данных на внешний HDD с exFAT (одной папкой, условно New Folfer) при попытке прочитать любой файл из New Folder возникла ошибка

«Sorry, could not display all the contents of «Имя_того_самого_диска или имя_папки»: Transport endpoint is not connected»

Очевидно, что диск после этого не читается никак. Какими средствами можно восстановить нормальное функционирование HDD? Спасет ли удаление папки? (наивная надежда на легкое решение) Есть ли какой-нибудь chkdisk для exfat?

ОС Ubuntu 11.10

Заранее спасибо!


Оффлайн
shumtest


Оффлайн
int1bh

Подключил диск, сделал mount, потом
sudo fsck.exfat /dev/sdc
пишет, что

ERROR: exFAT file system is not found.

Что характерно, диск читается (благодаря FUSE, без его установки читаться отказывался)

Fdisk -l определяет тип диска как:

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  3907026943  1953512448    7  HPFS/NTFS/exFAT

Что я делаю не так?


Оффлайн
vovan—vovan

exFAT уже стояла на диске во время записи на него или его так отформатировали? Но в любом случае, лучше открыть диск при помощи Виндовс 7 или Мак ос, сохранить информацию в комп и переформатировать внешний диск в ntfs.


Оффлайн
Self-Perfection

Подключил диск, сделал mount, потом
sudo fsck.exfat /dev/sdc
пишет, что

ERROR: exFAT file system is not found.

Что характерно, диск читается (благодаря FUSE, без его установки читаться отказывался)

Fdisk -l определяет тип диска как:

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  3907026943  1953512448    7  HPFS/NTFS/exFAT

Что я делаю не так?

  • Делать fsck лучше на отмонтированных разделах. Всё-таки механизмы проще чинить когда они выключены, не так ли?
  • Ну и натравили вы fsck не туда. Exfat же у вас на /dev/sdc1, а не на /dev/sdc

Читайте документацию, наставницу вашу!
Памятка по описанию проблем:
Для решения [такой-то задачи] делаю [такие-то действия], но вместо [ожидаемый результат] получаю [описание отличий].


  • Печать

Страницы: [1]   Вверх

@protectivedad

I compiled fuse-exfat and exfat-utils 1.3.0 for a ARM router. Mounting or using any exfat-utils on a known working exfat system by either image file, flash drive or harddrive gives:
ERROR: exFAT file system is not found.

This interesting thing is if I take an NTFS drive and use the exfat-utils mkexfatfs it creates an exfat file system that can be read by my windows machine, but on the router it gives the error:
ERROR: exFAT file system is not found.

So, mkexfatfs seems to work, but exfat programs that tries to read the file/or image fail. I created a 1G image file using:

/ # dd bs=1M count=1024 if=/dev/null of=exfat.img
/ # /data/bin/mkexfatfs /mnt/disk1_2/exfat.img
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
/ # mount.exfat -d /mnt/disk1_2/exfat.img /mnt/disk2_1/
FUSE exfat 1.3.0
ERROR: exFAT file system is not found.
/ # hexdump -n 100 /mnt/disk1_2/exfat.img
0000000 76eb 4590 4658 5441 2020 0020 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000040 0000 0000 0000 0000 0000 0020 0000 0000
0000050 0080 0000 0100 0000 0180 0000 7ffa 0000
0000060 0004 0000
0000064
 ```

The -d debug flag doesn't seem to do anything or at least there is no change in the output when I use it.

@relan

What libc does this router use?

Could you strace the mount command?

@protectivedad

There’s no strace or any tracing on the box. It is using uClibc. I can see about compiling something to trace it, if you can point me to the source download. Thanks.

@relan

@protectivedad

@relan

lseek(3, 20140648, SEEK_SET)            = 20140648
read(3, ""..., 512) = 512

This lseek looks weird. Could you give me a link to the source code of uClibc version used in your router? uClibc is LGPL, so the vendor should provide sources.

How did you compile fuse-exfat? Did you use autotools or some other build system? Looks like there’s a problem with LFS (large file support) because lseek is called instead of lseek64.

@protectivedad

@protectivedad

I’m not sure if this helps, but I also recompile the latest ntfs-3g drivers to use the external libfuse. Here is a strace of the command:
ntfs-3g /dev/sda2 /mnt/disk1_2 -o use_ino,direct_io,big_writes
strace.ntfs-3g.log

@relan

The abovementioned repo does not include libc source code.

I’ve checked upstream uClibc sources and to me it looks like a misconfiguration: fuse-exfat uses pread/pwrite and both uClibc and Linux kernel should support them, but for some reason uClibc on your router erroneously translates those calls to lseek+read/write (should be pread64/pwrite64 instead).

@protectivedad

You are right. By substituting lseek64, pread64, and pwrite64 in io.c the tools work. When I get a chance I will look further into why ntfs-3g is able to handle this without a problem, but your fuse-exfat has issues. Or do you know why?

@relan

I can only guess that some defines are missing in the Makefile.

@protectivedad

The configure for ntfs-3g defines _GNU_SOURCE which eventually defines, in the toolchain headers features.h, __USE_UNIX98 which creates:

#define pread pread64
#define pwrite pwrite64

etc. I’m not sure if this is something that you want to include or not, but that is the solution. Another way to do the same thing which is done in the mtd-utils is:

#define _XOPEN_SOURCE 500 /* For pread/pwrite */

You can correct me if I’m wrong, but from my reading of man pages I think the _XOPEN_SOURCE is supposed to be defined in order to use the pread/pwrite functions.

@PhilT001

Hi, I am having the same issue while trying to mount a fuse-exfat formatted microsd card (created on the target machine)

The card mounts fine and is writable on other devices (both Linux and android arm devices)

I compiled fuse-exfat 1.3.0 on a Nokia N810 internet tablet (arm device) with autotools.

libc version:

(Nokia-N810-43-7) ~ $ ldd —version
ldd (GNU libc) 2.5
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Source: http://repository.maemo.org/pool/diablo/free/g/glibc/glibc_2.5.0-1osso10.tar.gz

strace log:

https://termbin.com/oby1

@relan

Looks like _llseek is broken:

_llseek(3, 0, [15929966592], SEEK_END) = 0
_llseek(3, 0, [0], SEEK_SET) = 0
pread(3, ""..., 512, 766222165606400) = 512
write(2, "ERROR: "..., 7ERROR: ) = 7
write(2, "exFAT file system is not found"..., 30exFAT file system is not found) = 30

What version of autotools did you use and what version of kernel does your tablet run?

@PhilT001

autoconf (GNU Autoconf) 2.69
automake (GNU automake) 1.15
libtool (GNU libtool) 2.4.6

Kernel is 2.6.21-omap1

@relan

@PhilT001, could you try the following patch?

diff --git a/libexfat/io.c b/libexfat/io.c
index bc92c7c..81ef727 100644
--- a/libexfat/io.c
+++ b/libexfat/io.c
@@ -226,9 +226,24 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode)
 					"you can fix this with fdisk(8)");
 	}
 	else
+#elif defined(__linux__)
+	if (!S_ISREG(stbuf.st_mode))
+	{
+		uint64_t size;
+
+		if (ioctl(dev->fd, BLKGETSIZE64, &size) == -1)
+		{
+			close(dev->fd);
+			free(dev);
+			exfat_error("failed to get block device size");
+			return NULL;
+		}
+		dev->size = size;
+	}
+	else
 #endif
 	{
-		/* works for Linux, FreeBSD, Solaris */
+		/* works for FreeBSD, Solaris */
 		dev->size = exfat_seek(dev, 0, SEEK_END);
 		if (dev->size <= 0)
 		{

@PhilT001

Thanks for your help so far.

Can you advise me as to how to apply this patch? I have limited experience applying patch files and I just getting errors with this.

@relan

@PhilT001

@relan

Could you share libexfat/config.h? Looks like something’s wrong with Large File Support (pread is used instead of pread64).

@PhilT001

@relan

config.h is OK.

I looked through glibc-2.5 code and it seems that missing _XOPEN_SOURCE can cause ABI issues with LFS. Please try this patch:

diff --git a/libexfat/exfat.h b/libexfat/exfat.h
index 2342be4..77ea5db 100644
--- a/libexfat/exfat.h
+++ b/libexfat/exfat.h
@@ -24,6 +24,7 @@
 #ifndef EXFAT_H_INCLUDED
 #define EXFAT_H_INCLUDED

+#define _XOPEN_SOURCE 500
 #ifndef ANDROID
 /* Android.bp is used instead of autotools when targeting Android */
 #include "config.h"

@PhilT001

Success!

Your latest patch produces the following:

(Nokia-N810-43-7) DEBIAN $ sudo mount.exfat /dev/sda1 ~/mnt/fuse-exfat
FUSE exfat 1.3.0

Thank you for your time and help with this.

@Black-Spade

This did not work for me as well

@relan

This did not work for me as well

What exactly doesn’t work for you?

@Hphuang-hub

Hello, i have the same question, strace log file is as below
strace.sdb.log

For some reason, I can no longer mount my USB hard drive, which is ExFAT formatted. The strange thing is, it auto-mounted just fine an hour ago. Here’s what happened:
On a brand-new Pi, I installed Raspbmc from NOOBS.
The only extra package I installed was psmisc.
I connected a 2.5″ USB ExFAT hard drive, powered externally, so no hot-plug issues.
Immediately, I could browse files in /media/passport. (Using SSH, but also visible in XBMC.)

Then I shutdown, and rewired, so that the USB disk is being powered directly through the Pi.
After rebooting, the disk isn’t mounted, however it does appear as /dev/sda1, and it shows in lsusb.
I tried to mount manually:

Code: Select all

$ sudo mount -t exfat /dev/sda1 /media/passport
FUSE exfat 0.9.7
ERROR: exFAT file system is not found.
$ sudo mount.exfat-fuse /dev/sda1 /media/passport/
FUSE exfat 0.9.7
ERROR: exFAT file system is not found.

Tried to reinstall exFAT:

Code: Select all

$ sudo apt-get install exfat-fuse
Reading package lists... Done
Building dependency tree       
Reading state information... Done
exfat-fuse is already the newest version.

So I rewired again, back to the original configuration, with the disk powered externally. Still doesn’t work. I can’t figure out what the problem is.

Joecephus

White ninja
White ninja
Posts: 4
Joined: 15 Feb 2019, 19:05
Distribution: Porteus 4.0 Xfce

Exfat not working after installing Fuse and Utils

Hello everyone,

I am running a new install of Porteus 4.0 with the xfce desktop and trying to mount a USB drive formatted with the ExFat filesystem. I have installed exfat-utils and fuse-exfat packages version 1.2.8. but I am still getting ¨exFAT file system is not found¨ when I try to mount the drive. I am using the syntax given in the following post:

ExFAT Error *SOLVED*

The command was run from a root console. the exact output is:

FUSE exfat 1.2.8
ERROR: exFAT file system is not found.

I am at a loss as to where to go from here. Any input or suggestions would be greatly appreciated!!

Thanks in advance,
Joecephus


User avatar

Ed_P

Contributor
Contributor
Posts: 7441
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.0 ISO
Location: Western NY, USA

Re: Exfat not working after installing Fuse and Utils

Post#2

by Ed_P » 15 Feb 2019, 22:07

What happens if you just use: mount /dev/sdc1

Ed


Joecephus

White ninja
White ninja
Posts: 4
Joined: 15 Feb 2019, 19:05
Distribution: Porteus 4.0 Xfce

Re: Exfat not working after installing Fuse and Utils

Post#3

by Joecephus » 16 Feb 2019, 15:12

Thanks for the reply. I ran the mount command and got the following output:

NTFS signature is missing.
Failed to mount ‘/dev/sdc1’: Invalid argument
The device ‘/dev/sdc1’ doesn’t seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

I also tried ¨mount /dev/sdc /mnt/exfat¨ and received the same.

Any other ideas? I the only one I have is to not use exfat. :)

Joecephus


Joecephus

White ninja
White ninja
Posts: 4
Joined: 15 Feb 2019, 19:05
Distribution: Porteus 4.0 Xfce

Re: Exfat not working after installing Fuse and Utils

Post#4

by Joecephus » 16 Feb 2019, 16:04

Here is more info. If I change the link to the mount command to point at mount.exfat, I can mount the drive. So I guess the question now becomes how to make the original mount command recognize exfat is a valid option and to use mount.exfat.

Thanks in advance,

Joe


User avatar

Ed_P

Contributor
Contributor
Posts: 7441
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.0 ISO
Location: Western NY, USA

Re: Exfat not working after installing Fuse and Utils

Post#5

by Ed_P » 16 Feb 2019, 16:20

I’m happy to hear that you can mount the drive but I’m confused. «how to make the original mount command» What mount command? The one in your file manager?

-edit-

While I never recommend NTFS for flash drives it could solve this problem.

Ed


Joecephus

White ninja
White ninja
Posts: 4
Joined: 15 Feb 2019, 19:05
Distribution: Porteus 4.0 Xfce

Re: Exfat not working after installing Fuse and Utils

Post#6

by Joecephus » 16 Feb 2019, 19:08

The mount command out of the box is symbolically linked from /sbin to /usr/sbin if my memory serves (not on Porteus at the moment to verify). It would be great if the mount command in /usr/sbin could mount exfat drives so I dont have to break the original link. Anyone know where the list of available filesystem formats are kept. Maybe it can be added there?


User avatar

Ed_P

Contributor
Contributor
Posts: 7441
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.0 ISO
Location: Western NY, USA

Re: Exfat not working after installing Fuse and Utils

Post#7

by Ed_P » 16 Feb 2019, 20:12

From /sbin to /bin from what I see. And from reviewing

the web

once the Fuse & Utils are installed the exFAT drive will be mounted automatically when connected. Which apparently isn’t working for you. hmmm The manual mount command shown on «the web» is different that the one shown in the link you referred to, maybe that will help. Else you will need to wait for someone with more knowledge than I have. Sorry.

Ed


User avatar

fanthom

Moderator Team
Moderator Team
Posts: 5544
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Exfat not working after installing Fuse and Utils

Post#8

by fanthom » 17 Feb 2019, 08:26

«So I guess the question now becomes how to make the original mount command recognize exfat is a valid option and to use mount.exfat.»
Try adding it to /etc/filesystems.

Please add [Solved] to your thread title if the solution was found.


Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

bkorb

<RESOLVED>: I cannot use exfat-fuse for vfat file systems

I just went through a gazillion updates because I was out of town for 10 weeks. It first disabled my shares, but I could fix that. It seems exfat has been disabled, too:

Code: Select all

$ sudo apt-get install exfat-fuse
Reading package lists... Done
Building dependency tree       
Reading state information... Done
exfat-fuse is already the newest version (1.2.3-1).
The following packages were automatically installed and are no longer required:
  libllvm4.0 libllvm4.0:i386
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo mount /mnt/exfat/
FUSE exfat 1.2.3
ERROR: exFAT file system is not found.

Obviously, /mnt/exfat is in my fstab and gparted sees the device just fine

the dmesg complaints are:

Code: Select all

[  129.091938] usb 8-1.2: new high-speed USB device number 6 using xhci_hcd
[  129.234961] usb 8-1.2: New USB device found, idVendor=0bda, idProduct=0150
[  129.234965] usb 8-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  129.234968] usb 8-1.2: Product: USB2.0-CRW
[  129.234970] usb 8-1.2: Manufacturer: Realtek
[  129.234972] usb 8-1.2: SerialNumber: 00000001
[  129.237108] usb-storage 8-1.2:1.0: USB Mass Storage device detected
[  129.237383] scsi host6: usb-storage 8-1.2:1.0
[  130.269204] scsi 6:0:0:0: Direct-Access     Generic  USB2.0-CRW-Combo 1.00 PQ: 0 ANSI: 4
[  130.270111] sd 6:0:0:0: Attached scsi generic sg4 type 0
[  131.233248] sd 6:0:0:0: [sdd] 250085376 512-byte logical blocks: (128 GB/119 GiB)
[  131.233616] sd 6:0:0:0: [sdd] Write Protect is off
[  131.233619] sd 6:0:0:0: [sdd] Mode Sense: 2f 00 00 00
[  131.234006] sd 6:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  131.236712]  sdd: sdd1
[  131.238586] sd 6:0:0:0: [sdd] Attached SCSI removable disk

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

bkorb

Re: I cannot use exfat-fuse anymore

Post

by bkorb » Fri Jan 05, 2018 6:40 pm

OK, I’m now even more puzzled. Since I knew that vfat file systems were limited to 32GB, I didn’t think to try it for a 120GB file system. I «knew» I had to use the exFAT file system. So when the error message reads, «ERROR: exFAT file system is not found.» it is really saying that the exFAT file system isn’t there. It was «vfat». Very different. I believe it would be more convenient if we had a any-sort-of-fat file system mounter instead. *sigh*.

Also, I need to figure out how to mark this as «resolved».

Mute Ant

Re: I cannot use exfat-fuse anymore

Post

by Mute Ant » Fri Jan 05, 2018 9:19 pm

After a ‘significant’ OS update your kernel can be out-of-sync with the support files. I have had ‘ext4 not found’ and the OS is running on ext4. That is easily cured by rebooting.

FAT32 is not limited to 32GiB, that’s an arbitrary maximum suggested-and-imposed by Microsoft tools…
o FAT32 maximum file size: 4GiB
o FAT32 maximum file-system size: 2TiB (calculated as 2^32 sectors of 512 bytes each)

  • Base System

  • Storage

  • Thread starter

    papelboyl1

  • Start date

    Mar 3, 2012

  • #1

I have successfully installed

sysutils/fusefs-exfat

.

I tried the following:

  1. Removed my disk from its external case and connected it to a SATA port on the motherboard. It came up as /dev/ada5 and when I ran # mount.exfat-fuse /dev/ada5 /mnt/backup I got an error «exfat file system is not found».
  2. Put back the disk to its case and connected it to my FreeBSD box via USB. It showed up as /dev/umass0. I tried mounting it again and I got the error that says it’s unmountable in read/write or read-only mode.

I connected the drive to my Windows7 gaming desktop and verified it is using exFAT.

Does anyone have any ideas on how to fix it? Searching the net wasn’t really helpful.

Thank you. :)

  • #2

Unless the disk is formatted without any kind of partitioning (rare), then you’re doing it wrong. :)

You don’t mount the disk (

/dev/ada5

), you mount the partition on it.

Check the output of the following command to see what partitions are on the disk:
# ls /dev/ada5*

You’ll probably see something like

/dev/ada5s1

. Mount that.

  • Thread Starter

  • #3

I will definitely try your suggestion. thank you. :)

  • Thread Starter

  • #4

I tried mounting the disk (took it out of the case) via mount.exfat-fuse /dev/ada5s1 /mnt/backup and got this message

Code:

failed to open fuse device

I’m trying not as a USB storage.

  • Thread Starter

  • #5

I tried mounting the USB drive (

/dev/da0s1

was the device this time) and same message as above.

  • #6

Have you enabled

fusefs

and loaded the

fuse

kernel module? If not set

in

/etc/rc.conf

,

in

/boot/loader.conf

and reboot.

  • Thread Starter

  • #7

T-Daemon said:

Have you enabled

fusefs

and loaded the

fuse

kernel module? If not set

in

/etc/rc.conf

,

in

/boot/loader.conf

and reboot.

I didn’t know I had to put those entries. :D

Thank you all.

  • #8

A word of warning — my machine (9.3-RELEASE) just kernel panicked while trying to unmount a drive mounted with

mount.exfat-fusefs

and

fusefs-kmod

. Not a good thing on a production file server. Just posting this here since this thread was one of the top Google results when researching this.

  • Base System

  • Storage

  • This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.

protectivedad

ERROR: exFAT file system is not found.

I compiled fuse-exfat and exfat-utils 1.3.0 for a ARM router. Mounting or using any exfat-utils on a known working exfat system by either image file, flash drive or harddrive gives:
ERROR: exFAT file system is not found.

This interesting thing is if I take an NTFS drive and use the exfat-utils mkexfatfs it creates an exfat file system that can be read by my windows machine, but on the router it gives the error:
ERROR: exFAT file system is not found.

So, mkexfatfs seems to work, but exfat programs that tries to read the file/or image fail. I created a 1G image file using:

/ # dd bs=1M count=1024 if=/dev/null of=exfat.img
/ # /data/bin/mkexfatfs /mnt/disk1_2/exfat.img
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
/ # mount.exfat -d /mnt/disk1_2/exfat.img /mnt/disk2_1/
FUSE exfat 1.3.0
ERROR: exFAT file system is not found.
/ # hexdump -n 100 /mnt/disk1_2/exfat.img
0000000 76eb 4590 4658 5441 2020 0020 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000040 0000 0000 0000 0000 0000 0020 0000 0000
0000050 0080 0000 0100 0000 0180 0000 7ffa 0000
0000060 0004 0000
0000064
 ```

The -d debug flag doesn't seem to do anything or at least there is no change in the output when I use it.

relan

What libc does this router use?

Could you strace the mount command?

protectivedad

There’s no strace or any tracing on the box. It is using uClibc. I can see about compiling something to trace it, if you can point me to the source download. Thanks.

relan

protectivedad

relan

lseek(3, 20140648, SEEK_SET)            = 20140648
read(3, ""..., 512) = 512

This lseek looks weird. Could you give me a link to the source code of uClibc version used in your router? uClibc is LGPL, so the vendor should provide sources.

How did you compile fuse-exfat? Did you use autotools or some other build system? Looks like there’s a problem with LFS (large file support) because lseek is called instead of lseek64.

protectivedad

protectivedad

I’m not sure if this helps, but I also recompile the latest ntfs-3g drivers to use the external libfuse. Here is a strace of the command:
ntfs-3g /dev/sda2 /mnt/disk1_2 -o use_ino,direct_io,big_writes
strace.ntfs-3g.log

relan

The abovementioned repo does not include libc source code.

I’ve checked upstream uClibc sources and to me it looks like a misconfiguration: fuse-exfat uses pread/pwrite and both uClibc and Linux kernel should support them, but for some reason uClibc on your router erroneously translates those calls to lseek+read/write (should be pread64/pwrite64 instead).

protectivedad

You are right. By substituting lseek64, pread64, and pwrite64 in io.c the tools work. When I get a chance I will look further into why ntfs-3g is able to handle this without a problem, but your fuse-exfat has issues. Or do you know why?

relan

I can only guess that some defines are missing in the Makefile.

protectivedad

The configure for ntfs-3g defines _GNU_SOURCE which eventually defines, in the toolchain headers features.h, __USE_UNIX98 which creates:

#define pread pread64
#define pwrite pwrite64

etc. I’m not sure if this is something that you want to include or not, but that is the solution. Another way to do the same thing which is done in the mtd-utils is:

#define _XOPEN_SOURCE 500 /* For pread/pwrite */

You can correct me if I’m wrong, but from my reading of man pages I think the _XOPEN_SOURCE is supposed to be defined in order to use the pread/pwrite functions.

PhilT001

Hi, I am having the same issue while trying to mount a fuse-exfat formatted microsd card (created on the target machine)

The card mounts fine and is writable on other devices (both Linux and android arm devices)

I compiled fuse-exfat 1.3.0 on a Nokia N810 internet tablet (arm device) with autotools.

libc version:

(Nokia-N810-43-7) ~ $ ldd —version
ldd (GNU libc) 2.5
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Source: http://repository.maemo.org/pool/diablo/free/g/glibc/glibc_2.5.0-1osso10.tar.gz

strace log:

https://termbin.com/oby1

relan

Looks like _llseek is broken:

_llseek(3, 0, [15929966592], SEEK_END) = 0
_llseek(3, 0, [0], SEEK_SET) = 0
pread(3, ""..., 512, 766222165606400) = 512
write(2, "ERROR: "..., 7ERROR: ) = 7
write(2, "exFAT file system is not found"..., 30exFAT file system is not found) = 30

What version of autotools did you use and what version of kernel does your tablet run?

PhilT001

autoconf (GNU Autoconf) 2.69
automake (GNU automake) 1.15
libtool (GNU libtool) 2.4.6

Kernel is 2.6.21-omap1

relan

@PhilT001, could you try the following patch?

diff --git a/libexfat/io.c b/libexfat/io.c
index bc92c7c..81ef727 100644
--- a/libexfat/io.c
+++ b/libexfat/io.c
@@ -226,9 +226,24 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode)
 					"you can fix this with fdisk(8)");
 	}
 	else
+#elif defined(__linux__)
+	if (!S_ISREG(stbuf.st_mode))
+	{
+		uint64_t size;
+
+		if (ioctl(dev->fd, BLKGETSIZE64, &size) == -1)
+		{
+			close(dev->fd);
+			free(dev);
+			exfat_error("failed to get block device size");
+			return NULL;
+		}
+		dev->size = size;
+	}
+	else
 #endif
 	{
-		/* works for Linux, FreeBSD, Solaris */
+		/* works for FreeBSD, Solaris */
 		dev->size = exfat_seek(dev, 0, SEEK_END);
 		if (dev->size <= 0)
 		{

PhilT001

Thanks for your help so far.

Can you advise me as to how to apply this patch? I have limited experience applying patch files and I just getting errors with this.

relan

PhilT001

relan

Could you share libexfat/config.h? Looks like something’s wrong with Large File Support (pread is used instead of pread64).

PhilT001

Vincenzo Li Vigni

unread,

May 16, 2012, 8:06:06 PM5/16/12

to ex…@googlegroups.com

Hi all,

I have compiled the svn version of fuse-exfat on a PowerPC G4 with Mac OS 10.5 (Leopard). The only fix I used was to change this line on SConstruct:

#env = Environment(**ARGUMENTS)

env = Environment(CPPPATH = [‘include’,’/usr/local/include/osxfuse/’])

I can mount properly a disk formatted as exfat on Mac OS Lion but I can’t mount another one I created on Windows 7. Both partitions are recognized as exfat by Windows 7, where I can see all the files without problems.

Now some terminal grabs:

1) mount attempt on the «problematic» disk: 

$ sudo mount.exfat /dev/disk2s3 /Volumes/Sam_exFAT/

FUSE exfat 0.9.7

ERROR: exFAT file system is not found.

2) fdisk on the «problematic» disk 

$ fdisk /dev/disk2

Disk: /dev/disk2 geometry: 19456/255/63 [312571224 sectors]

Sector size: 1024 bytes

Signature: 0xAA55

         Starting       Ending

 #: id  cyl  hd sec —  cyl  hd sec [     start —       size]

————————————————————————

 1: EE 1023 254  63 — 1023 254  63 [         1 —     204819] <Unknown ID>

 2: AF 1023 254  63 — 1023 254  63 [    204820 —   57671680] HFS         

 3: 07 1023 254  63 — 1023 254  63 [  57876500 —  254684140] HPFS/QNX/AUX

 4: 00    0   0   0 —    0   0   0 [         0 —          0] unused   

3) mount on the «working» drive:

$ sudo mount.exfat /dev/disk3s2 /Volumes/WD_exFAT/

FUSE exfat 0.9.7

4) ls on the mounted «working» drive

ls -l /Volumes/WD_exFAT/SCAN0001.PDF 

-rwxr-xr-x  1 root  wheel  581814 Apr 24 12:05 /Volumes/WD_exFAT/SCAN0001.PDF

5) fdisk on the «working» drive:

$ fdisk /dev/disk3Disk: /dev/disk3 geometry: 121597/255/63 [1953458176 sectors]

Signature: 0xAA55

         Starting       Ending

 #: id  cyl  hd sec —  cyl  hd sec [     start —       size]

————————————————————————

 1: AF 1023 254  63 — 1023 254  63 [         2 —  976991232] HFS+        

 2: 07 1023 254  63 — 1023 254  63 [ 976991235 —  976466941] HPFS/QNX/AUX

 3: 00    0   0   0 —    0   0   0 [         0 —          0] unused      

 4: 00    0   0   0 —    0   0   0 [         0 —          0] unused    

Andrew Nayenko

unread,

May 16, 2012, 9:57:46 PM5/16/12

to ex…@googlegroups.com, vincenz…@gmail.com

Hi Vincenzo,

The «problematic» disk looks very interesting: fdisk says it uses 1KB

sectors. This can be the reason of fuse-exfat failure. What kind of

device is it (vendor, model)?

Unfortunately I cannot say anything without having the raw data. If you

don’t mind wiping out the «problematic» volume:

1) erase the volume with

sudo dd if=/dev/zero of=/dev/disk2s3 bs=1m

2) format it to exFAT in Windows

3) make sure that fuse-exfat fails to mount it

4) create a compressed dump with

sudo gzip -c /dev/disk2s3 > disk2s3.dump.gz

5) send me the dump (it should be rather small).

Having a complete dump of an FS would help a lot because I’ll be able to

do any testing myself.

If you cannot erase the volume, just send me the compressed dump of it’s

first megabyte:

sudo dd if=/dev/disk2s3 of=disk2s3.dump1mb bs=1m count=1

gzip disk2s3.dump1mb



Andrew Nayenko <res…@gmail.com>

volt…@voltagex.org

unread,

Dec 29, 2012, 6:31:20 AM12/29/12

to ex…@googlegroups.com, vincenz…@gmail.com

Hi Andrew and Vincenzo.

I am having the same problem — «exFAT file system is not found»

The partition table looks like:

Disk /dev/sdc: 63.9 GB, 63864569856 bytes
255 heads, 63 sectors/track, 7764 cylinders, total 124735488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1           32768   124735487    62351360    7  HPFS/NTFS/exFAT

This SDXC card was formatted with a Galaxy S3 that is currently broken, and I’d like to get the files off for now.

I’m dumping the filesystem now but as it’s 64GB it’s going to take some time

volt…@voltagex.org

unread,

Dec 29, 2012, 6:37:41 AM12/29/12

to ex…@googlegroups.com, volt…@voltagex.org

I tried to attach a 1mb section from the start of the partition, but Google wouldn’t let me post it. It’s at http://ge.tt/3gSy9OU/v/0

Andrew Nayenko

unread,

Dec 29, 2012, 11:45:54 AM12/29/12

to ex…@googlegroups.com, volt…@voltagex.org

Hi,

The superblock is corrupted, including signature bytes (that’s why

fuse-exfat says there is no exFAT). Try to restore it from the copy (in

exFAT 12th sector contains a backup copy of the 1st):

dd if=sdc1.onemb of=sdc1.onemb bs=512 count=1 conv=notrunc skip=12

> I tried to attach a 1mb section from the start of the partition, but Google

> wouldn’t let me post it. It’s at http://ge.tt/3gSy9OU/v/0



Andrew Nayenko <res…@gmail.com>

Adam Baxter

unread,

Dec 29, 2012, 11:47:54 AM12/29/12

to Andrew Nayenko, ex…@googlegroups.com

will exfat be able to mount the 1mb file so I can try this on the smaller file first?

Andrew Nayenko

unread,

Dec 29, 2012, 11:52:40 AM12/29/12

to Adam Baxter, ex…@googlegroups.com

> will exfat be able to mount the 1mb file so I can try this on the smaller

> file first?

No, try 100MB at least. Also use «-o ro» to make fuse-exfat work with

the image in read-only mode so that it does not make things worse if

something goes wrong.

> On 29 December 2012 18:45, Andrew Nayenko <res…@gmail.com> wrote:

>

>> Hi,

>>

>> The superblock is corrupted, including signature bytes (that’s why

>> fuse-exfat says there is no exFAT). Try to restore it from the copy (in

>> exFAT 12th sector contains a backup copy of the 1st):

>>

>> dd if=sdc1.onemb of=sdc1.onemb bs=512 count=1 conv=notrunc skip=12

>>

>>

>> I tried to attach a 1mb section from the start of the partition, but

>>> Google

>>> wouldn’t let me post it. It’s at http://ge.tt/3gSy9OU/v/0

>>>

>>

>> —

>> Andrew Nayenko <res…@gmail.com>

>>

>



Andrew Nayenko <res…@gmail.com>

Adam Baxter

unread,

Dec 29, 2012, 1:00:30 PM12/29/12

to Andrew Nayenko, ex…@googlegroups.com

FUSE exfat 0.9.7
fuse: mount failed: Block device required

Andrew Nayenko

unread,

Dec 29, 2012, 1:18:24 PM12/29/12

to Adam Baxter, ex…@googlegroups.com

sudo mount -o loop -t exfat your_image_file /mnt/your_mount_point



Andrew Nayenko <res…@gmail.com>

Adam Baxter

unread,

Dec 29, 2012, 1:20:01 PM12/29/12

to Andrew Nayenko, ex…@googlegroups.com

That completes, printing out the exfat version number, but when I try to ls, I get

ls: cannot open directory .: Transport endpoint is not connected

Adam Baxter

unread,

Dec 29, 2012, 1:24:05 PM12/29/12

to Andrew Nayenko, ex…@googlegroups.com

Oops, replying on-list this time.

Latest from SVN gives slightly more information —
root@osiris:/media/voltagex/

Data# sudo mount -o loop -t exfat exfat.img ../testone/
FUSE exfat 0.9.8
WARN: volume was not unmounted cleanly.
root@osiris:/media/voltagex/Data# cd ../testone
root@osiris:/media/voltagex/testone# ls

Andrew Nayenko

unread,

Dec 29, 2012, 1:54:33 PM12/29/12

to Adam Baxter, ex…@googlegroups.com

Was exfat.img incomplete dump of the FS? If so, it’s OK: superblock checks passed. Try to repair and mount the complete dump. Again, I’d recommend to use «-o ro».

volt…@voltagex.org

unread,

Dec 31, 2012, 8:50:43 AM12/31/12

to ex…@googlegroups.com

No good, even with a complete copy of the drive.

volt…@voltagex.org

unread,

Dec 31, 2012, 9:10:25 AM12/31/12

to ex…@googlegroups.com

It lives!

After fiddling with buffered writes for a minute the card is now reading fine.

Can I donate to your project or to a charity of your choice?

Thanks
Adam

Andrew Nayenko

unread,

Jan 6, 2013, 11:04:41 PM1/6/13

to ex…@googlegroups.com, volt…@voltagex.org

> It lives!

>

> After fiddling with buffered writes for a minute the card is now reading

> fine.

Fine!

> Can I donate to your project or to a charity of your choice?

Please donate to FSF (https://my.fsf.org/donate). Thanks!



Andrew Nayenko <res…@gmail.com>

ialex…@gmail.com

unread,

Feb 5, 2013, 1:32:44 PM2/5/13

to ex…@googlegroups.com, vincenz…@gmail.com

Hi everyone,

I’m having some issues with being unable to mount an exFAT filesystem and I keep getting the same error described above.  («ERROR: exFAT file system is not found.»)

My system is Ubuntu 12.10 and exfat FUSE 1.0.1

I have a Seagate portable hard drive that was dropped and stopped working.  I believe the partition table on the disk was intact, and my issues come from somewhere within the exFAT partition.

After a long time spent with GNU ddrescue running on it, I’ve recovered all but 5MB of the data on that drive.  I called the image file that process produced ddrescue1.copy.img

I believe this file, the ddrescue log, specifies where those 5MB worth of holes in my image are.  http://ge.tt/4VwGgVX/v/0?c)

This command should mount the image:
    sudo mount -t exfat -o loop,ro,noexec ~/emergencymove/ddrescue1.copy.img /media/mtpt1
But all it returned is:
    FUSE exfat 1.0.0

    ERROR: exFAT file system is not found.

But wait — I literally just ran that same command again right now and got this:
    FUSE exfat 1.0.1
    ERROR: invalid VBR checksum 0xeed9cbd (expected 0x9a40a92a).

So now I just ran this command:
    sudo dd if=ddrescue1.copy.img of=ddrescue1.copy.img.onemb bs=1M count=1
And here’s the output:
    http://ge.tt/2XQGiVX/v/0?c

Would you mind taking a look and telling me what you think?  Thanks for this amazing (and amazingly useful) tool!
Alex

Andrew Nayenko

unread,

Feb 5, 2013, 8:11:15 PM2/5/13

to ex…@googlegroups.com, ialex…@gmail.com, vincenz…@gmail.com

Hi Alex,

Try the attached patch. It makes «invalid VBR checksum» error non-fatal.

If you are lucky enough your image will be mounted.



Andrew Nayenko <res…@gmail.com>

nonfatal-invalid-vbr.patch

ialex…@gmail.com

unread,

Feb 5, 2013, 10:21:25 PM2/5/13

to ex…@googlegroups.com, ialex…@gmail.com, vincenz…@gmail.com

Wow — thank you so much! I have to admit that I don’t know quite what to do with the patch file…

Some reading tells me I have to run patch -p0 < nonfatal…..

But that seems to require I know where libexfat is.  Is there a standard place to find that?

Here’s hoping this works!

Alex

Andrew Nayenko

unread,

Feb 5, 2013, 10:55:49 PM2/5/13

to ex…@googlegroups.com, ialex…@gmail.com, vincenz…@gmail.com

ialex…@gmail.com

unread,

Feb 5, 2013, 11:16:12 PM2/5/13

to ex…@googlegroups.com, ialex…@gmail.com, vincenz…@gmail.com

Thank you very much for the detailed tutorial, sorry for my ignorance.  The patch seemed to work, and exited successfully.

Unfortunately, though, the image still didn’t mount.  When I ran the same command as always:

sudo mount -t exfat -o loop,ro,noexec ~/emergencymove/ddrescue1.copy.img /media/mtpt1

I got this:

ERROR: invalid VBR checksum 0xeed9cbd (expected 0x9a40a92a).

ERROR: upcase table is not found.

Thank you so much for making this amazing tool, and for your unbelievably fast response time and helpful attitude! I really hope this works…

Alex

Andrew Nayenko

unread,

Feb 6, 2013, 12:01:19 AM2/6/13

to ex…@googlegroups.com, ialex…@gmail.com, vincenz…@gmail.com

Bad news. Root directory is all zeros.

I had a look at your dump using hexdump. Most of it is filled with a

strange counter, like this:

004ad8c0 000eb631 000eb632 000eb633 000eb634 |1…2…3…4…|

004ad8d0 000eb635 000eb636 000eb637 000eb638 |5…6…7…8…|

004ad8e0 000eb639 000eb63a 000eb63b 000eb63c |9…:…;…<…|

004ad8f0 000eb63d 000eb63e 000eb63f 000eb640 |=…>…?…@…|

004ad900 000eb641 000eb642 000eb643 000eb644 |A…B…C…D…|

004ad910 000eb645 000eb646 000eb647 000eb648 |E…F…G…H…|

004ad920 000eb649 000eb64a 000eb64b 000eb64c |I…J…K…L…|

004ad930 000eb64d 000eb64e 000eb64f 000eb650 |M…N…O…P…|

004ad940 000eb651 000eb652 000eb653 000eb654 |Q…R…S…T…|

004ad950 000eb655 000eb656 000eb657 000eb658 |U…V…W…X…|

Looks like your disk reads nonsense.

ialex…@gmail.com

unread,

Feb 6, 2013, 1:19:34 AM2/6/13

to ex…@googlegroups.com

Bummer! But I’m glad to know that I can stop barking up this particular tree. One last quick question before I quit bothering you — would it be valuable to either go after it with PhotoRec or with professional data recovery software or with a professional data recovery service?

Thanks!
Alex

Andrew Nayenko

unread,

Feb 6, 2013, 11:31:29 AM2/6/13

to ex…@googlegroups.com, ialex…@gmail.com

> Bummer! But I’m glad to know that I can stop barking up this particular tree. One last quick question before I quit bothering you — would it be valuable to either go after it with PhotoRec or with professional data recovery software or with a professional data recovery service?

I don’t know, I have no experience in data recovering. I prefer regular backups.

> Thanks!

> Alex

>

> —

> You received this message because you are subscribed to the Google Groups «exFAT» group.

> To unsubscribe from this group and stop receiving emails from it, send an email to exfat+un…@googlegroups.com.

> For more options, visit https://groups.google.com/groups/opt_out.

Это история со счастливым концом о поломке карты памяти. Она адресована обладателям SDXC-карточек объёмом от 64 ГБ и больше, у которых в один прекрасный день камера (в случае автора — GoPro) сообщает «SD ERR» и отказывается работать. Поломка карты могла быть вызвана попыткой её установки в планшет, который рассчитан на карты 32 ГБ максимум, или неосторожным извлечением из компьютера, или сбоем самой камеры, неважно. Так или иначе, карта неработоспособна, а на ней остались ценные данные, поэтому просто взять и переформатировать её нельзя.

Вставляем карту в компьютер с линуксом. Ничего не происходит. Пробуем примонтировать карту вручную, зная, что в картах большого объёма используется файловая система exFAT:

$ sudo mount /dev/sdf1 /mnt/disk -t exfat
FUSE exfat 1.0.1
ERROR: exFAT file system is not found.

Ошибка подтверждает факт поломки карты. Чтобы не усугубить ситуацию, снимаем с карты образ, заодно проверяя на физические дефекты, с помощью GNU ddrescue:

$ sudo ddrescue -d /dev/sdf1 sdcard.img

Если по окончании работы ddrescue выводится нулевой счётчик ошибок (errors: 0), значит, карта не повреждена физически, и невозможность её чтения связана с нарушением целостности данных.

Дальнейшие действия рекомендуется производить со снятым образом, а не с картой. Для восстановления таблицы разделов существует утилита TestDisk. Запускаем:

$ testdisk sdcard.img

Нажимаем два раза на Enter и попадаем в следующее меню:

Выбор установлен в None — это ни о чём особенно не говорит. После нажатия Enter видим следующее меню:

Заходим в подменю Advanced (ещё один Enter):

Несмотря на сбитую таблицу разделов, содержимое карты всё же опознано: это один раздел с файловой системой exFAT. Достаточно восстановить таблицу разделов, и карта (т.е. образ) снова заработает. Существует резервная копия таблицы разделов, которая особым образом хранится в существующем найденном разделе. Команда для восстановления таблицы разделов из резервной копии находится в подменю Boot (нажимаем Enter):

Информация на экране гласит, что загрузочный сектор (с таблицей разделов) поломан, но резервная копия в норме. Выбираем команду Backup BS, нажимаем Enter, на следующем экране вводим подтверждение (Y), и дело сделано:

Для выхода из TestDisk нужно нажать «q» несколько раз. Образ теперь изменён — на нём восстановлена таблица разделов. В принципе, TestDisk предоставляет возможности для просмотра структуры директорий на разделе и экспорта файлов, включая удалённые. Однако, практика показывает, что экспортированные файлы (даже не удалённые) отличаются от исходных и непригодны к использованию. Видимо, это связано с неприспособленностью TestDisk к большим exFAT-разделам. Утилита PhotoRec для восстановления файлов, родственная TestDisk, обладает аналогичным недостатком. Поэтому, если восстанавливать удалённые файлы не требуется, то TestDisk можно далее не применять, а воспользоваться штатным средством для монтирования exFAT-раздела из образа:

$ sudo mount -o ro,loop sdcard.img /mnt/disk -t exfat

FUSE exfat 1.0.1

$ ls /mnt/disk/

DCIM Edit_And_Play_With_GoPro_Software.url MISC

Файловая система восстановлена (собственно, она и не ломалась). Файлы с примонтированного образа можно скопировать в обычную файловую систему и проверить. Если файлы в порядке, то остаётся пройти тот же путь для восстановления таблицы разделов на исходной карте:

$ sudo testdisk /dev/sdf1

После чего карту можно смело вставлять как в компьютер, так и в GoPro. При отсутствии риска потери данных можно было бы сразу работать с картой, не снимая образ.

Понравилась статья? Поделить с друзьями:
  • Error expected nested name specifier before namespace
  • Error expected linebreaks to be lf but found crlf linebreak style
  • Error expected initializer before void
  • Error expected initializer before using
  • Error expected initializer before token