Subject: Re: strange bootmenu entries
To: None <port-i386@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 06/04/2004 17:34:13
On Thu, May 27, 2004 at 11:38:38PM +0200, Jukka Salmi wrote:
> Hello,
> 
> on a -current system I was using the normal boot code from /usr/mdec/mbr.
> Now I installed the GRUB boot loader (grub-0.94nb1 from pkgsrc); since
> then fdisk shows strange bootmenu entries:
...
> 1: NetBSD (sysid 169)
>     bootmenu: ?\016?\020?<
>     start 80325, size 14683410 (7170 MB, Cyls 5-919)
...
> As a workaround I zeroed MBR_BS_MAGIC on wd0. But after the next fdisk /
> GRUB install the problem will be back again...

Well, fdisk uses the MBR_BS_MAGIC number (just before the ptn table) to
decide whether the bootcode is the netbsd one.

When you install grub, it seems that it overwrites part of the netbsd
bootmenu table - but not the magic number.
Clearly fdisk could do some validation on the 'printability' of the menu
strings.
Maybe it would have been better if MBR_BS_MAGIC had been placed at the
start of the bootsel info - but I'm not moving it again!

	David

-- 
David Laight: david@l8s.co.uk