exfat
Created Wednesday 02 November 2011
svn checkout http://exfat.googlecode.com/svn/trunk/ exfat-read-only
ls ChangeLog COPYING dump fsck fuse label libexfat mkfs SConstruct
apt-cache search scons scons - replacement for make
apt-get install scons
thomas@sars-052:\~/source/exfat-read-only\$ scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... gcc -o fuse/main.o -c -Wall -O2 -ggdb -DFUSE_USE_VERSION=26 -D_FILE_OFFSET_BITS=64 -Ilibexfat fuse/main.c fuse/main.c:21:18: fatal error: fuse.h: No such file or directory compilation terminated. scons: *** [fuse/main.o] Error 1 scons: building terminated because of errors.
sudo apt-cache search libfuse libfuse-dev - Filesystem in Userspace (development) libfuse2 - Filesystem in Userspace (library)
apt-get install libfuse-dev
scons
done!
thomas@sars-052:\~/source/exfat-dump\$ gcc libexfat/log.c libexfat/lookup.c libexfat/byteorder.h libexfat/exfat.h libexfat/exfatfs.h libexfat/node.c libexfat/mount.c libexfat/cluster.c libexfat/io.c libexfat/version.h libexfat/utils.c libexfat/utf.c main.c -o dump libexfat/io.c:31:3: error: #error You should define _FILE_OFFSET_BITS=64 thomas@sars-052:\~/source/exfat-dump\$ gcc libexfat/log.c libexfat/lookup.c libexfat/byteorder.h libexfat/exfat.h libexfat/exfatfs.h libexfat/node.c libexfat/mount.c libexfat/cluster.c libexfat/io.c libexfat/version.h libexfat/utils.c libexfat/utf.c main.c -o dump -D_FILE_OFFSET_BITS=64 thomas@sars-052:\~/source/exfat-dump\$ ls dump libexfat main.c thomas@sars-052:\~/source/exfat-dump\$ ./dump dumpexfat 0.9.5 Usage: ./dump [-s] [-u] [-v] \<device> thomas@sars-052:\~/source/exfat-dump\$ ls dump libexfat main.c thomas@sars-052:\~/source/exfat-dump\$ cp libexfat/* \~/work_house/partclone/src/exfat/ thomas@sars-052:\~/source/exfat-dump\$ ls dump libexfat main.c thomas@sars-052:\~/source/exfat-dump\$ dd if=/dev/zero of=exfat.raw bs=1M count=512 512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 9.10158 s, 59.0 MB/s thomas@sars-052:\~/source/exfat-dump\$ sudo losetup /dev/loop0 exfat.raw
sudo ./mkexfatfs /dev/loop0 mkexfatfs 0.9.5 File system version 1.0 Sector size 512 bytes Cluster size 32 KB Volume size 512 MB Used space 224 KB Available space 512 MB Creating... done. Flushing... done. File system created successfully.
sudo ./mount.exfat-fuse /dev/loop0 /mnt/ FUSE exfat 0.9.5 thomas@sars-052:\~/source/exfat-read-only/fuse\$ ls /mnt/ thomas@sars-052:\~/source/exfat-read-only/fuse\$ mount /dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0) ... /dev/loop0 on /mnt type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
copy some data to /mnt/
sudo ./dumpexfat /dev/loop0 -u dumpexfat 0.9.5 Volume label Volume serial number 0x5dc8b4fc FS version 1.0-- Sector size 512-- Cluster size 32768 Sectors count 1048576-- Free sectors 694976-- Clusters count 16380 Free clusters 10859 First sector 0-- FAT first sector 128-- FAT sectors count 128 First cluster sector 256 Root directory cluster 4 Volume state 0x0000-- FATs count 1 Drive number 0x80 Allocated space 0% Used sectors 0-353471-- //really used is 0-(0+128)-(353471+128), shift 128
Comments