[comp.os.minix] IDE disks

kjh@pollux.usc.edu (Kenneth J. Hendrickson) (02/16/91)

In article <1627@pdxgate.UUCP> martine@jove.cs.pdx.edu (Martine Wedlake) writes:
>	When I boot any of the boot disks I get "Read  Error.   Automatic
>	Reboot"  and  the system tries to reboot (which of course fails).
>	The boot disks do work on  other  machines  such  as  a  386  and
>	turbo-88 board.  I am running an AT clone with an IDE hard/floppy
>	controller.

I asked this question before, but never got any definitive answers.

Just exactly what is an IDE drive/controller?
Does it look like MFM?  RLL?  SCSI?  ESDI?  Something else?
Does it need a new device driver?
Will any of the existing device drivers work?

Please answer to the net, cuz everybody wants to know.

-- 
favourite oxymorons:   student athlete, military justice, mercy killing
Ken Hendrickson N8DGN/6       kjh@usc.edu      ...!uunet!usc!pollux!kjh

nfs@elan.Princeton.EDU (Norbert Schlenker) (02/16/91)

In article <30432@usc> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>I asked this question before, but never got any definitive answers.
>
>Just exactly what is an IDE drive/controller?

IDE stands for integrated device electronics.  It means that the
controller functions are integrated with the drive.  On my Conner
IDE drive, the controller is packaged on a drive size card mounted
just under the drive itself.  Great concept.

>Does it look like MFM?  RLL?  SCSI?  ESDI?  Something else?

It looks like a normal AT drive.  Some look like MFM drives, others
look like RLL drives, others (like my Conner CP3104) look like ARLL
drives.  They are neither SCSI nor ESDI.

>Does it need a new device driver?

Not for Minix.  Minix 1.5 can use both the CP344 (a 42Mb IDE drive
that I used to have) and the CP3104 (a 104Mb IDE drive) without
modification.  Just to amuse everyone, I should note that Minix 1.5
used the CP3104 flawlessly when I installed the drive, while DOS
(actually the BIOS ROMs in my machine) failed because the drive was
too fast.  I consider this truly hilarious.

>Will any of the existing device drivers work?

I use at_wini.c.  I should note that the 1.3 at_wini was not up to
the task, for those still using 1.3 or earlier versions.  Patches
were posted and are still available at bugs.nosc.mil for those
problems, but it has got to be simpler to just upgrade to 1.5.

Norbert

ching@brahms.amd.com (Mike Ching) (02/17/91)

In article <30432@usc> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>
>Just exactly what is an IDE drive/controller?
>Does it look like MFM?  RLL?  SCSI?  ESDI?  Something else?
>Does it need a new device driver?
>Will any of the existing device drivers work?
>
>Please answer to the net, cuz everybody wants to know.
>

IDE stands for something like Integrated Drive Electronics which means
the controller is integrated with the drive. MFM, RLL, and ESDI describe
the interface between the controller and the drive. IDE and SCSI describe
the interface between the system and the controller on the drive. I have
not found any software that does not treat an IDE drive the same as an
external controller including those that do low level formatting like
Spinrite.

Mike Ching

wjb@cogsci.cog.jhu.edu (02/17/91)

In article <30432@usc> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>
>It looks like a normal AT drive.  Some look like MFM drives, others
>look like RLL drives, others (like my Conner CP3104) look like ARLL
>drives.  They are neither SCSI nor ESDI.

	Is this true for ALL IDE drives?  I'm sure that many (most) of them
implement the Western Digital de facto register set, but I don't think they
all do.  Integrating the electronics on the drive doesn't require that you
implement the SAME programming interface.  Even when they implement the
register set, they may have a variable number of sectors per track which
Minix doesn't handle right now.  (Your best bet would be to use the smallest
number.  Of course this means you might waste quite a bit of space on your
drive.)  My suggestion is to find out if it works with any of the low level
disk utilities programs like "Spinrite" or "Disk Technician".  If it does
then it will probably work, if not look for something else.

				Bill Bogstad

