WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: filesystem exFAT?  (Read 5039 times)

Offline beta-tester

  • Newbie
  • *
  • Posts: 31
filesystem exFAT?
« on: April 01, 2020, 08:52:29 AM »
hello,

is there a package available to add exFAT support to mount, read and write those filesystems?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: filesystem exFAT?
« Reply #1 on: April 01, 2020, 12:29:54 PM »
Hi beta-tester
I have good news and bad news:
The bad news is there no package available to add exFAT support to mount.
The good news is you just volunteered to build and  beta-test  an exFAT package:
Code: [Select]
mkdir exFAT
cd exFAT
# Download the attached  build_exfat  file into this directory
chmod 775 build_exfat
./build_exfat
cp package/exfat.tcz /etc/sysconfig/tcedir/optional
cp package/exfat.tcz.dep /etc/sysconfig/tcedir/optional
tce-load -i exfat

The extension includes the following files:
Code: [Select]
/usr/local/sbin/dumpexfat
/usr/local/sbin/exfatfsck
/usr/local/sbin/exfatlabel
/usr/local/sbin/fsck.exfat
/usr/local/sbin/mkexfatfs
/usr/local/sbin/mkfs.exfat
/usr/local/sbin/mount.exfat
/usr/local/sbin/mount.exfat-fuse
/usr/local/share/doc/exfat/COPYING
/usr/local/share/man/man8/dumpexfat.8
/usr/local/share/man/man8/exfatfsck.8
/usr/local/share/man/man8/exfatlabel.8
/usr/local/share/man/man8/mkexfatfs.8
/usr/local/share/man/man8/mount.exfat-fuse.8

If you confirm the files function properly, I will formally submit 32 and 64 bit extensions to the repo.

    [EDIT]: Attach build script removed. See reply #6.  Rich
« Last Edit: April 03, 2020, 08:58:28 AM by Rich »

Offline beta-tester

  • Newbie
  • *
  • Posts: 31
Re: filesystem exFAT?
« Reply #2 on: April 01, 2020, 04:37:33 PM »
yes... nice... i will do...
on TC11 x86, i compiled and installed the package and i added an exfat.tcz entry to onboot.lst manually.
1. mkfs.exfat was created. [OK]
2. mount.exfat, mount.exfat-fuse was created. [OK]
3. fsck.exfat was created [OK]
4. exfat is greyed out/not available in gparted. [FAILED]
5. creating exfat filesystem by using mkfs.exfat [OK]
6. mount exfat filesystem by using mount.exfat [OK]
7. mount exfat filesystem by using /etc/fstab [OK]
8. mounting by using mnttool [OK]
9. creating folder and files on exfat [OK]
10. created filesystem was checkt by fsck.exfat without errors [Ok]
11. created exfat filesystem was able to mount, fsck, read, write on an other linux distribution on an other computer without errors [OK]
12. created exfat filesystem was able check, read, write on an other Windows 10 computer without errors [OK]
13. exfat created on Windows 10 was able to fsck, mount, read, write on TC11 x86 + exfat.tcz without errors [OK]
14. exfat created on Windows 10 with max cluster size (32MB/cluster) was able to fsck, mount, read, write on TC11 x86 + exfat.tcz without errors [OK]
15. exfat created on Windows 10 with min cluster size (1KB/cluster) was able to fsck, mount, read, write on TC11 x86 + exfat.tcz without errors [OK]

... very nice... thank you very much Rich.

any idea, why exfat is greyed out in gparted?
« Last Edit: April 01, 2020, 04:47:10 PM by beta-tester »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: filesystem exFAT?
« Reply #3 on: April 01, 2020, 04:59:24 PM »
Hi beta-tester
First of all kudos on your thorough testing and the presentation of the results, well done.

... any idea, why exfat is greyed out in gparted?
Though I don't have any exFAT devices, I did install the extension just to see if  gparted  picked it up but it didn't. I'll see if I can find
how  gparted  determines file system support later on tonight. Even without the extension installed,  gparted  listed  Move and Copy
under  View->File System Support. The  Required Software  field is blank which in itself may be a clue.


Offline beta-tester

  • Newbie
  • *
  • Posts: 31
Re: filesystem exFAT?
« Reply #4 on: April 01, 2020, 05:08:17 PM »
unfortunately gparted is not picking up many other filesystems from the filesystem-5.4.3-tinycore.tcz package as well.
but i installed lvm2.tcz, that was picked up from gparted.
also dosfstools.tcz (fat16/fat32) was picked up from gparted.
without those packages lvm2, fat16 and fat32 was grayed out, after installation those file system types were avalable to select.

PS.: if you don't have an exfat device, now you can create one with your exfat package ...  ;D

PPS.: testing is the minimum i can do to honor your work.
« Last Edit: April 01, 2020, 05:24:20 PM by beta-tester »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: filesystem exFAT?
« Reply #5 on: April 02, 2020, 10:35:28 PM »
Hi beta-tester
I took a brief look at gparted and the exfat source file was virtually empty so there's currently no support.

I submitted exfat as 2 packages,  exfat-util.tcz  and  exfat-fuse.tcz  since other Linuxs break them up that way. I'll post again
once the extensions are accepted.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: filesystem exFAT?
« Reply #6 on: April 03, 2020, 09:27:13 AM »
Hi beta-tester
Both 32 and 64 bit versions of the exFAT extensions are now available in the TC10 and TC11 repositories. The 2 extensions are:

exfat-utils.tcz   Utilities to create, check, label and dump exFAT filesystems.
exfat-fuse.tcz    Read and write exFAT driver for mounting exFAT filesystems.

Please replace the extension you built with the repository versions.

