[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] (fwd) Revisited: HDDRIVER, FAT32, MiNT, FAT too small
-- forwarded message --
Path: ntnu.no!uio.no!newsfeed1.funet.fi!newsfeed3.funet.fi!newsfeeds.funet.fi!feeder2.news.saunalahti.fi!feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Uwe Seimet <Uwe.Seimet@seimet.de>
Newsgroups: comp.sys.atari.st
Subject: Revisited: HDDRIVER, FAT32, MiNT, FAT too small
Date: Sun, 02 Nov 2008 10:23:10 +0100
Lines: 28
Message-ID: <6n59ruFjkgclU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net PZkAkxBujxBGRlAONl2+1w4yGnOhzt/9c/3IeWUVMYFkLEFDA=
Cancel-Lock: sha1:nIVgttXWedBXMkEIxEmQ0792+dQ=
User-Agent: Thunderbird 2.0.0.17 (X11/20080914)
Xref: ntnu.no comp.sys.atari.st:267170
Hi all,
To Jean-Luc and everybody who contributed to the discussion of MiNT not
accepting a FAT32 partition of 4095 MB created by HDDRUTIL:
I finally checked HDDRUTIL's FAT size calculation and did not find
anything wrong, even though MiNT reports "FAT too small".
Let me summarize the calculation, so that you can comment on it:
When creating a FAT32 partition of 4095 MB HDDRUTIL allocates 8386528
sectors of 512 bytes for the FATs and the actual data area. 8174 sectors
are allocated for each FAT, which means that 8386528-2*8174=8370180
sectors remain for the actual data. There are 8 sectors per cluster,
which means that there are 8386528/8=1046272 data clusters. For each of
these 1046272 clusters a 32 bit FAT entry is required, which means that
1046272*4=4185088 bytes are needed per FAT. This is exactly what 8174
sectors per FAT amount to: 8174*512=4185088.
This calculation shows that the number of FAT sectors allocated by
HDDRUTIL is exactly the number of sectors needed.
If my calculation is right MiNT is wrong and should be fixed. If my
calculation is wrong please point out the error so that I can fix my code.
Best regards Uwe
--
-----------------------------------------------------------------------
Dr. Uwe Seimet http://www.seimet.de/
-- end of forwarded message --
--
/*
** Jo Even Skarstein http://joska.nvg.org/
*/