From owner-freebsd-hackers Sat Aug 24 07:44:19 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA05712 for hackers-outgoing; Sat, 24 Aug 1996 07:44:19 -0700 (PDT) Received: from eac.iafrica.com (196-7-192-208.iafrica.com [196.7.192.208]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id HAA05705 for ; Sat, 24 Aug 1996 07:44:04 -0700 (PDT) Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id QAA00248 for hackers@freebsd.org; Sat, 24 Aug 1996 16:40:49 +0200 From: Robert Nordier Message-Id: <199608241440.QAA00248@eac.iafrica.com> Subject: Re: DOS root directory? To: hackers@freebsd.org Date: Sat, 24 Aug 1996 16:40:47 +0200 (SAT) In-Reply-To: <199608241007.MAA09821@uriah.heep.sax.de> from "J Wunsch" at Aug 24, 96 12:07:17 pm X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk J Wunsch wrote: > > As Robert Nordier wrote: > > > Most users with very large DOS filesystems probably do shrink them > > when installing FreeBSD. And if FIPS were more conscientious, it > > would adjust the cluster size to something more appropriate (and > > probably then <= 32 sectors). > > This would require a complete reorganization of the file system, not > just adjusting the BPB only. Yes. By "adjust the cluster size", I didn't mean (of course) just adjust the cluster size value in the BPB. There is a FIPS competitor, also freeware, called "Partition Resizer", by John Lagonikas, which does shrink partitions correctly, even changing FAT entry size between 16 and 12 bits, where necessary. With more user awareness of what FAT filesystem mount code properly entails, I think FIPS would probably have less of a following. Consider this logic applied by MS-DOS to the "OEM Name & Version" string in the boot sector BPB (quick 80x86 to C translation): if (!(oem[5] == '2' && oem[6] == '.' && oem[7] == '0')) { /* ... */ if (oem[5] == '0' && oem[6] == '.') { /* ... */ if (oem[4] != '1' && oem[4] != '2') disable_access_to_filesystem(); } else if (oem[6] < '.' || oem[6] == '.' && oem[7] < '1') derive_cluster_and_FAT_size_by_table_lookup(); } Too bad if my "format" utility sets bsOemName[6] != '.'; if even a "harmless" virus uses the space for something; or if the boot sector just gets partially corrupted. -- Robert Nordier