I removed the attached build script from reply #1. A cleaned up build script can be found here:
http://tinycorelinux.net/10.x/x86/tcz/src/exfat/
The script handles CPU detection, fetching the source from git, compiling, and packaging the extensions.

Note: The script loads fuse.tcz and fuse-dev.tcz separately because the dev files are separated in x86_64 but not
      in x86. As a result, you will see a harmless  not found  message when building on x86. This can be ignored.


If any piCore users are interested in this, it looks like the TC9 version of piCore has the required extensions to build and run
these extensions.

Offline beta-tester

  • Newbie
  • *
  • Posts: 31
Re: filesystem exFAT?
« Reply #7 on: April 03, 2020, 02:09:15 PM »
thank you for the packages.

Offline DrGuns

  • Newbie
  • *
  • Posts: 2
Re: filesystem exFAT?
« Reply #8 on: April 23, 2020, 05:18:46 PM »
Not sure If I'm just missing something on the syntax here or if these work differently than other tcz. When I added NTFS support all I had to do was add ntfs-3g.tcz to cde optional and onboot.lst

then mounting was sudo mount -t ntfs-3g /dev/sdx /mnt

tried adding the exfat-utils and exfat-fuse the same way and I can't find a -t file system option for mount that functions on tiny core 11.

tried mount -t exfat, exfat-utils, and exfat-fuse.  Any help on what I'm missing would be appreciated. This is just to be a live cd for dd/ddrescue and a few other tools eventually.

Not a particularly advanced linux user here, just a guy trying to clone some drives.


P.S.  Found the syntax in the tar file you posted and tried that as well mount.exfat-fuse. Results in an error "error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory".
Not sure where to go on resolving that one since I don't see anything like that in the tcz list.
« Last Edit: April 23, 2020, 05:37:02 PM by DrGuns »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: filesystem exFAT?
« Reply #9 on: April 23, 2020, 08:24:48 PM »
Hi DrGuns
Welcome to the forum.

... P.S.  Found the syntax in the tar file you posted and tried that as well mount.exfat-fuse. Results in an error "error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory". ...
When you retrieved  exfat-fuse.tcz  you neglected to get  exfat-fuse.tcz.dep  which lists the extensions  exfat-fuse.tcz  depends
directly on. In this case, that would be  fuse.tcz.

Offline DrGuns

  • Newbie
  • *
  • Posts: 2
Re: filesystem exFAT?
« Reply #10 on: April 23, 2020, 09:09:51 PM »
When you retrieved  exfat-fuse.tcz  you neglected to get  exfat-fuse.tcz.dep  which lists the extensions  exfat-fuse.tcz  depends
directly on. In this case, that would be  fuse.tcz.


Thanks for the welcome and the info. I guess that means I'm accessing the files the wrong way. I'm looking at http://tinycorelinux.net/11.x/x86/tcz/  which gives me a list of tcz's, but doesn't show me the dependencies. Where should I be going to get the full set of info for the packages?

Just as a side note. I'm impressed with how tiny the install of this OS is. I sure wish I could find such a small OS to install on my Amazon Fire Tablet. The custom ROM i put on there, Lineage OS, is still eating close to 500 of the 880 available RAM, it's better than Fire OS, but after seeing this, it makes me wonder how small a clean tablet OS could be.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: filesystem exFAT?
« Reply #11 on: April 23, 2020, 09:23:05 PM »
Hi DrGuns
Dependencies normally get resolved by using the  apps  utility or  tce-load.  If you are going to fetch an extension manually, then
fetch the  Extension.tcz.tree  file too. The  .tree  file contains all the direct and indirect dependencies you need to fetch. You'll also
need the  .tcz..dep  files for any extension that has one.

You might also want to take an hour to read:
http://tinycorelinux.net/corebook.pdf

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: filesystem exFAT?
« Reply #12 on: July 20, 2020, 07:28:46 PM »
Rich - hey thanks for fuse and exFAT.  Just checked 'em out and they work fine.

Using 11.1 pure64 in cli only mode, and checked that busybox mkfs picked up on that

Code: [Select]
mkfs <tab> <tab>
Now exfat shows up as supported.  Right on.

Already had a fat32 usb stick sitting around so I used fdisk to change the partition type to #7 as a test (HPFS/NTFS)  see note!

Then used this for my sdc stick

Code: [Select]
sudo mkfs.exfat -n "EXFATEST" /dev/sdc1
Worked fine, but I was kind of worried about exFAT not showing up anywhere in the fdisk partition types.  Out of total paranoia, when I do stuff like this, I reboot to make sure all changes are picked up correctly.

I did a quickie research and saw the answer:

https://appuals.com/how-to-format-a-drive-as-exfat-on-linux/

So choice #7 (HPFS/NTFS) was the right choice, even though the missing exFAT should be appended to that choice.  Must be a busybox thing.

Rebooted, all is well, and even took it to a Windows box to show the properties, and it identifies as exFAT.

Well done.  Thanks for making those two tcz's to enable exFAT.  I just have to remember not to freak out looking for a missing partition type in busybox fdisk - it's #7 which works for exFAT.


That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: filesystem exFAT?
« Reply #13 on: July 20, 2020, 08:48:37 PM »
Hey, it is faster than fat32!  At least to me on small files typically used with TC.

Yeah yeah, go ahead and read 14 years of blog posts pro/con.

Or better yet, if you've been running TC with data on fat32 partitions, give exFAT a try just as a test and see what you think.

So sure, I normally reformat to ext2 / 3, sometimes 4, but this was an interesting test for interoperability with my other gear - most of which is newer than 16 years ago when exFAT came out. :)

Wow - I think I'm saying bye bye to fat32 and vfat now.  I like this on my interop usb-sticks.



That's a UNIX book! - cool  -- Garth