Subject: Re: Compaq diagnostic partition Vs Bootselector
To: None <port-i386@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 01/13/2002 12:19:47
Andy Ball wrote:
> 
> Hello David,
> 
>   DL> Error '3' means it failed to find 0xaa55 in the last
>     > word of the sector it read from the disk.
> 
> Ah, so it's meaningful.  Am I right in thinking that this
> was output from the bootselector?

Yes, one of its few cryptic error messages:
1 -> no active partition (ie ater <enter>)
2 -> disk read failed
3 -> missing magic number from pbr

> 
>   DL> You might have a BIOS that doesn't like LBA disk
>     > reads?
> 
> I'm not even sure that it's using LBA.  The logical geometry
> is something like 2100 cylinders, 16 heads, 63 sectors per
> track.

That is the physical geometry (probably a lie), the BIO geometry has a
max cylinders of 1023
> 
>   DL> If you can boot netbsd at all, you can dump out the
>     > ...mbr eg:
> 
> I could boot the installed NetBSD by booting into the
> bootselector on the install diskette, and telling it to boot
> wd0a:netbsd.

That isn't the bootselecter, that is the netbsd 'boot' program.  It is
loaded out of the netbsd root partition.  It will only load netbsd (r
something very similar). But will do from any disk it knows of.


> Bootselector seems like quite a useful thing to
> have around, I'm wondering whether to install it even on
> machines that are dedicated to NetBSD.

The bootselecter sits completely within the mbr (sector 0), it will
(probbaly) boot most os that will boot from standard mbr code.  Quite
useful if you want to multiboot a system.

I've managed to get the mbr code to dynamically check whether the pbr
sector is within the chs read limit.  (I was finding it rather tricky
last night - not the time of day to be writing mbr code!)

I've added two extra codes:
? -> unknown key press
p -> partition not defined (F1-F4 pressed)

Also allows retry after any error.

Anyone one to do some further tests for me?
(easier to install with my slightly fixed fdisk)

	David