[Soekris] Net5401 + OpenBSD + 256MB CF

David Young dyoung at pobox.com
Tue Feb 4 02:03:21 UTC 2003

On Mon, Feb 03, 2003 at 07:49:22PM -0600, soekris-tech-admin at lists.soekris.com wrote:
> Also, I'm wondering if anyone has done any investigation as to why
> certain cards do not work.  A friend of mine also purchased a Net4501
> with a Kingston 256MB CF card and has had no problems getting Linux to
> boot.  However, using the same CF card in the same Net4501 with OpenBSD
> gives a "Read error" as the 1st stage tries to load the 2nd stage.  This
> made me quite curious because from a technical standpoint, if Linux can
> boot, OpenBSD should as well.  So, this past week I tried experimenting
> with a few things to see where the problem is.

Maybe the OpenBSD's and FreeBSD's bootloaders are still affected by a
bug which used to affect NetBSD's? Here is the log message for a patch
I made to NetBSD:

  revision 1.9
  date: 2002/10/10 18:52:42;  author: dyoung;  state: Exp;  lines: +39 -1
  Introduce biosdiskreset(), and call it to reset the disk (with Int
  0x13 Function 0) after a read error. This is a requirement mentioned
  in most BIOS documentation.
  This answers PR 18591.
  Incidentally, on the Soekris Engineering net45x1 single-board
  computer, this fixes a bug where the bootloader corrupts the kernel
  while loading it from certain varieties of CompactFlash card
  (especially varieties identified by NetBSD as <TOSHIBA THNCF064MBA>).

The patch affected sys/arch/i386/stand/lib/bios_disk.S. You might examine
the equivalent OpenBSD source file to find out if it does a proper disk
reset on read failures.


> The first thing I did was hack OpenBSD's biosboot program to do single-
> sector reads to load the 2nd stage.  I got the idea from looking at
> LILO's source code.  This actually worked and I was able to get to the
> 2nd stage boot loader giving me the "boot> " prompt.  However, I could
> not load a kernel.  Again, I got read errors.  I briefly looked at
> OpenBSD's boot program, but the sources are quite a bit more complex
> than biosboot.  Therefore I decided to move on to something else.
> Next I thought I'd try to get FreeBSD to boot from the Net4501, but
> again, ran into the dreaded "Read error" when trying to boot from the CF
> card.  I decided to try PXE-booting and was able to boot into the
> FreeBSD 4.7 installation.  I then performed a minimal installation from
> the Soekris with no problems.  However, when I rebooted, I got the "Read
> Error" yet again.
> So, based from what I've been seeing through all of this, it would
> appear as though the BIOS for the Net4501's is having a problem reading
> data from the CF card in a block fashion.  During OpenBSD's or FreeBSD's
> initial boot steps, the BIOS is used to read the kernel image off of the
> disk.  However, once the kernel is loaded, the BIOS is no longer needed.
> In the case of FreeBSD where I was able to PXE-boot the kernel, I
> noticed no problems reading or writing data to the CF card.  This is
> what leads me to the conclusion that it's the Soekris' BIOS that is
> causing problems in the boot process and not necessarily the card.
> Am I completely off-base here?  Have any of the Soekris engineers taken
> a look at this more closely?  I'd be interested in hearing other's
> opinions on this subject.
> Also, if it would help development in any way, I'd be more than happy
> to ship my Kingston CF cards to Soekris for testing.
> Thank-you.
> --
> jason hord
> _____________________________________________________________________
> Soekris Engineering, technical discussion mailing list
> [un]subscribe: http://lists.soekris.com/mailman/listinfo/soekris-tech

David Young             OJC Technologies
dyoung at ojctech.com      Engineering from the Right Brain
                        Urbana, IL * (217) 278-3933

More information about the Soekris-tech mailing list