This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
I ran into a small problem when playing around with UEFI in that a FAT filesystem image is required. This can be problematic on some systems (e.g. Windows) where a loopback device is not possible (yes I know there are other ways with virtual disks etc), and is even a problem on e.g. linux as loopback devices need superuser privileges. So I went looking for a utility to create a FAT image from a directory in the current filesystem (in the same way that mkisofs creates a ISO9660 volume from a directory) but couldn't find one, so wrote this utility instead.
I release it here in the hope it is useful. MIT licensed.
It is based upon fatfs and will build with g++ on a system with the Boost libraries. Usage is simple:
Brynet-Inc wrote:The traditional way to handle DOS/FAT filesystems on Unix is with mtools.
Yes, I used to use mtools, however it has certain limitations for the particular task I was trying to do, namely create a reasonably large (~30 MiB) hard drive image for use with UEFI. Namely, it requires: 1) a way of creating a file of a particular size (e.g. dd), 2) knowing in the first place how big the file needs to be (which has to be hard wired into the build script or calculated with complex shell trickery), 3) need to supply the geometry of any non-standard disk (i.e. anything which isn't a floppy) and 4) the need for 'mtools_skip_check=1' in a ~/.mtoolsrc file on the users system for anything non-standard. As I am trying to have my build script work automatically on most systems (unix + windows), these limitations were becoming a bit of a headache, and so I created this instead.
tl;dr yes, there are other tools which work just as well in many situations. This is provided if anyone needs it.
For such a simple utility, all the dependencies seem to be a bit overkill. No?
C++, fatfs.. and Boost?
The license for the FAT library appears to be permissive, but custom.. and surprisingly difficult to find, being stashed in a DOS formatted 00readme.txt file.
Regardless though, good luck with your project!
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
I have a question about fatfs and I guess you could point me in the right direction.
I have several partitions on a SD card, let's say partition A (e.g. user data) and partition B (e.g. read only data). I am trying to find out if it is possible to replace the partition A with an FatFs image (e.g. created with your tool). My idea is to update the complete user data by providing just one (image) file.