[comp.os.minix] Minix boot block kinda wrong on PCs

Leisner.Henr@xerox.com (Marty) (08/06/89)

Trying to bring up Minix on a sun386i in DOS emulation mode, I discovered a
subtle problem with the Minix boot block.

Seems like the last word of the bootblock should be 0xaa55 -- the sun386i
BIOS (a phoenix bios?) is the only machine I've seen so far which checks
it.

I've checked a number of references -- most don't mention the 0xaa55 but
the DOS 
sys command definitely puts it there.

What I did was move down the 4 magic words one word and slot the 0xaa55 in
there in build.  Has anyone else had this problem (Well, I haven't yet
booted Minix on the sun 386i but at least I was able to run fsck of the
boot disk).

I'm going to probably have to build a kernel with the BIOS driver to run on
the sun386i hard disk emulation.

[Diffs are against v1.3b].

mlsun% diff ../version1.3b/disk4/tools/IBM_PC/bootblok.s bootblok.s
21a22
> | Modified with the above values moved down 1 word
28,31c29,32
< final   = 504
< fsck_ds = 506
< fsck_pc = 508
< fsck_cs = 510
---
> final   = 502
> fsck_ds = 504
> fsck_pc = 506
> fsck_cs = 508

mlsun% diff ../version1.3b/disk4/tools/build.c build.c
347,350c347,352
<   ubuf[(SECTOR_SIZE/2) - 4] = sectrs + 1;
<   ubuf[(SECTOR_SIZE/2) - 3] = ds;
<   ubuf[(SECTOR_SIZE/2) - 2] = ip;
<   ubuf[(SECTOR_SIZE/2) - 1] = cs;
---
> /* changed for sun -- everything shifted one and aa55 added at end */
>   ubuf[(SECTOR_SIZE/2) - 5] = sectrs + 1;
>   ubuf[(SECTOR_SIZE/2) - 4] = ds;
>   ubuf[(SECTOR_SIZE/2) - 3] = ip;
>   ubuf[(SECTOR_SIZE/2) - 2] = cs;
>   ubuf[(SECTOR_SIZE/2) - 1] = 0xaa55;
 
marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  leisner:wbst139:xerox
UUCP:	hplabs!arisia!leisner