Subject: Re: strange bootmenu entries
To: None <port-i386@netbsd.org>
From: Jukka Salmi <jukka-netbsd@2004.salmi.ch>
List: port-i386
Date: 06/07/2004 12:29:31
David Laight --> port-i386 (2004-06-04 17:34:13 +0100):
[...]
> Clearly fdisk could do some validation on the 'printability' of the menu
> strings.
[...]

That would trap some more cases, but e.g. the bootmenu entry of my MBR
partition 0 contains a printable, NULL terminated string ("Error") which
was written by GRUB...


David Laight --> port-i386 (2004-06-05 14:07:23 +0100):
> > What about checking if the bootselector is active before printing bootmenu
> > entries (see attached patch)? Would make sense AFAICT.
> 
> That only traps half of the cases when the code has been changed.
> (ie those where that bit is clear...)

True, but those 50% are 100% correct ;-) I.e. if MBR_BS_ACTIVE is not set
the menu entries should never be printed, right? Should I send-pr the patch?


What I don't understand: why does the normal boot code have MBR_BS_MAGIC
set at MBR_BS_MAGIC_OFFSET?

$ hexdump -s 444 -n 2 /usr/mdec/mbr         
00001bc b5e1                                   
00001be


Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~