Thank you for the help. Its amazing that you were able to solve it in such a short time. I am trying to test it with an exfat image formatted using mkfs but its not formatting the blank image. It could be an issue with mkfs itself. I will create an exfat flash drive and test it . Also I noticed you removed alot of headers like kernel_cpp.cpp etc . Will that not affect the build process if not in FS_Shell?
I may have missed that, you can add it of course if it not builds.
Also I was able to format exfat on 128 mb empty image using mkfs.
Just a heads up: in Haiku, you could install exfatprogs, that includes the following tools/commands:
- defrag.exfat
- dump.exfat
- exfat2img
- exfatlabel
- fsck.exfat
- mkfs.exfat
- tune.exfat
I have used that mkfs.exfat to create exfat image files without issue, while testing a different recipe (one that adds a FUSE based exfat module with write support). (that new recipe hasn’t been merged because I only tested it on nightlies, and the package builders still run on beta5).
~/Desktop/haiku/generated.x86_64> jam run ":<build>exfat_shell" exfat.img
Starting build of type regular ...
Asked for bios_ia32 target boot platform
Unknown path to handle adding to image
Asked for pxe_ia32 target boot platform
Unknown path to handle adding to image
...patience...
...found 547 target(s)...
...updating 1 target(s)...
RunCommandLine1 <unique!target>run_0
exfat: Volume::Mount(): Identify() failed
exfat: Failed mounting the volume. Error: Invalid Argument
Error: Mounting FS failed: Invalid Argument
target=target;
for t in objects/haiku_host/x86_64/release/tests/add-ons/kernel/file_systems/exfat/exfat_shell/exfat_shell ; do
target=${target}X
eval "${target}=${t}"
done
LIBRARY_PATH="$LIBRARY_PATH:/boot/home/Desktop/haiku/generated.x86_64/objects/haiku_host/lib" \
"$targetX" "exfat.img"
...failed RunCommandLine1 <unique!target>run_0 ...
BUILD FAILURE:
...failed updating 1 target(s)...
I’m getting this error when I try to run the shell . I tried formatting images of different sizes using mkfs.exfat but it still won’t run. I believe the exfat file is not properly formatted as I don’t see the proper header label in diskprobe.
Can you share which commands you used to create your exfat image file?
I followed the example for the xfs filesystem and changed it for exfat.
Creating an empty disk : dd if=/dev/zero of=exfat.img count=128 bs=1M
Formatted using : mkfs.exfat exfat.img
I read the documentation for xfs shell again and realized that linux was used to format the disk to xfs. I used linux to format my image into exfat and it worked (It’s weird because mkfs.exfat didn’t create a proper exfat formatted image even though it should have).
Anyway, fs_shell now works fine. I will work on adding the missing headers and also complete the GSoC proposal. I am studying the exfat spec sheet from microsoft and have a grasp as to what I will need to do.
Isn’t mkfs.exfat is how we format in linux??
What’s the difference between both for you?
mkfs.exfat will follow whatever the defaults are for that linux distro and version. If you want a consistent testbed you will probably have to figure out how to tell it explicitly which features to enable, or use another tool where you can do this.
The commands are the same but I assume it depends on the OS as well . For me, in Haiku, the format completes without any errors but checking in diskprobe (and with the fs_shell) , it’s clearly not an exFAT image.
Linux is the same except the image is actually formatted and the EXFAT signature is there.
In the documentation, Linux is used for formatting an image to XFS . This was the clue:
Currently only linux has full XFS support so we will use linux for generating file system images.
Haiku doesn’t have full support for exFAT too so that could be the reason .
The mkfs tools do not use the kernel support. They implement the filesystem code on their own and just write the needed blocks on the disk.
So maybe the version of mkfs.exfat you’re using (I assume it comes from haikuports) is an old version or broken?
Maybe it’s an issue specific to me, but I do have the correct version of exfatprogs.
Someone else will have to try and test it in Haiku to make sure tho. ![]()
Hello,
I have written my GSoC proposal. Please take a look when you can and give me feedback on what I can improve.GSoC Application
Thanks.
I have also submitted a patchset for the working implementation of the exFAT shell so please review that also. I will work on resolving the issues with format.