Why FAT12 And not FAT16?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
surya4friends

Why FAT12 And not FAT16?

Post by surya4friends »

Well, why everyone mostly speak or thinks of FAT12 and not FAT16?
Is there any specific reason for this?
Also Is there link to get specification or samples to work on FAT16?
Thanks in advance. :)
Regards,
Aditya.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Why FAT12 And not FAT16?

Post by Pype.Clicker »

the main reason for talkin' about FAT12 is that it is de facto standard for floppy disk organisations ...
and most people here want their boot disk to be readable under other OS (which is not really a bad thing, after all).

FAT32 rather looks like an ugly patch, imho ... i don't think it worth the investment ... better turn to NTFS or EXT2 if you want to learn something cleanly designed.
.bdjames

Re:Why FAT12 And not FAT16?

Post by .bdjames »

So you have a working ntfs driver?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Why FAT12 And not FAT16?

Post by Pype.Clicker »

lol ...
without a disk driver ? no, i don't think so :-D

but i think Tim Robinson has some in Mobius (don't you, Tim ?)
Tim

Re:Why FAT12 And not FAT16?

Post by Tim »

NTFS?! Not likely! :o

FAT and disk drivers are more realistic: Mobius has a FAT12/16 file system driver and drivers for floppy disks and IDE hard drives/CD-ROM drives. Have a look through the CVS source via http://sourceforge.net/projects/mobius/ if you're interested.
surya4friends

Re:Why FAT12 And not FAT16?

Post by surya4friends »

Well,
Seems My question got read wrongly by most of ppl, Well Let me put question this way.

WHY FAT12 AND "NOT FAT16"?

AS per my knowlege FAT 16 in current time, at least for floppies, is used more! (don't want to start argument on this though, if am wrong, forgive me! ;D) ;D

And, yes, Don't know from where NTFS came in picture?

Adi.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Why FAT12 And not FAT16?

Post by Pype.Clicker »

surya4friends wrote:
AS per my knowlege FAT 16 in current time, at least for floppies, is used more!
virtually every floppy disk i've seen was using a FAT12 ...
surya4friends

Re:Why FAT12 And not FAT16?

Post by surya4friends »

Sorry, for that false knowledge I displayed! :-[
But I guess, I have time to get better! ;)
Regards,
Adi.
Curufir

Re:Why FAT12 And not FAT16?

Post by Curufir »

MS uses the number of data sectors on the disk to determine filesystem type.

MS FAT information document has this to say:
This is the one and only way that FAT type is determined. There is no such thing as a FAT12 volume
that has more than 4084 clusters. There is no such thing as a FAT16 volume that has less than 4085
clusters or more than 65,524 clusters. There is no such thing as a FAT32 volume that has less than
65,525 clusters. If you try to make a FAT volume that violates this rule, Microsoft operating systems
will not handle them correctly because they will think the volume has a different type of FAT than
what you think it does.
So to use FAT16 on a floppy (2880 sectors) under windows you would have to write a bad value of number of sectors into the BPB. This has corollary effects like screwing up the calculation of FAT size, root directory position, first data sector position etc. In short it is a bad idea to do it.

Note: Just because MS says this is how they determine FAT type doesn't mean it holds true for all Windows systems, but it's worthwhile to maintain the standard for compatibility purposes.

Curufir
Mr_Spam

Re:Why FAT12 And not FAT16?

Post by Mr_Spam »

ah, this raises another semi-related question from me. How do you tell what file sysem is on a disk, either floppy, hard drive, CD, or other.

At some point i would like my boot program to beable to search for a file on any common file system, but need to know what file system it is to beable to know how to search it.
Curufir

Re:Why FAT12 And not FAT16?

Post by Curufir »

Like any other formatting issue you use a variety of known variables, known format specific constructions, and magic numbers (Eg ELF) to figure out just what you're dealing with.

Curufir
Berserk

Re:Why FAT12 And not FAT16?

Post by Berserk »

Hey,

A 1.44 mb floppy disk is too small to fit FAT16, so you have to use FAT12, and NTFS, this is out of the question for floppys.

As for ex2, i think it can be used for floppys.

Ciao ;)
Tim

Re:Why FAT12 And not FAT16?

Post by Tim »

Berserk wrote:NTFS, this is out of the question for floppys.
Not necessarily. Windows is hard-coded to stop you using NTFS on a floppy disk (IIRC you can't format an NTFS floppy, and you can't use an NTFS floppy), but www.sysinternals.com will tell you how to do it.
Curufir

Re:Why FAT12 And not FAT16?

Post by Curufir »

Horses for courses as the saying goes.

For small disks (Ie floppies) the FAT system is actually just as efficient (In some instances more efficient) as an inode system because you can hold the entire FAT in memory at any time (4.5k for a 1.44mb floppy). Once you reach a hardrive's size the inode systems become better.

Just to clear this up. You can put any filesystem you like on a floppy eg FAT12/16/32, Ext2/3, NTFS, Reiserfs (I'd like to see you try this one :)), LFS (This would destroy your floppy very very quickly), etc. All a filesystem represents is a coherent method of storing and accessing data, nothing more.

However just because you can do a thing doesn't mean you should. Using a filesystem outside the environment it's designed for is just going to give you compatibility problems with existing operating systems. So if you're using floppies then it makes far more sense to use a filesystem that was designed for use with floppies, most probably this would be FAT12 or Ext2.

Curufir
Post Reply