[comp.unix.sysv386] WD1007V + big Maxtor + DOS + UNIX

tneff@bfmny0.BFM.COM (Tom Neff) (09/30/90)

Does anyone know the best way to configure a Maxtor 8760E disk on a
WD1007V-SE2 controller in a 386 AT system when you want a small bootable
DOS partition followed by a big UNIX partition, without wasting most of
the disk?

I have:

	Intel System 402 (AT386-type box with a 25MHz 486 and the
				latest Phoenix BIOS)
	Western Digital 1007V-SE2 controller (ESDI)
	Maxtor 8760E 5.25" FH disk (1632 cyl x 15 hd x 54 sec/trk for a
				formattad capacity of ~ 678MB)
	MS-DOS 3.30
	Intel UNIX System V/386 Release 3.2.2

What I want is:

	Partition 1: 32MB DOS bootable
	Partition 2: 640MB UNIX, to be chopped up into filesystems.

What I would love most of all is:

	An exact cookbook procedure for creating the above. :-)

What I don't understand right now is:
	
	* Should I enable or disable the 1007V's translation mode?
	  Does that mode need their BIOS INT 13H code to make it work
	  right?  If so, how will the BIOS-free UNIX driver cope?

	* How do I tell UNIX or DOS fdisk() programs about cylinder
	  numbers over 1023?  The fdisk on Intel's supplied UNIX boot
	  disk seems to do 10-bit truncation on numbers at the strangest
	  places, making hash of the partition table.  Will I have to go
	  in with Norton and patch it myself?

	* After screwing around with SETUP and FDISK for a while, I no
	  longer seem to be able to boot DOS from the hard disk even
	  when I run FDISK from scratch and FORMAT the resulting
	  partition.  The system hangs weirdly.  Will I have to do a low
	  level format to clean this up?

Any advice anyone can give me would be appreciated.  I know I'll beat
this thing, but the curve of ignorance is pretty high at the moment.  :-)

-- 
Diplomacy is the art of saying     *-/O     Tom Neff
"Nice doggie" until you can        |//|     tneff@bfmny0.BFM.COM
find a rock.  -- Will Rogers       O/-*     uunet!bfmny0!tneff

pjh@mccc.uucp (Pete Holsberg) (09/30/90)

In article <15899@bfmny0.BFM.COM> tneff@bfmny0.BFM.COM (Tom Neff) writes:
=Does anyone know the best way to configure a Maxtor 8760E disk on a
=WD1007V-SE2 controller in a 386 AT system when you want a small bootable
=DOS partition followed by a big UNIX partition, without wasting most of
=the disk?
=
=I have:
=
=	Maxtor 8760E 5.25" FH disk (1632 cyl x 15 hd x 54 sec/trk for a
=				formattad capacity of ~ 678MB)
=What I would love most of all is:
=
=	An exact cookbook procedure for creating the above. :-)

Low-level format the disk using DEBUG and the WD BIOS program at C800:5
(or their DOS formatter).

