On 4/30/2012 10:15 PM, Rod Pemberton wrote:
> "James Harris"<
james.h...@gmail.com> wrote in message
> news:5931be65-7622-4af9...@l3g2000vbv.googlegroups.com...
> ...
>
>> Any opinions as to what filesystem would be best to
>> use for that partition?
>
> a) FAT16. For one, it has a standard: ECMA-107 or ISO/IEC 9293.
> For two, lots of DOS utilities are available. There are even a number of
> DOS utilities for setting up and using Linux from DOS.
>
yes, and a person can probably get by using FAT-32 as well.
> b) Roll your own. Hey, it's a.o.d!
>
> c) Personally, I would consider ISO 9660. It has a standard: ECMA-119 or
> ISO 9660. POSIX support can be added via the Rock Ridge standard. The
> advantage here is that a simple command, like 'dd' for Linux or
> rawrite/rawread or partcopy etc., can be used to read or write an entire
> .iso image as the initial boot partition. The image has a proper filesystem
> within. Your bootloader could then boot an .iso from harddisk, cd-rom,
> solid state disk, USB disk or stick, etc. DOS is the minimum needed to
> write an .iso image to harddisk. I'm not sure what, if any, DOS utils exist
> for creating .iso's.
>
ISO isn't really designed with read/write in mind, so would be
ill-suited as a general purpose FS.
as an advantage though, it gives 32kB or so in which to put a boot loader.
> d) A .zip file. Mostly, it's for similar reasons as I listed in c). An
> advantage and disadvantage is the compression. On the one hand the
> compression reduces the "partition" size, while on the other, it requires
> decompression code in your bootloader ... DOS is the minimum needed to
> create a .zip file and write the image to harddisk. Optionally, you could
> use FAT16 or something else as your filesystem and just use .zip to compress
> the filesystem image. Alternately, using .tgz or .rpm would be similar.
> Package managers or file compressors are a good way to store an entire
> filesystem.
>
ZIP can be used moderately well as a filesystem, including for random
access and read/write (sort of, hackery involved), but has a critical flaw:
it doesn't really scale all that well (probably roughly 10k to 100k
files is a practical upper-limit).
the main issue would mostly be with its lack of true directories,
requiring essentially dealing with the entire central directory to be
able to know its contents.
using Deflate+FAT16 or TGZ or similar would have a major disadvantage:
it would not allow for random access, and would essentially require
decompressing the whole image (say, to a ramdisk or similar) to be able
to access any of its contents.
possible could be to use a compressed file-system based on
"micro-sectors" or similar, where there is a virtual sector-size of,
say, 16 or 64 bytes, and probably the FS would be spans-based rather
than using a FAT or similar. at 64-byte sectors, there would be an
approx 0.2% overhead due to an allocation bitmap.
compression could use a modified block-based Deflate variant or similar.
say, files are compressed in 64kB virtual-blocks or similar (as deflate
will not compress much better if using blocks > 2x the window size).
this could make a lot more sense for smaller volumes (up to several GB
or so), and (unlike FAT16) would not waste lots of space due to large
clusters.
a small sector size would largely eliminate the need for things like
end-packing as well, but would require larger sector numbers, and likely
reduce its effectiveness for large volumes (although an implementation
could allocate data using larger clusters as well, say a "cluster size"
of 64 sectors, roughly working out to 4kB, or 256 for 16kB).
in this case, "clusters" would be used more for "files which aren't
tiny" (whereas larger clusters are less well suited to files which will
often only use a small part of a cluster anyways).
> e) Personally, I would also consider UDF. It has a standard:ECMA-167 or
> ISO/IEC13356. It is newer, better, and more flexible than ISO 9660.
> Apparently, it's primarily used for DVDs currently. However, I would think
> it should be useable on all media types as a general purpose filesystem.
> However, I don't recall seeing any image files of UDF disks ... They
> probably do exist though. If you can create UDF image files, then, in
> general, it's better than ISO-9660 since it could do everything I listed
> in c) and more. However, you won't be able to access it or recover files
> from it using DOS. DOS has no UDF support. In that regard, IS0-9660 is
> better, since DOS can access ISO-9660.
>
not really looked into UDF to determine if they have any "good" ways of
dealing with read/write filesystems.
> f) Personally, I'd avoid ext2 or ext3. In addition to them being somewhat
> "flaky" IMO, support to access them via other OSes is non-existant.
> Actually, the lack of support probably applies for all Linux filesystems.
> I'm not sure whether ext4 or ReiserFS are "flaky". ReiserFS worked fine for
> the very short time I used it.
>
ReiserFS was essentially a giant B*Tree.
what largely killed it off though was that the guy who created it went
and killed his wife, which didn't really go over all that well in the
Linux community.
> g) Personally, I'd avoid NTFS too. Support to access it from other OSes
> was lacking and perhaps still is. When access from another OS is available,
> it seems that read access is available, but not write access. If you're
> trying to repair NTFS files or filesystem from another OS, that's a problem.
> You might want to check if NTFS has patents on it.
>
AFAIK, NTFS does have patents, but this is nothing unusual here.
> h) Personally, while LFN support is nice, I'd have to add FAT32 to the list
> to avoid because of patent issues.
>
FAT32 isn't really as much of an issue AFAIK.
the main "issue" is mostly regarding LFN, and mostly when using "mixed"
8.3 and LFNs on the same file at the same time.
if one uses only a single name for the file (either the 8.3 name or the
LFN, ignoring the 8.3 name entirely if an LFN exists), then arguably the
patent doesn't apply.
AFAIK, the patents also apply to FAT12 and FAT16 with LFNs as well, so
using FAT16 doesn't escape it (since FAT16 LFNs are implemented pretty
much exactly the same as the ones in FAT32).
unless there is some other patent here specific to FAT32 (rather than to
LFNs in general).
>
> I have no real opinion on most other filesystems. You should probably
> decide whether a DOS filesystem or DOS recovery is important or not. I do
> like some of the features of the CBM-DOS filesystem, but that may just be
> nostalgia talking.
>
> (CBM-DOS is Commodore's DOS for their line of floppies for their [non-x86]
> PCs: VIC-20, C64, C128, PET/CBM, SX-64, Plus/4. FYI, you've probably never
> used the terms PC and DOS outside of an IBM clone context ... However, they
> once were used that way with all early home microcomputers. Each was
> referred to as a PC and each had it's own DOS coded specifically for that
> machine and it's microprocessor, i.e., Apple, Amiga, Commodore, etc. or had
> multiple DOSes in the case of IBM PCs.)
>
>
> Here is a good list of filesystems on Wikipedia:
>
http://en.wikipedia.org/wiki/Comparison_of_file_systems
>
> From that list, I might consider a modern, open source, filesystem by a
> major corporation. There are a few modern filesystems by major corporations
> on the list. The issue of what type of license, if any.
>
> If you implement your own filesystem, you'll need a value for your partition
> type. The list of standard partition types is quite full, but has some free
> values and low-use or obsoleted values. See the link you posted in the
> other thread. Also, 0xe2 is in use.
>
pretty much all are in use already.
many OS's use magic-values embedded in the boot-sector or similar
instead as their primary means of determining one filesystem from another.
> As a side note, you could also mark your partition as 0x00 "empty" with the
> risk that someone might overwrite it when using DOS or Linux partition
> utilities. Under certain circumstances, "convincing" someone or their
> utilities to either overlook it or overwrite it may be desirable ...
> Alternately, you could use a heavily overloaded partition value, such as
> 0x07, to obscure it's true format, i.e., one of many, but actually
> different. Or, you could use the partition type assigned for
> alt.os.development: 0x7f. You'd have to track down the AODPS "standard"
> circa 2002 to see what they were doing with it.
>
dunno if it is still around anywhere online.
I have a copy of it though.