*BSD News Article 58592


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.cis.okstate.edu!col.hp.com!nntp.coast.net!zombie.ncsc.mil!news.mathworks.com!fu-berlin.de!zrz.TU-Berlin.DE!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Booting from primary disk on secondary PCI IDE controller
Date: 31 Dec 1995 10:42:19 GMT
Organization: Private BSD site, Dresden
Lines: 64
Message-ID: <4c5peb$6t0@uriah.heep.sax.de>
References: <4c1avr$73@daneel.sds.no> <4c30sb$p1l@uriah.heep.sax.de> <4c44u7$5nh@iehpc.ihosteng.priv.no>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.3

Ivarh@ihosteng.priv.no (Ivar Høsteng) writes:

> >Variants with `holes' in the IDE drive assignment aren't fully
> >supported.  There are too many variations. :-(  (In particular,
> >if you are also thinking about an additional SCSI controller.)
> 
> You meen like my setup? (1 IDE, 1 Adaptec 2940, 1 Adaptec 3940).
> 
> The problems I have is that while the IDE controller is enabled the
> kernel tries to mount the wrong disk as the root fs. I am booting
> FreeBSD V2.1 from my second SCSI disk. When the IDE controller is

Yup, this is one of the failing configurations.

> enables the kernel tries to mount the /dev/sd2a instead of /dev/sd1a
> as the root fs. Why not make the kernel figure out what device it is
> beeing booted from and use it as the root fs instead of trying to
> guess where it is?

There are too many variations, and all this must be taken care of
inside of 7.5 KB of boot code.  Consider the variants in your case.
You are booting off the BIOS disk 0x82.  Here are the possible
scenarios:

1. wd-only system, no `holes' in the drive chain, 0x82 is the first
   disk on the second controller, wd2.

2. wd-only system, but the first controller does only have one drive,
   0x82 is the second disk on the second controller, wd3.

3. sd-only system, 0x82 is the third SCSI disk, hopefully configured
   to be sd2.

4. Mixed wd and sd system, one wd-style disk, 0x82 is the second SCSI
   disk, or sd1.

5. Mixed wd and sd system, two wd-style disks.  0x82 is the first SCSI
   disk, sd0.

So given that the boot code is faced with 0x82, how should it decide
that your configuration is clearly variant 4?

All the above doesn't account for the possibility that you might have
told your Adaptecs to ignore some of the drives for BIOS drive
assignment, or that you might have wired down some SCSI devices to
particular target IDs in your FreeBSD kernel.  Anyway, this latter
feature might be your chance: wire your boot disk to become sd2
instead of the auto-assignment for sd1:

controller    scbus0 at ahc0          # the 2940
controller    scbus1 at ahc1 bus 0    # both channels of the
controller    scbus2 at ahc1 bus 1    # 3940
disk          sd0 at scbus0 target 0
disk          sd2 at scbus1 target 1

..or whatever is appropriate.


-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)