Subject: Re: re-installing bootselector ?
To: None <hubert@feyrer.de>
From: Alan Barrett <apb@cequrux.com>
List: port-i386
Date: 04/25/2001 09:39:52
> On 2001.04.24 21:00, hubert@feyrer.de wrote:
> > Now when I boot up the disk, I get to the boot selector, where I press F2
> > for NetBSD, all it prints is "3", then stalls. I can still press num-lock
> > and Ctl-Alt-Del, but it's not booting NetBSD. What is the problem here?

mbr_bootsel's error 3 is:

#define ERR_NOOS        '3'      /* Magic no. check failed for part. */

That means that the boot loader thinks that the first sector of the
partition to be booted does not contain 0x55, 0xAA as the last two
bytes.

> > miyu# fdisk wd0
> > NetBSD disklabel disk geometry:
> > cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)
> > 
> > BIOS disk geometry:
> > cylinders: 1024 heads: 240 sectors/track: 63 (15120 sectors/cylinder)

Geometry mismatch could be the cause of the trouble.  Some things
during the boot process use head/cylinder/sector addressing, while
other things use flat sector addressing.

Try telling both BIOS and NetBSD to use the same geometry (the
geometry that the BIOS refers to as "LBA" is usually best).

> > Partition table:
> > 0: sysid 12 (Primary DOS with 32 bit FAT - LBA)
> >     start 63, size 10240000 (5000 MB), flag 0x80
> >         beg: cylinder    0, head   1, sector  1
> >         end: cylinder  637, head 105, sector 43
> > 1: sysid 169 (NetBSD)
> >     start 10240063, size 28862084 (14092 MB), flag 0x0
> >         beg: cylinder  637, head 105, sector 44
> >         end: cylinder 1023, head 254, sector 63
> > 2: <UNUSED>
> > 3: <UNUSED>
> 
> Shouldn't Partition 1 be activated, instead of 0?

No, that's not it.  mbr_bootsel usually ignores the 0x80 flag inside
the partition table.

--apb (Alan Barrett)