Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 1995 15:37:24 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        chain@mpd.tandem.com, current@FreeBSD.org
Cc:        chain%muzak.mpd.tandem.com@mpd.tandem.com
Subject:   Re: 950412-SNAP
Message-ID:  <199504250537.PAA16942@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 2) My 'diskless' station has only a DOS partition and no FreeBSD
>> partition in a wd0 (ST506). It panics during diskless boot. I traced
>> down the panic to wdopen which was getting an integer division fault.
>> The trace is as follows:
>> 	configure()
>> 	swapconf()
>> 	wdsize()
>> 	wdopen()
>> 	---idiv fault
>> Is this a known problem? I got around the problem by bypassing wdopen()

It was known that the diskless boot doesn't support getting the BIOS
geometry or debugging and that the BIOS geometry is sometimes used when
it is invalid.

>> but wasn't able to trace further down because no symbols were loaded
>> into the kernel, and ddb trace shows no names. I modified netboot to
>> load symbol table over the net but it seems to have no effect. What
>> other things do I need to do to get the symbol table loaded into ddb? 

>I've made a few small modifications to netboot to do the following:

>1) Get wd0 disk geometry from bios and load bootinfo that includes
>	disk geometry, so wd* driver can make use of it when fails
>	to read from disk, rather than panic.
>2) Load symbol tabel across the net so ddb works on diskless configuarion.
>3) Build a mini netboot kernel that can be loaded by bios-boot, and 
>	then starts a 'diskless' boot.

Now that you can debug, please determine why the BIOS geometry is used
at all.  It should only be used if the WDCC_READP command fails, and
it should only fail for old (ST506) drives.

The current wd.c has some changes related to this.  The BIOS geometry
is no longer used by the driver except when WDCC_READP fails (previously,
another BIOS geometry was inferred from the partition table and used
even when WDCC_READP succeeds).  This means that drives for which
WDCC_READP fails will no longer work unless the BIOS geometry in
`bootinfo' is correct.  More work is required to ensure that it is
correct and to know when it is incorrect (it can't be correct if there
are old drives that aren't supported by the BIOS).

>I am really hoping these features (mostly from biosboot) be included
>in the standard netboot so I don't have to change it later myself.
>I attached patched at the end.

Did you think about sharing the boot code?  At least the boot --> kernel
interface parts should be common.

>Also wd0 may need to be fixed so wdattach will fail if disk geometry cannot
>be obtained, rather than succeeds and later panics in wdopen when invalid
>geometry is used in calculation.

It was supposed to guard against errors such as division by zero so that
it could bootstrap to better geometries inferred from the partition table
and read from the disk label, but the bootinfo BIOS geometry changes broke
that).  The bootstrapping process is error prone and currently mostly
disabled.  It will probably go away.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504250537.PAA16942>