wjb%cogsci.COG.JHU.EDU@vm1.nodak.edu (02/17/91)

Mike Ching says:

>IDE stands for something like Integrated Drive Electronics which means
>the controller is integrated with the drive. MFM, RLL, and ESDI describe
>the interface between the controller and the drive.

	Yes, but in the AT BUS world they also imply that you use a
controller which implements the Western Digital register set and provides
the PROGRAMMING interface to the drive.  Minix doesn't care what the actual
hardware interface is as long as it implements the right registers for the
progammer.  There are even SCSI controllers out there which implement the
right interface.

> IDE and SCSI describe
>the interface between the system and the controller on the drive.

	SCSI is actually a bus rather then a drive interface.  SCSI
"controllers" for PCs implement a way to generate SCSI bus transactions.
The interface they provide to the program running in your machine
varies.  As I said above at least one is specialized for SCSI disk
transactions and provides WD compatibility for your programs.

	My understanding of IDE is that most (all?) of them just run an
extender off of the AT BUS to the drive.  In many cases they then implement
the WD registers on the drive.  I'm not convinced that "many" means "always".

>I have
>not found any software that does not treat an IDE drive the same as an
>external controller including those that do low level formatting like
>Spinrite.

	I know someone who builds clones and he HAS found IDE drives that
don't work with Spinrite.  As I said in my last message, Spinrite is a good
test, but not all IDE drives pass.  Ask first.

				Bill Bogstad

nfs@elan.Princeton.EDU (Norbert Schlenker) (02/17/91)

In article <44838@nigel.ee.udel.edu> wjb@cogsci.cog.jhu.edu (Bill Bogstad) writes:
>
>In article <30432@usc> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:

Actually, I wrote the following paragraph.

>>It looks like a normal AT drive.  Some look like MFM drives, others
>>look like RLL drives, others (like my Conner CP3104) look like ARLL
>>drives.  They are neither SCSI nor ESDI.

>	Is this true for ALL IDE drives?  I'm sure that many (most) of them
>implement the Western Digital de facto register set, but I don't think they
>all do.  Integrating the electronics on the drive doesn't require that you
>implement the SAME programming interface.  Even when they implement the
>register set, they may have a variable number of sectors per track which
>Minix doesn't handle right now.  (Your best bet would be to use the smallest
>number.  Of course this means you might waste quite a bit of space on your
>drive.)  My suggestion is to find out if it works with any of the low level
>disk utilities programs like "Spinrite" or "Disk Technician".  If it does
>then it will probably work, if not look for something else.

