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/12/2002 14:08:02
> In any case:
> Error '3' means it failed to find 0xaa55 in the last word of the
> sector it read from the disk. This is the only sanity check it
> does on the read sector before executing the code from it.
> You might have a BIOS that doesn't like LBA disk reads?
> The bootselect code doesn't have the space to do as much LBA/CHS
> checking as do the other bootstraps.
> If does have an option (settable by fdisk) to use CHS reads instead
> of LBA ones. But I don't recall seeing the code in fdisk to set it.
> Set the byte (maybe offset 0x195) that enables the bootselector to 0x03.
I've just checked the sources.
fdisk will set the 0x02 bit to indicate that LBA reads must be used.
It will never clear it though.
If you can boot netbsd at all, you can dump out the mbr eg:
# dd if=/dev/wd0d count=1|hexdump -C
I get:
00000000 66 31 c0 8e d0 bc 00 7c 00 00 8e c0 8e d8 31 f6
|f1.....|......1.|
... code deleted, yours won't match anyway!
00000190 00 00 00 00 3b 03 f8 7f 4e 65 74 42 53 44 00 00
|....;...NetBSD..|
000001a0 00 57 69 6e 39 38 00 00 00 00 4e 65 74 42 73 64
|.Win98....NetBsd|
000001b0 20 74 00 00 65 74 42 53 44 20 74 00 55 aa 80 00 | t..etBSD
t.U...|
000001c0 41 06 a9 fe ff 09 86 39 40 00 04 7d 7e 00 00 01
|A......9@..}~...|
000001d0 01 00 0b fe 7f 05 3f 00 00 00 47 39 40 00 00 fe
|......?...G9@...|
000001e0 ff fe a9 fe ff fe e8 25 f0 01 d0 b3 72 00 00 00
|.......%....r...|
000001f0 c1 0a 0f fe ff fe 8a b6 be 00 5e 6f 31 01 55 aa
|..........^o1.U.|
0x194 is the default keypress (0x3b might be enter => default ptn)
0x195 is the flags, 0x01 => active, 0x02 => force LBA
0x196/7 is timeout in bios ticks
Then 4 entries of 9 bytes for the names of ptns 1-4
0x1bc is a magic marker
Then 4 entries of 16 bytes for each partition
It may be worth dumping out the expected first sector of your netbsd
partition:
# dd if=/dev/wd0d skip=4209030 count=1|hexdump -C
00000000 eb 01 90 66 ea 25 00 00 00 c0 07 00 00 00 00 00
|...f.%..........|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|................|
00000020 00 00 00 00 00 8c c8 8e d8 66 b8 00 10 00 00 8e
|.........f......|
00000030 d0 66 bc fc ff 00 00 8e c0 80 fa 80 73 16 b4 00
|.f..........s...|
00000040 cd 13 66 b9 01 00 00 00 b6 00 b2 00 66 31 f6 e9
|..f.........f1..|
00000050 f9 00 00 00 b8 01 02 00 00 31 db b9 01 00 00 00
|.........1......|
(yours might not match lowere down...)
David