Skip site navigation (1)Skip section navigation (2)
Date:      20 Nov 1996 09:57 EST 
From:      "barry (b.a.) scott" <tsbarry@nortel.ca>
To:        hackers@freebsd.org
Cc:        jdli@freebsd.csie.nctu.edu.tw, joerg_wunsch@uriah.heep.sax.de, akiyama@kme.mei.co.jp, barry@scottb.demon.co.uk, john@talisker.demon.co.uk, jgumb@madge.com
Subject:   640MB MO support source kit 
Message-ID:  <199611201540.HAA11847@freefall.freebsd.org>

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

	This kit contains changes to "FreeBSD 2.2-961006-SNAP"
	which implement support for disks with physical sector
	size of 512, 1024 and 2048 bytes.

	Authors: These changes are the joint effort of
	John Gumb (john@talisker.demon.co.uk) and
	Barry Scott (barry@scottb.demon.co.uk). Please
	contact us about these chanages.

	At this point only the od device has been changed.
	Changing the sd device would be straight forward;
	apply the changes from od.c to sd.c. We will submit
	a patch for sd.c later.

	This kit contains diffs that can be used with the 'patch'
	utility to update a virgin source tree.

	Location: via ftp at ftp.freebsd.org:/pub/FreeBSD/incoming/mo-2048kit.tar.gz

     1. Source Changes necessary
	========================

     a) SBIN changes
	------------

	Patch file: sbin.MO.patch

	This file patches fdisk and newfs to support up to
	2048 byte sectors.

	Files changed on system:
		/usr/src/sbin/newfs/newfs.c
		/usr/src/sbin/newfs/mkfs.c
		/usr/src/sbin/i386/fdisk/fdisk.c

	Corresponding files in this kit:
		mo-kit/sbin.MO.patch
		mo-kit/sbin/newfs/newfs.c
		mo-kit/sbin/newfs/mkfs.c
		mo-kit/sbin/i386/fdisk.c

     b) SYS chages
        ----------

	Patch file sys.MO.patch

	This file patches the kernel to support up to 2048
	byte sectors on the od device. Both ufs and msdosfs
	are supported on the od device.


	Files changed on system:
		/usr/src/sys/msdosfs/msdosfs_fat.c
		/usr/src/sys/msdosfs/msdosfs_vfsops.c
		/usr/src/sys/msdosfs/msdosfsmount.h
		/usr/src/sys/kern/subr_diskslice.c
		/usr/src/sys/ufs/ufs/ufs_disksubr.c
		/usr/src/sys/scsi/od.c

	Corresponding files in this kit:
		mo-kit/sys.MO.patch
		mo-kit/sys/msdosfs/msdosfs_fat.c
		mo-kit/sys/msdosfs/msdosfs_vfsops.c
		mo-kit/sys/msdosfs/msdosfsmount.h
		mo-kit/sys/kern/subr_diskslice.c
		mo-kit/sys/ufs/ufs/ufs_disksubr.c
		mo-kit/sys/scsi/od.c

     c) ETC changes
        -----------

	The file disktab.MO contains the disktab entry for the
	Fujitsu M2513A MO drive with 2048 byte media.
	
	Files changed on system:
		/etc/disktab

	Corresponding file in this kit:
		mo-kit/disktab.MO

     2. Testing performed
	=================

     a) MSDOS
        -----
	For MSDOS FS we created a FAT formated MO disk under Windows NT
	and placed files onto the disk from Windows NT.

	Under FreeBSD all the directories and files where confirmed
	to be readable.

	Under FreeBSD we created extra directories and wrote files
	on to the MO disk.

	FreeBSD could read these additional files.

	The disk was moved back to Windows NT and chkdsk was used
	to detect any file system corrupt. None found. Window NT
	was used to read the directories and files written under
	FreeBSB.

     b) UFS
	---
	we use the following script to regression test
	disklabel and newfs:

	
-------------
#!/bin/bash
set -x
echo Initing disk...
umount /dev/od0a
umount /dev/od0s1
logger -p local1.notice "Initing disk..."
dd bs=2048 count=1 if=od0-mbr.fdisk of=/dev/rod0
dd bs=2048 count=2 seek=1 if=/dev/zero of=/dev/rod0

echo read disklabel...
logger -p local1.notice "read disklabel before write..."
disklabel /dev/rod0c

echo read disklabel...
logger -p local1.notice "read disklabel -r before write..."
disklabel -r /dev/rod0c

echo write disklabel...
logger -p local1.notice "write disklabel..."
disklabel -r -w /dev/rod0c m2513a-640mb testing-mo-code

echo read disklabel after write...
logger -p local1.notice "read disklabel..."
disklabel /dev/rod0c

echo newfs od0a
logger -p local1.notice "newfs..."
newfs /dev/rod0a

echo mount od0a
logger -p local1.notice "mount od0a..."
mount /mo
-------------

	Note the file od0-mbr.fdisk contains a copy of the mbr
	written previously under FreeBSD by the new fdisk. 

	The entire /usr/src/sys tree was written to the MO disk
	using cp -r. The disk was dismounted and then remounted.
	Then the entire /usr/src/sys tree was diffed against the
	MO disk copy. No differences found. 

	The MO was dismounted and fsck was run. It detected no
	problems.

     3. Misc. Information
	=================

     a) FDISK
	-----
	We have tended to create a single BSD slice using fdisk. Be
	aware that the slice should start at offset 1 and the file
	system size should be 310351 sectors; the first sector being
	reserved for the mbr/partition table information. The geometry
	we use is slightly different to the default (see our modified
	/etc/disktab) in order to utilise the full capacity of the media.
	The bios geometry we use is C/H/S 652/17/28 (652*17*28=310352).





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