Subject: Re: Booting a net4501 with a dumb CF card
To: David Laight <>
From: None <>
List: current-users
Date: 07/25/2003 10:16:44
On Fri, Jul 25, 2003 at 08:47:10AM +0100, David Laight wrote:
> On Fri, Jul 25, 2003 at 06:20:46AM +0200, Quentin Garnier wrote:
> > Hi,
> > 
> > I've finally managed to boot my brand new net4501 box from the (poor) CF
> > card I bought.
> > 
> > First I had some geometry issues, but those were easy to solve.
> > 
> > Then I was hit by the issue (often described in soekris-tech apparently)
> > of the impossibility of reading more than one sector at a time through INT
> > 13h on the CF card.
> Send the CF card and/or BIOS back to the manufacturer.

Yeah, right :)

Anyway, it works now. I'm not complaining. Besides, I must say the new
bootblocks are neat. Thanks for that.

> CF cards do (at least the ones I've used did) support read commands
> for more than one sector, so it is probably a BIOS bug.

Probably, since NetBSD has no problem after that to read and write the
CF card.

> The CF cards I used didn't support 'read multiple' (or rather they
> reported a maximum sector count for it of one), but that has nothing
> to do with the ability of the card to return more than one sector
> in a single read operation - there are just separate data transfers
> for each sector.  Indeed NetBSD probably does multi-sector reads.

Before I added the loop, INT 13h returned an error. I haven't
bothered to check what was in %ah.

> IIRC there isn't much space in pbr.S - someone claimed it was 3 bytes
> too big anyway - so some code would have to be removed in order to
> fit the loop in.  The code that checks whether the BIOS supports
> LBA reads is a prime candidate (the pbr code must have been read using
> BIOS reads...)

Mmm. Do the PBR suffers the same limitation as the MBR? I mean, does it
have to leave space for a partition table? There's already plenty of
space lost with parameter block.

Including my patch, and under normal building circumstances (TERSE_ERROR
is not defined, nor is NO_LBA_CHECK. MESSAGE_PAUSE is not either, but I
guess that's the default.), the code ends at 0x1d2. Why would that be
too large?

Quentin Garnier.