From owner-freebsd-questions Wed Jan 17 19:40:57 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA04600 for questions-outgoing; Wed, 17 Jan 1996 19:40:57 -0800 (PST) Received: from westford.ccur.com (masscomp.westford.ccur.com [129.75.2.26]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id TAA04587 for ; Wed, 17 Jan 1996 19:40:46 -0800 (PST) Received: from moe by masscomp.westford.ccur.com via TCP/IP with SMTP id aa13760; 17 Jan 96 22:18 EST Received: from localhost by moe.westford.ccur.com via TCP/IP with SMTP (local) id aa04335; 17 Jan 96 19:19 EST To: questions@freebsd.org cc: dan@westford.ccur.com Subject: rel-2.1.0 and msdos file systems Date: Wed, 17 Jan 96 19:19:23 EST From: Dan Malek Message-ID: <9601171919.aa04335@moe.westford.ccur.com> Sender: owner-questions@freebsd.org Precedence: bulk First, let me apologize for not scanning the news groups first. My news server has been down for a couple of weeks (and still is). The problem I am having is with Release-2.1.0 and the MSDOS file system partition. Any modification to the 'C:' drive (/dev/wd0s1) corrupts my FreeBSD root partition (/dev/wd0s2a). The info: Packard Bell 133MHz Pentium PCI, 16Mb 2.something Gbyte IDE disk (this is some kind of funky tandem drive. It has two physical drives that appear as one. I am trying to get some information about this). MSDOS on first 'partition' FreeBSD on second 'partition' The real drive is 4095 cyl, 16 heads, 63 sectors The BIOS drive is 1023 cyl, 64 heads, 63 sectors The drive came as one giant partition with Windows '95 installed. I booted DOS 6.22 and ran FIPS to split up the drive: The first track is 'reserved' DOS: cyl 0, track 1, sector 1 to cyl 442, track 63, sector 63 FreeBSD: cyl 444, track 0, sector 1 to cyl 1022, track 63, sector 63 Reported by FreeBSD 'fdisk': DOS block numbers: 63 to 1786613 FreeBSD block numbers 1790208 to (I don't remember the end) I have completely reformatted and reloaded MSDOS 6.22 (no windows of any kind) using the split disk, and FreeBSD. As you can see from the data above, I have left a few free 'cylinders' between the partitions (by creating another DOS partition). I have added a debug printf to msdos_fat.c:pcbmap() to print the cluster and block numbers. When creating new files on the DOS partition (with FreeBSD running and the partition mounted), these block numbers never exceed the starting number for the FreeBSD partitions, but the FreeBSD root partition still gets corrupted. One last error, even all of the disk rebuilds: mountmsdosfs(): root directory is not a multiple of the clustersize in length I built the system using controller flags 0x80ff, and the boot message indicates the driver can do 16-block multi-block transfers (is this bad?). Unfortunately, I am not PC literate, and don't understand who uses BIOS versus real disk addressing. Also (unfortunately), I need the DOS partition as part of my file sharing work. I believe I have located the FreeBSD partition at the start of both real and BIOS cylinders, just to make sure that was not a problem. The Release-2.1.0 MSDOS file system seems to work just fine with a floppy disk, so the problem must be with the hard disk mapping. I am also running FreeBSD 2.0.5 on another system with an Adaptec SCSI controller and 1.something GByte disk. The MSDOS file system works just fine there. Thanks a bunch for your help. I am looking forward to trying anything you can suggest (and will also appreciate any PC education I can get along the way). -- Dan Malek