From mint-bounce@lists.fishpool.fi Mon Nov 3 06:52:46 2008 Date: Sun, 2 Nov 2008 11:55:49 +0100 Message-Id: <200811021055.mA2Atngt029398@tyrell.nvg.ntnu.no> From: Jo Even Skarstein To: mint@fishpool.com Subject: [MiNT] (fwd) Revisited: HDDRIVER, FAT32, MiNT, FAT too small User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (Linux/2.6.15-1.2054_FC5 (i686)) X-NVG-MailScanner-Information: Please contact the ISP for more information X-NVG-MailScanner: Found to be clean X-MailScanner-From: joska@nvg.ntnu.no X-Approved-By: tjhukkan@fishpool.fi X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: joska@nvg.ntnu.no Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: -- 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 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/ */