Page 1 of 1

FAT16 on a floppy?

Posted: Wed Mar 21, 2007 4:15 pm
by pcmattman
Ok, I'm (officially) sick of FAT12.

Is there any way to make my boot floppy FAT16? If I can use FAT16 then I can finally have reading the FAT much easier because there are 16-bits not 12-bits in each cluster entry.

From my Googling, I've seen many references to a FAT16 floppy, so it must be possible.

Posted: Wed Mar 21, 2007 4:18 pm
by Combuster
if you know where to look...

mkdosfs -F 16
(http://www.linuxcommand.org/man_pages/mkdosfs8.html)

Posted: Wed Mar 21, 2007 4:22 pm
by pcmattman
Oh... I'm on Windows.

I'll just have to boot into my linux partition and use that, then use dd (in Cygwin) to create the image file that I can use for VFD.

Posted: Wed Mar 21, 2007 4:35 pm
by bubach
whats so hard about 12 bits? it's not much diffrent from 16, you just shift out the bits that you don't need?

Posted: Wed Mar 21, 2007 5:09 pm
by pcmattman
Hmmm... I just found out that my Linux partition is dead (again).

Edit: I also found out that for some strange reason the FORMAT command in Windows doesn't do FAT16... mkdosfs, the Windows port, doesn't work ("mkdosfs: unable to get length for '\\.\b:'").

Posted: Thu Mar 22, 2007 4:53 am
by urxae
I've attached the result of:

Code: Select all

$ dd if=/dev/zero of=fat16.img bs=512 count=2880
$ mkdosfs -F 16 fat16.img 
mkdosfs 2.11 (12 Mar 2005)
WARNING: Not enough clusters for a 16 bit FAT! The filesystem will be
misinterpreted as having a 12 bit FAT without mount option "fat=16".
$ gzip fat16.img
Note the warning. I have no idea if that's also true for Windows, but I thought I'd mention it.

Hope this helps.

Posted: Thu Mar 22, 2007 5:17 am
by pcmattman
Thankyou so much! Windows doesn't complain at all (the warning is just for Linux afaik).

Posted: Thu Mar 22, 2007 3:03 pm
by frank
The FAT types are pretty much always determined by the number of clusters on the disk. If you were able to format a disk with less than the proper number of clusters as FAT16 than it would still be mistaken for FAT12. That would cause havoc. So if you do get this too work, don't expect it too work on other OSs.

Posted: Thu Mar 22, 2007 5:27 pm
by Combuster
maybe its just crappy open source software that does not check the mbr for 'FAT12' or 'FAT16' </sarcasm>

Posted: Fri Mar 23, 2007 6:02 pm
by frank
EDIT: Oops must have missed the sarcasm, sorry
Microsoft wrote:The FAT type—
one of FAT12, FAT16, or FAT32—is determined by the count of clusters on the volume and nothing
else.
That is from the FAT: General Overview of On-Disk Format from microsoft. Take it for whatever you want to.

According to the document this is the only way to determine FAT type:

Code: Select all

If(CountofClusters < 4085) {
/* Volume is FAT12 */
} else if(CountofClusters < 65525) {
/* Volume is FAT16 */
} else {
/* Volume is FAT32 */
}

Posted: Sun Mar 25, 2007 1:26 pm
by Candy
Combuster wrote:maybe its just crappy open source software that does not check the mbr for 'FAT12' or 'FAT16' </sarcasm>
Well... the official docs specify that the "FAT12" and "FAT16" doesn't matter but that you just count the number of clusters. In this case, this was from the Microsoft docs.

You probably know that though, as per the </sarcasm> tag.

Posted: Sun Mar 25, 2007 3:20 pm
by pcmattman
Hmmm... I see your points. Turns out Windows changed it back to FAT12 as soon as files started getting written to it :(

Either way, I now have FAT12 reading setup properly (writing is for today and tomorrow :D ) so it's really quite irrelevant now.