Subject: Re: strange bootmenu entries
To: None <port-i386@netbsd.org>
From: Luke Mewburn <lukem@NetBSD.org>
List: port-i386
Date: 06/07/2004 23:14:15
--KZLWU/9q3evlN4nQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 07, 2004 at 12:29:31PM +0200, Jukka Salmi wrote:
  | David Laight --> port-i386 (2004-06-04 17:34:13 +0100):
  | [...]
  | > Clearly fdisk could do some validation on the 'printability' of the m=
enu
  | > strings.
  | [...]
  |=20
  | 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...
  |=20
  |=20
  | David Laight --> port-i386 (2004-06-05 14:07:23 +0100):
  | > > What about checking if the bootselector is active before printing b=
ootmenu
  | > > entries (see attached patch)? Would make sense AFAICT.
  | >=20
  | > That only traps half of the cases when the code has been changed.
  | > (ie those where that bit is clear...)
  |=20
  | True, but those 50% are 100% correct ;-) I.e. if MBR_BS_ACTIVE is not s=
et
  | the menu entries should never be printed, right? Should I send-pr the p=
atch?
  |=20
  |=20
  | What I don't understand: why does the normal boot code have MBR_BS_MAGIC
  | set at MBR_BS_MAGIC_OFFSET?
  |=20
  | $ hexdump -s 444 -n 2 /usr/mdec/mbr        =20
  | 00001bc b5e1                                  =20
  | 00001be


It didn't when I recently rototilled the code, but it was added
back in by David.  Given he knows more about the boot blocks
than I do, I defer to his knowledge ...

--KZLWU/9q3evlN4nQ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAxGonpBhtmn8zJHIRAjMVAKCZsmD1oSmWHeDjU4AhX6HnNz7VFQCfVvkJ
mVgQ5VT44CUN11W36HC3sw0=
=P2qw
-----END PGP SIGNATURE-----

--KZLWU/9q3evlN4nQ--