From: Felix M. <mr...@ea...> - 2010-01-24 15:11:29
|
On 2010/01/24 14:48 (GMT+0100) Stefan Xenon composed: > 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. mkdosfs only creates a filesystem on an already existing partition. It cannot create a partition. > Could you give me any hint how to create a partition smaller than 34 KB? This is easier said than done on modern disks. DOS-compatible partitioners normally define a "cylinder" as the smallest possible partition size, and a "boundary" as the first sector following a "cylinder" multiple. A "cylinder" is defined as heads X sectors X 512 On contemporary hard drives this is usually one of the following: 255 X 63 X 512 = 8,225,280 bytes = 8,032.5 KiB (usually desktop HDs) 240 X 63 X 512 = 7,741,440 bytes = 7,560 KiB (usually laptop HDs) To create a smaller partition than one "cylinder" requires use of a partitioning program capable of defining a partition that does not end on a "boundary". No DOS executables I'm aware of can do this. Some of the Linux tools can, possibly disk druid, cfdisk or sfdisk, but the result will probably be that any further attempts to partition with a DOS compatible tool will halt with an error message about corrupt partition table or illegal partition table. Possible ways around the problem are disks much smaller than common today, such that a "cylinder" is much smaller than 7-8M. By "smaller" I mean something in the 80 MiB (not GiB) or smaller range. Possibly a 64M CFlash chip or other tiny solid state media would work. Personally I don't remember ever creating a partition smaller than about 1 MiB. -- "Our Constitution was made only for a moral and religious people. It is wholly inadequate to the government of any other." John Adams, 2nd US President Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ |