Re: How many sectors does a FAT1 and FAT2 copies contain

From: Corey Murtagh (emonk_at_slingshot.no.uce)
Date: 08/01/04


Date: Mon, 02 Aug 2004 09:16:11 +1200

Ravi kumar.N wrote:
> Dear Experts,
>
> I am writing a format program for floppy which i want
> it to work as windows format utility works.I am trying to format
> floppy as per FAT12 standard.According to FAT12 each FAT copies i.e.
> FAT1 and FAT2 occupies 9 sectors.I want to know whether the number of
> sectors occupied by each FAT copy is standarad(i mean to say is it
> fixed) or is it customizable.i.e. instead of allocating 9 sectors what
> happens if I allocate 6 sectors to each FAT copy.Please let me know.

The number of sectors per FAT is dependant on a Few factors including
sector size, sectors per cluster, total media size, etc. You need
enough FAT entries to reference every cluster on the media, of course.

Fortunately the FAT format lets you pick and choose the variables. You
can have a cluster size of up to 32k, with 12-bit FAT entries, giving a
1440kB diskette with 45 clusters a FAT size of 1 sector, if you wanted
to be that wasteful of space.

On FAT filesystems the media geometry is stored in the Boot Sector
Record. This includes bytes per sector (512, 1024, 2048 or 4096),
sectors per cluster (1, 2, 4, 8, 16, 32, 64, 128), total number of
sectors, sectors per FAT, sectors per track, number of heads...

Anyway, check out the tables here:

   http://home.freeuk.net/foxy2k/disk/disk3.htm

There's plenty of good information there that should help you with your
goal.

-- 
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur!"


Relevant Pages