Boot UNIX "Disk 1 of 7."
Partition numero uno should be DOS, 80 cylinders (if my math is correct,
your Maxie yields 414,720 bytes per cylinder and 32M is 33,554,432
bytes.  Next partition (the active one) should get 1552 cylinders. 
Ignore FDISK's reporting of anything except starting cylinder number. 
Then, just continue with the installation.

=What I don't understand right now is:
=	
=	* Should I enable or disable the 1007V's translation mode?
=	  Does that mode need their BIOS INT 13H code to make it work
=	  right?  If so, how will the BIOS-free UNIX driver cope?

???  I used "enabled" for a 1222 cylinder Maxie on a 1007-WA2.  Cope?

=	* How do I tell UNIX or DOS fdisk() programs about cylinder
=	  numbers over 1023?  The fdisk on Intel's supplied UNIX boot
=	  disk seems to do 10-bit truncation on numbers at the strangest
=	  places, making hash of the partition table.  Will I have to go
=	  in with Norton and patch it myself?

No need to.  No.

=	* After screwing around with SETUP and FDISK for a while, I no
=	  longer seem to be able to boot DOS from the hard disk even
=	  when I run FDISK from scratch and FORMAT the resulting
=	  partition.  The system hangs weirdly.  Will I have to do a low
=	  level format to clean this up?

You mean if your DOS partition is formatted and sys'd and made active,
you still can't boot?  I'd start all over, doing what I suggested above.

Pete
-- 
Prof. Peter J. Holsberg      Mercer County Community College
Voice: 609-586-4800          Engineering Technology, Computers and Math
UUCP:...!princeton!mccc!pjh  1200 Old Trenton Road, Trenton, NJ 08690
Internet: pjh@mccc.edu	     Trenton Computer Festival -- 4/20-21/91

tneff@bfmny0.BFM.COM (Tom Neff) (10/01/90)

After a weekend-from-hell, I wrestled that new WD1007V-SE2 + Maxtor
8760E combo to the mat!  Knock wood.  I learned all sorts of grody stuff
along the way.

 1. When things get weird there is GREAT info on the Western Digital
BBS (+1 714 756 8176) and also the OnTrack BBS (hmm, where is that #).

 2. For full flexibility in formatting the Maxtor you NEED the
diagnostic program IN the WD BIOS; their external WDFMT.EXE will not do
the trick by itself.

I succeeded by doing the following:

---PART ONE----------------------

 * Jumper the WD1007 to
   - enable the WD BIOS
   - DISABLE translation
   - ENABLE alternate sector

 * Run the WD BIOS diagnostic:
   - boot DOS from diskette
   - run DEBUG.COM
   - G=C800:5
 
 * Do a low level format of the whole disk with alternate sector ENABLED
 * Then a surface analysis
 * Save the bad sector information - there should be few of these
   since the alternate sector covers most errors
 * Select the 1630x15x52 drive type (this is untranslated)
 * Exit

 * Run SETUP (on my Intel 402 you use Ctrl-Alt-Ins) and set drive type 1

 * Now reboot DOS and run FDISK; create a 32MB DOS boot partition up
   front of the disk

 * Run FORMAT C:/S and install DOS on the partition, plus whatever else
   you want there

 * Pop the diskette and reboot.  DOS now boots on the hard disk.

---PART TWO----------------------

 * Put the UNIX Base System boot floppy in the drive and reboot.

 * This boots single user UNIX and drops into the install script, which
   runs the UNIX fdisk().

 * Create a huge 'UNIX system' partition next to the leadoff DOS.  On my
   disk this meant cylinders 85-1631.  Do it by specifying actual
   cylinders rather than percentage of disk.

 * IGNORE what fdisk() then tells you!!  Some genius decided to do 10-bit 
   modulo on all the cylinder numbers regardless of what the on-disk 
   table *actually* contains, so it looks like it's telling you that
   instead of creating your new 1540-cylinder partition you only created
   a 576 cylinder one, only used 20% of the disk, etc, etc.  WRONG-O,
   you did actually did do what you wanted, fdisk is just too dumb to
   report its own results properly.  Press on...

 * Make that new UNIX partition bootable, then sit back and answer yes,
   yes, yes, <cr>, <cr>, default answers etc as the rest of the system
   installs.  When it tells you to reboot the system, do it and smile.
   Complete the install normally, from floppy or whatever.

---IN GENERAL-----------------------

 * Make sure that any tech support you talk to understands you're trying
   to teach ***UNIX*** to deal with a big disk.  Ninety-nine percent of
   all the technical support information and software available for these
   big disks and controllers assumes your goal is to give DOS lots of
   storage; most of the drivers, customized BIOS tricks and other
   gimmicks on hand have nothing to do with UNIX.  Remember that UNIX
   drivers do ALL the work themselves, talking straight to the
   controller, and do NOT use the BIOS at all except at startup time to
   get some parameters.  No special tricks are needed for DOS to read
   your leadoff 32MB partition.

 * If you are assembling a new system and you have the choice, get one
   3.5" 1.44 drive and one 5.25" 1.2 drive.  Be prepared to recable if
   needed, to make either one the A: boot drive.  Change the CMOS FIRST.

 * Keep at least one write-protected bootable DOS master disk for EACH
   floppy drive size in your system.  Make sure it contains DEBUG,
   FORMAT, SETUP and FDISK; a sector editor and text editor would be
   nice to have too.

 * When you're ALL done screwing around with your drive cables and are
   ready to bolt the chassis closed for good, check to make sure you're
   not blocking the fan!  It's pretty easy to cover up most of the
   intake.

 * If you have to interrupt the UNIX install process, hit <Del> to go
   the shell, but REMEMBER to type 'uadmin 2 0' before you power down!
   Once you get that boot diskette file system screwed up, you'll be
   unable to get anything done until it's fixed.

 * If you're planning to install UNIX from tape, make *sure* your floppy
   booted kernel has the RIGHT drivers for your tape drive and
   controller.  For instance: I got the Archive 150MB Viper which comes
   with its own controller card and drivers, including a UNIX install
   disk of 386/ix drivers.  Very sweet of them, BUT - useless until I
   have a working UNIX system already installed and ready to rebuild a
   kernel!!  In the meantime all I have is the SCSI tape support built
   into the Base System boot kernel -- which won't drive the tape.  So U
   have to go to another system and transfer my tape to floppies before
   I can install it... or else install the drivers somewhere else and
   copy the resulting kernel to a floppy for booting on the new box.

-- 
Shut up he explained.  ++  Tom Neff
 -- Ring Lardner       ++  tneff@bfmny0.BFM.COM  or  uunet!bfmny0!tneff

bruce@segue.segue.com (Bruce Adler) (10/03/90)

Regarding your recipe for installing a big disk (i.e. >1024 cyls):

You didn't say which flavor of unix you were installing.  Not turning on 
the disk adapter's translation feature may have been a mistake depending 
on which flavor and release of unix you installed.  You should be aware 
that some releases of unix/386 won't boot a kernel if any part of it is 
stored at or above cylinder 1024 (zero based).  You may not notice this 
bug for a very long time because all flavors of unix/386 now seem to 
have faster-file-gizmos which seem to always allocate blocks starting at 
the low end of the disk.  

Some unix vendors have fixed their bootstraps but I wouldn't be able to 
tell you for certain in which releases these bug-fixes appeared.  I 
think the latest and greatest versions of ISC and SCO may have this 
fixed.  I don't know about AT&T, Intel, and Esix.  The release notes for 
systems which have this bug usually mention the problem.  
-- 
bruce@segue.com, ism.isc.com!segue!bruce, aero.org!segue!bruce

tim@delluk.uucp (Tim Wright) (10/03/90)

In <15900@bfmny0.BFM.COM> tneff@bfmny0.BFM.COM (Tom Neff) writes:

...
>   disk this meant cylinders 85-1631.  Do it by specifying actual
>   cylinders rather than percentage of disk.

> * IGNORE what fdisk() then tells you!!  Some genius decided to do 10-bit 
>   modulo on all the cylinder numbers regardless of what the on-disk 
>   table *actually* contains, so it looks like it's telling you that
>   instead of creating your new 1540-cylinder partition you only created
>   a 576 cylinder one, only used 20% of the disk, etc, etc.  WRONG-O,
>   you did actually did do what you wanted, fdisk is just too dumb to
>   report its own results properly.  Press on...

Not true. The problem doesn't lie with fdisk, the problem lies with IBM
who in their infinite wisdom decided that you'd never have disk with >1024
cylinders on a PC (to be fair I suspect the old HD controller on a XT
couldn't support this, though I don't know for certain !). The BIOS can't
cope with >1024 cylinders (at least if you claim IBM-PC compatability !).
The modulo-2^10 is necessary and *IS* what is stored in the *fdisk* partitions
table which is not the same as the VTOC in the UNIX partition. This is *the*
reason for all this translation crap. You wouldn't need to translate except
to get around the brain-damage in certain so-called Operating Systems. The
upshot is that all bootable partitions must start before cylinder 1024,
otherwise you cannot make them bootable ! With this proviso in hand, UNIX
doesn't care where it is since the VTOC at the beginning of the UNIX partition
specifies all the unix partitions (within the relevant fdisk partition), and
the numbers here are not subject to stupid limits :-)

Hope this makes things clear,

Tim
--
Tim Wright, Dell Computer Corp. (UK) | Email address
Dell Computer Corp. (UK), Bracknell  | Domain: tim@dell.co.uk
Tel: +44-344-860456                  | Uucp: ...!ukc!delluk!tim
"What's the problem? You've got an IQ of six thousand, haven't you?"

tneff@bfmny0.BFM.COM (Tom Neff) (10/03/90)

In article <3998@segue.segue.com> bruce@segue.segue.com (Bruce Adler) writes:
>Regarding your recipe for installing a big disk (i.e. >1024 cyls):
>
>You didn't say which flavor of unix you were installing.  

Actually I did:

In article <15899@bfmny0.BFM.COM> tneff@bfmny0.BFM.COM (Tom Neff) I wrote:
>I have: ...
>	Intel UNIX System V/386 Release 3.2.2

But anyway... I don't believe this is a vendor specific issue.  Most of
the problems I was having came before the base system floppy even booted.

>                                                          Not turning on 
>the disk adapter's translation feature may have been a mistake depending 
>on which flavor and release of unix you installed.  You should be aware 
>that some releases of unix/386 won't boot a kernel if any part of it is 
>stored at or above cylinder 1024 (zero based).  You may not notice this 
>bug for a very long time because all flavors of unix/386 now seem to 
>have faster-file-gizmos which seem to always allocate blocks starting at 
>the low end of the disk.  

Right, and this limitation is documented in the Intel UNIX 3.2.2 Release
Notes.  But the installation script sets up a default root filesystem
only 24MB in size, right at the beginning of your UNIX partition.  So
/unix and any other /kernelfiles are really going to be between
cylinders 85 and about 140.  One would have to set up a single titanic
combined root+user file system over 500MB in size in order to run into
the bug!  Generally that's not a good way to set up your disk.

-- 
Technology is a way of organizing       '   '     Tom Neff
the universe so that man doesn't have    '   '    tneff@bfmny0.BFM.COM
to experience it. -- Max Frisch           '   '   uunet!bfmny0!tneff

gwr@linus.mitre.org (Gordon W. Ross) (10/09/90)

It is better to disable geometry translation for UNIX to avoid fooling
the device drivers into optimizing head movement based on false disk
geometry parameters.  For example, the Berkeley Fast File System (FFS)
code is careful to place its redundant copies of the superblock on a
different surface in each cylinder group.  This does not do what it is
meant to do when the BIOS lies to the system about the disk geometry.

The only reason to enable translation mode in your disk controller
BIOS is to avoid confusing the system BIOS and MS-DOS when the disk
has more than 1024 cylinders.  There are at least two other ways deal
with this lossage that I know of.  They are both described below:

(1)	If your system BIOS allows the specification of arbitrary disk
	parameters (as do recent revisions of the Phoenix BIOS) you can:
	(a)	Record the disk parameters installed by your
		controller BIOS.  One can use DEBUG to examine the
		locations pointed to by interrupt vectors 41h and 46h,
		or run a disk format program (i.e. OnTrack, SpeedStor)
		which will show you the "system default" parameters.
		(I recommended SpeedStor for good surface analysis.)
	(b)	Disable the disk controller BIOS
		(normally a jumper option)
	(c)	Run your system BIOS setup program and specify the
		parameters recorded above, except for the number of
		cylinders which should be set to 1024.
	With this configuration, DOS (or the BIOS) will be able to
	access only the first 1024 cylinders of your hard disk, but
	UNIX will be able to use all of it.  When installing UNIX be
	careful when it asks you if the disk parameters it found are
	correct.  The parameters it finds will be the ones you
	specified (only 1024 cylinders) so you must tell UNIX what the
	actual number of cylinders is.  Note that the boot program
	requires the root partition to end on or before cylinder 1024.

(2)	The second method can be used on machines where the BIOS does
	not allow you to specify an arbitrary set of disk parameters,
	though it requires that you modify one of the hidden files
	which DOS uses to boot-up.  With this method you leave the
	disk controller BIOS enabled (but disable sector translation)
	and create a patched version of DOS which modifies the
	disk-parameter vector set-up by the BIOS, (limits the number
	of cylinders seen by DOS to a maximum of 1024).  The
	disadvantage of this method is that non-patched versions of
	DOS will not be able to make sense of your disk.  If you use
	lots of different bootable DOS diskettes this could be a pain.

I have a set of patches for MS-DOS 3.3 which perform the modification
described in method two above.  The patch can be applied using only
DOS DEBUG and a floppy disk (and SYS to put it on your hard disk).

If anyone wants this patch I can e-mail it or post it.  It has been
posted before in comp.sys.ibm.pc around February 1990.  If you want
it posted again, tell me where you think I should post it.

Gordon W. Ross	(M/S E095)	| internet: gwr@linus.mitre.org
The MITRE Corporation		| uucp: (backbone-host)!linus!gwr
Burlington Road			| Day-phone: 617-271-3205
Bedford, MA 01730 (U.S.A.)	|
-- 
Gordon W. Ross	(M/S E095)	| internet: gwr@linus.mitre.org
The MITRE Corporation		| uucp: (backbone-host)!linus!gwr
Burlington Road			| Day-phone: 617-271-3205
Bedford, MA 01730 (U.S.A.)	|