Subject: Re: IDE drive fails probe/attach/open
To: None <michaelv@MindBender.serv.net>
From: Mike Long <mike.long@analog.com>
List: port-i386
Date: 01/02/1997 13:07:34
>Date: Wed, 01 Jan 1997 14:27:25 -0800
>From: "Michael L. VanLoon -- HeadCandy.com" <michaelv@MindBender.serv.net>

>What happens is when the machine is cold booted (turned off and then
>back on -- reset doesn't cause this), if my IDE drive is turned off in
>the BIOS, it will fail to open/attach completely after probing.
>I. e. I see all the right stuff during probe time, but before the
>kernel finishes auto-configuring, I get an error that makes the IDE
>drive unusable.  If I then turn the drive on in the BIOS, reboot, turn
>the drive off in the BIOS, and reboot again, it continues to work
>correctly forever forward, until I turn the machine off and cold boot
>it again.

My guess is that your PC has a brain-dead motherboard IDE controller,
for which the BIOS compensates.  (You would be shocked and amazed by
some of the gackola that's hidden by PC BIOSes.)  The BIOS only
performs its magic if it sees a drive configured in NVRAM; without the
magic, accesses to the drive fail.  The magic lives in some sort of
RAM, since it goes away if power fails but survives RESET#.

>  I don't use the IDE
>drive for any normal operations, except for this backup function.

What I suggest is that you always enable the IDE drive in your BIOS,
but hack the NetBSD bootblock installed on that drive so that it boots
hd(1,a) by default.  If the machine reboots while you're not around,
then it will boot NetBSD from your SCSI drive via the bootblock on
the IDE drive.
-- 
Mike Long <mike.long@analog.com>     <URL:http://www.shore.net/~mikel>
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil