Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 96 19:19:23 EST
From:      Dan Malek <dan@westford.ccur.com>
To:        questions@freebsd.org
Cc:        dan@westford.ccur.com
Subject:   rel-2.1.0 and msdos file systems
Message-ID:   <9601171919.aa04335@moe.westford.ccur.com>

next in thread | raw e-mail | index | archive | help


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <9601171919.aa04335>