[1361] in NetBSD-Development
Re: 2nd IDE bus, installation, boot floppies, boot loader
daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Aug 2 23:42:02 1996
To: jmmikkel@MIT.EDU
Cc: yoav@MIT.EDU, ghudson@MIT.EDU, netbsd-dev@MIT.EDU
In-Reply-To: Your message of "Fri, 02 Aug 1996 18:11:28 EDT."
<199608022211.SAA00615@dans-le-mur.mit.edu>
Date: Fri, 02 Aug 1996 23:39:57 EDT
From: Greg Hudson <ghudson@MIT.EDU>
> No, I don't want OS-BS. I said so, though evidently not clearly
> enough, in my previous message.
What you said was "Installing netbsd's boot loader, which as far as I
could tell, can only be done via dos anyway (where should I be
looking?) is not currently an acceptable answer." The thing is,
neither OS-BS nor booteasy are "netbsd's boot loader," so what I
assumed you really meant was that booteasy couldn't boot off a
separate disk (a known problem).
Anyway, with that cleared up, I have to say that your situation is not
common, and it's not one a PC operating system can reasonably be
expected to support. (Keep reading, though; I'm going to describe a
possible solution at the end.) To the best of my knowledge, Linux or
DOS can't be booted off a disk the BIOS can't find; Solaris/x86 might
be able to do it because it boots by loading a floppy full of
real-mode drivers for various disk controllers. Of course,
Solaris/x86 reportedly has problems of its own with two IDE
controllers.
At the risk of explaining a lot of details you already know, the
problem is that there are two ways of accessing disks on a PC:
* By talking directly to the controller
* By going through the BIOS
Once you've booted Linux or NetBSD, they typically like to talk
directly to the controllers on your system, because the BIOS is slow
and uses a bogus interface and you can't do anything else while you're
waiting for the disk. This is why if you have a bleeding-edge SCSI
controller you have to wait for a special driver before Linux or
NetBSD supports it before it will work, whereas DOS works right away.
At boot time, however, the kernel isn't there, and the kernel's device
drivers can't be used. Solaris/x86 apparently has two versions of
every device driver (one for "real mode" which works at boot time and
one for the actual kernel), but that's a lot more work than goes into
free operating systems.
That said, there are a ocuple of answers: making a boot floppy, or
using the old boot loader. I'll describe them in that order.
> 1.) I don't have an install floppy 2.) I don't know how to create
> it.
Making a boot floppy is irritating but not terribly difficult once you
know how to build a kernel. NetBSD doesn't have the same flexibility
as Linux when it comes to boot options, so the root device is
determined more or less at compile time. In the kernel configuration
file for most kernels, you see a line that says:
config netbsd swap generic
This "generic" configure line tells NetBSD to mount the root
filesystem off whatever disk it was booted from, e.g. a floppy if you
booted from a floppy. You can specify the rood device explicitly by
doing:
config netbsd root on wd0 swap on wd0
Then you have to build the kernel, put it on a filesystem on a NetBSD
floppy (the same way you presumably put a kernel on an install
floppy), and you're set.
> There isn't any sort of boot loader which is horribly
> SCSI-incompatible which I can use?
It turns out that there is. There's an old boot loader whose source
code lives in /usr/src/sys/arch/i386/stand, which uses a modified
version of the IDE device driver to read the kernel rather than going
through the BIOS. There are several possible problems with this
approach:
* None of us in SIPB have ever tried using the old boot
loader, so we don't know if it works.
* It seems doubtful that it would recognize a second IDE
controller without some checking.
* No MBR boot loader (except maybe Solaris/x86's) will know
how to transfer control to the old boot loader, so you would
need to find a place to install it on a BIOS-recognizable
disk and then give it boot options to boot off the disk on
the second IDE controller.
I hope this information helps. You have some valid complaints about
documentation and the difficulty of installation for cases the stock
install disks don't support, but I can't guarantee that they will be
addressed. The PC is a very broken architecture, and it would take a
tremendous amount of effort to have convenient installation tools or
documentation to handle every weird configuration. For instance, the
second IDE controller is probably not enabled in the default NetBSD
kernel configuration because probing for it would cause some machines
not to boot properly.