freedos-user  

Re: [Freedos-user] very small FAT12 partition?

Steffen Grunewald
Mon, 25 Jan 2010 02:16:43 -0800

On Sun, Jan 24, 2010 at 02:48:13PM +0100, Stefan Xenon wrote:
> Hi!
> My question is not exactly FreeDos related but I hope that you could
> help me anyway:
> 
> For an embedded project I need to create a very small FAT12 partition.
> In a proprietary project I found a partition of 4KB size (which I can
> not reuse because of license issues) but could not manage to recreate a
> similar one. Therefore on Linux I tried "mkdosfs -f 1 -F 12 -h 0 -S 512
> -C partition.iso 4" but it fails with the error message that this
> partition is too small. The smallest I could build this way was 34KB in
> size.

This may be a bit tricky, and require the use of non-standard tools, but
in theory it should be possible.

Don't forget about the general structure of floppy-based FAT filesystems.
You need:
- a boot block (MBR) containing a valid description of the FS (number and
        size of FAT[s], CHS geometry, etc. - not all of which can be tuned
        using standard tools probably) - "BIOS Parameter Block" is what
        you want to look for (and compare against actual values in a
        standard size floppy image)
- one or two FATs (starting with the magic code), big enough for your *data*
        blocks
- a root directory (size also fixed in boot block!)
- space for your data (and perhaps sub-directories which are data blocks
        themselves)

Apologies for being a bit vague, but I didn't use such stuff for a while,
but I've written down some details (& my notes are at home, unfortunately).


Steffen

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user