These points are all possible, I suppose.  I would add that my Conner CP3104
works flawlessly under Minix, while Spinrite seems unable to do anything at
all with the drive.  I disclaim knowledge of the characteristics of any
other IDE drive, although it would surprise me if they didn't include some
sort of compatibility with the WD standard (e.g. the CP3104 can be set up to
look like an old MFM drive, 17 sectors per track - I don't run it that way).
I highly recommend the CP3104, which is physically tiny, quiet, capacious,
and very fast.  I believe prices have come down to <$500 mail order, which I
think is reasonable for 104 Mb.

Norbert

t901590@mp.cs.niu.edu (T.J. McNamee ) (02/17/91)

My configuration is:

   Leading Edge 386SX laptop with 2 meg. RAM, 41Meg. IDE hard drive

I partitioned off 15 meg for Minix, used the AT boot disk and everything
worked fine.

paradis@acestes.UUCP (Jim Paradis) (02/17/91)

In article <30432@usc> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>Just exactly what is an IDE drive/controller?
>Does it look like MFM?  RLL?  SCSI?  ESDI?  Something else?
>Does it need a new device driver?
>Will any of the existing device drivers work?

IDE stands for "Integrated Drive Electronics".  Basically, the concept
of IDE is to move most of the functions previously relegated to a
controller onto the drive itself, and to use a simple "host adapter"
to speak to the drive in a high-level protocol.  Sorta the same idea
as SCSI, really, but a different protocol.  No, you can't plug an IDE
drive into a SCSI host adapter or vice versa.

The IDE host adapters available for PCs today are register-compatible
with existing MFM controllers.  This means that existing device drivers
should work with them with no problems whatsoever.  The only thing you
MIGHT need to tweak would be certain drive parameters (e.g. sectors per
track; I don't know if it's different for high-capacity IDE drives...).

-- 
Jim Paradis                  UUCP:  harvard!m2c!jjmhome!acestes!paradis
9 Carlstad St.               AT&T:  (508) 792-3810
Worcester, MA 01607-1569     ICBM:  42deg 13' 52",  71deg 47' 51"

wjb@cogsci.cog.jhu.edu (02/17/91)

I wrote various stuff about possible problems with IDE.

Norbert wrote:
>These points are all possible, I suppose.  I would add that my Conner CP3104
>works flawlessly under Minix, while Spinrite seems unable to do anything at
>all with the drive.

I said:
	works with SpinRite -> works with Minix
this does not mean
	works with Minix -> works with Spinrite

	Depending on which "version" of SpinRite II you have, it may or may
not be able to deal with an unusual numbers of sectors per track.  Do you
know what the physical characteristics of your drive are?  I'm curious as to
why it doesn't work with SpinRite.

>I disclaim knowledge of the characteristics of any
>other IDE drive, although it would surprise me if they didn't include some
>sort of compatibility with the WD standard (e.g. the CP3104 can be set up to
>look like an old MFM drive, 17 sectors per track - I don't run it that way).

	Be careful with "sector-translation" modes.  RLL and ARLL controllers
often have the capability to provide translation modes to make them appear
to have 17 sectors per track.  I've tried to find out from vendors whether
this is implemented via the BIOS code or whether it is done in hardware.
Unfortunately, in at least one instance when I called the manufacturer their
technical support people couldn't answer the question.  Given that DOS rules
the PC world and implementing it via code in the BIOS is easier then doing it
in hardware.  Well, ...  Since Minix bypasses the BIOS, translation
implemented that way wouldn't help.  How Conner implemented it is unknown to
me.

>I highly recommend the CP3104, which is physically tiny, quiet, capacious,
>and very fast.  I believe prices have come down to <$500 mail order, which I
>think is reasonable for 104 Mb.

	I'm glad that it worked for you.  Unfortunately, I know either too
much or too little to feel comfortable making any kind of blanket statement
about IDE.  The questions I would ask a vendor would be:

	Is it Western Digital register compatible?
		If no forget it.
	Does it have a fixed number of sectors per track?
		If no you would have to waste space.
	What are its PHYSICAL drive characteristics?
	In particular how many cylinders?
		(DOS has problems with more then 1024 cylinders.  You
		could use a translation mode, but this would probably confuse
		Minix if the mode was implemented in the BIOS.)
	What is your return policy? 1/2 :-)

As you can probably tell by now, I'm something of a pessimist.  I think the
low cost of IDE drives is great.  I just wish I could be sure about
compatibility.  Fortunately, I'm not in the market right now for more storage
and by the time I am I expect things to have stabilized or my ignorance to
have been rectified.  Conner looks like a company I would call to get answers
to my questions.

				Bill Bogstad

ching@brahms.amd.com (Mike Ching) (02/17/91)

In article <44839@nigel.ee.udel.edu> wjb%cogsci.COG.JHU.EDU@vm1.nodak.edu writes:
>	I know someone who builds clones and he HAS found IDE drives that
>don't work with Spinrite.  As I said in my last message, Spinrite is a good
>test, but not all IDE drives pass.  Ask first.


It would be useful to identify the ones that aren't compatible.

Mike Ching

clyde2@unix.cis.pitt.edu (James C Elder) (02/17/91)

In article <30432@usc> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>In article <1627@pdxgate.UUCP> martine@jove.cs.pdx.edu (Martine Wedlake) writes:
.
stuff deleted
.
>>	turbo-88 board.  I am running an AT clone with an IDE hard/floppy
>>	controller.
>
>I asked this question before, but never got any definitive answers.
>
>Just exactly what is an IDE drive/controller?

An IDE drive has the main "body" of the controller on the drive. The
controller(card) is basically just an adapter plug.

>Does it look like MFM?  RLL?  SCSI?  ESDI?  Something else?

Sorry, don't know.

>Does it need a new device driver?
>Will any of the existing device drivers work?

Yes. I purchased MINIX 1.5 from PH and it uses the drive no problem. So
I guess the defaults work.

>Please answer to the net, cuz everybody wants to know.

I tried. By the way I'm running an Amstrad 1386(386) with 40M HD(IDE)
4M mem(3M RAM disk).

Well if nothing else you know IDE works, and an Amstrad can be added to
the compatability list.

Jim
(Jim Elder-clyde2@unix.cis.pitT.edu)

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (02/18/91)

My $0.02 worth.

I have a Miniscribe 8051A IDE drive with associated Miniscribe IDE host
adapter. As far as I can ascertain, it presents the host with a WD compatible
register set.

I recently acquired a Rodime 3065 MFM drive and a WD1003-WA2 controller. After
some investigation I discovered that it is possible to run this pair as a
secondary disk at addresses 0x170-0x177 and 0x376 (from memory). After updating
at_wini.c, I was running with two controllers (IDE and WA2) with one drive on
each.

For reasons I won't go into here, I then wanted to run the 3065 drive as the
primary drive (the one MessyDog boots from). This raised the question:

	Can you run an IDE drive from the secondary port address?
	(ie 0x170-0x177 and 0x376 instead of 0x1f0-0x1f7 and 0x3f6)

Needless to say, several dealers I spoke to looked at me blankly...

I looked at hacking the Miniscribe IDE host adapter, but it looked messy to
accomplish. In the end I built my own host adapter by reverse engineering the
Miniscribe one and looking at some Conner manuals.

It's in fact quite easy --- you can do it in a weekend. The hardest part was
getting a prototyping card. I ended up cannabilising an old AT card just to get
the edge connector fingers.

The host adapter comprises:

1. IO address decoder (enable /CS0 or /CS1). You can decode any address
   you like. The conventional primary addresses are 0x1f0-0x1f7 for /CS0
   and 0x3f6 for /CS1 (from memory).

2. Control signal buffer. One 74LS244 and one 74LS241, from memory, are
   required here. The latter to invert and buffer one signal :-(

3. Low byte buffer. One 74LS245 is required.

4. High byte buffer. This is for the 16 bit transfers. One 74LS245 is
   required.

5. Some glue. You could probably squeeze (1) and (5) onto a single PAL. I had
   to resort to a few extra glue chips. I was a concerned about speed so I
   used 74Fs for the glue.

So, those of you running out of disk space can run multiple IDE host adapters
and string extra disks off them. That's a great thing about IDE. You will have
to adapt the AT wini driver to accommodate your new configuration.

Actually, you could probably merge several host adapters onto a single board
and save on slots!

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
EMAIL: cechew@bruce.cs.monash.edu.au PHONE: 03 5655778 FAX: 03 5655146
----------------------------------------------------------------------

jca@pnet01.cts.com (John C. Archambeau) (02/19/91)

kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>In article <1627@pdxgate.UUCP> martine@jove.cs.pdx.edu (Martine Wedlake) writes:
>>	When I boot any of the boot disks I get "Read  Error.   Automatic
>>	Reboot"  and  the system tries to reboot (which of course fails).
>>	The boot disks do work on  other  machines  such  as  a  386  and
>>	turbo-88 board.  I am running an AT clone with an IDE hard/floppy
>>	controller.
>
>I asked this question before, but never got any definitive answers.
>
>Just exactly what is an IDE drive/controller?
>Does it look like MFM?  RLL?  SCSI?  ESDI?  Something else?
>Does it need a new device driver?
>Will any of the existing device drivers work?

IDE is an adaptor.  In technical terms it's a hybrid of ST412/506 (some say
ESDI) and SCSI.  It basically makes your drive an extension of the ISA bus.
The implementation is neat since in IDE translation mode it looks like a
standard ST412/506 MFM drive to your BIOS.

For example, a Conner CP-3184 has a translation mode that maps itself to the
drive geometry of a Seagate ST4096.  Very standard drive type.

As for drivers, that all depends on how intimate your ST412/506 driver is with
the controller.  I imagine that at_wini.c is pretty intimate.  Novell ELS
Level I doesn't support IDE, but it works with ST412/506 with no problems.

Again your mileage varies.  Considering the 'hardcoded' nature of the Minix
hard drive drivers, I don't think you can safely interchange ST412/506 MFM and
IDE.  This is based on my observations on the net and back about a year or so
ago when I was still playing with Minix.

If you really want to test out how compatable at_wini.c is.  Try this little
experiment.  Pull a WD1003-IWH from a Compaq and remove your WD1003-WA2 (or
MM2) and put in an IDE adaptor with a floppy drive port on it.  Effectively,
this should be identical to a WD1003-WA2 (or MM2) and an ST412/506 MFM
controller.

The WD1003-IWH is an ST412/506 to IDE adaptor board.  I've found them in
Compaq Portable II's with the 20 Mb Miniscribe 8425.  I've tested these things
with ISC 2.0.2 and it works just as well (if not a little better, haven't
benched out the throughput) as the same ST412/506 MFM drive with a
WD1003-WA2.

Again, your mileage may (and often will) vary.

     // JCA

 /*
 **--------------------------------------------------------------------------*
 ** Flames  : /dev/null                     | What to buy?
 ** ARPANET : crash!pnet01!jca@nosc.mil     | EISA or MCA?
 ** INTERNET: jca@pnet01.cts.com            | When will the bus wars end?
 ** UUCP    : {nosc ucsd hplabs!hp-sdd}!crash!pnet01!jca
 **--------------------------------------------------------------------------*
 */

rommel@Informatik.TU-Muenchen.DE (Kai-Uwe Rommel) (03/02/91)

I have a Seagate (SWIFT) IDE drive (ST-1239A) with ~205MB. To use such a
drive with DOS, for example, you have to cut it below 1024 cylinders
which requires you to translate to more than 17 sectors per track.
Seagate recommends 36 sectors/14 heads/818 cylinders. Because I want to
use that drive with Minix in the near future (I'm not yet ready to try
it out), I have a more general question:

Will the standard AT harddisk driver of Minix recognize such disks with
more than 17 sectors per track and handle them correctly?

I think, that's the point. The IDE drives which I know are all WD
register compatible and at least the drive/host adaptor combinations I
have tested do not have any BIOSes on them and thus I assume the
translation is done in hardware.

That some of these disks do not work with Spinrite, may be caused by the
fact that IT IS NOT RECOMMENDED TO LOWLEWEL FORMAT ANY IDE DRIVE,
because that destroys bad-tracking info on the drive. My drive for
example, does not show ANY bad tracks, probably because it has some
spare tracks which are remapped to bad sectors (when doing a sequential
read verify test, one can feel it seek sometime over a longer part of
the disk instead of only doing track-track-seeks). This remapping is
probably destroyed by lowlevel formatting it. Some drive thus may have
some lock to prevent it from beeing lowlevel formatted.


Kai Uwe Rommel