Subject: Re: Trouble booting from harddrive...
To: Jonathan Belson <jon@dookie.demon.co.uk>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: netbsd-help
Date: 06/13/1998 23:30:45
On Sat, Jun 13, 1998 at 06:20:41AM -0700, Tim Rightnour wrote:
> On 13-Jun-98 Jonathan Belson spoke unto us all:
> # Although the installation went just fine, when it got to the 'remove the
> # floppy disk and reboot' thing, all I got was a 'Missing operating system'
> # message from the BIOS.  The only way I can get it to boot is to use
> # the installation floppy, set the device to wd0: and tell it to boot from the
> # hard drive kernel - a bit of a pain.
> # 
> 
> Seeing as you dont have a adaptec, my bets are you need to run fdisk /mbr on
> the HD. (the dos version)

  We've had a heck of a time getting NetBSD installed on a few
computers locally.  We have some 4G disks that no matter what
we do, the BIOS won't boot them.  But throw in an older 540MB
drive that was configured identically, and it'll boot off of
that.  We've even seen where a disk that booted fine with a P90
MB won't boot on a P200 MB (and if we stick it back in the P90,
it still boots).  Could new BIOS's be doing something evil like
looking for a magic number in the boot block besides the
standard ones?

  We've wiped the drive clean, re-fdisk /mbr'd, installed MS-DOS
on it, OS-BS'd it, put new boot blocks on, you name it.  Over
and over, in all sorts of combinations.  It'll boot MS-DOS, but
not NetBSD's boot blocks.

  Even though booting off a floppy is a pain, it ought to be
not-too-hard to make a custom floppy that uses wd0a as the
default, instead of fd0a -- perhaps simply change the first parameter
to bios2dev() to 0 in /sys/arch/i386/stand/biosboot/main.c:232?
(no guarantees -- that's just from a quick look at the code)

  An alternative is, create a minimal MS-DOS partition, like one
cylinder or so.  Install NetBSD's dosboot program (it's an
MS-DOS app that will load in a kernel either in the MS-DOS
filesystem, or from an FFS filesystem), and make your
autoexec.bat call dosboot -u.  Dosboot was successful in
booting our disks.  This is faster than the floppy boot method,
of course.  If you need a copy of dosboot.com and can't find it
anywhere else, drop me a note.

  Good luck!  Hopefully the /mbr did it for you.  And I'd say,
if it didn't, don't waste too much time before trying one of
the above workarounds.  I've easily wasted 20 hours in the past
year trying to work around this problem, and the dosboot
approach took 5 minutes and a single reboot to get it working. 
If only I'd thought of it sooner....

  Brian
-- 
"Well, you have all been spared the 'Eraser Of Death' for today."
  - dougm (COMP 212), after a student finally volunteered to go to the board.