Subject: Re: port-i386/17549: fdisk boot selector problem
To: Norm <>
From: David Laight <>
List: netbsd-bugs
Date: 07/13/2002 14:20:33
> >Synopsis:       NetBSD's fdisk doesn't allow multiple Microsoft OS's
> 	However, when adding a second copy of Windows 2k, I find the NetBSD
> 	boot selector doesn't hide the partitions that aren't active when 
> 	booting.  This is fine for a single Microsoft OS & NetBSD.  However,
> 	Microsoft OS installations will get horrendously confused if multiple 
> 	NTFS/FAT primary partitions are visible.

I'd suggest you transfer this request to Microsoft!
After all it is their problem :-)
> 	If not the default, an option to hide the partitions of non-active
> 	primary partitions would be nice in future, so I could use the
> 	NetBSD boot manager, rather than a commercial product.

To do this you actually have to delete the unwanted partition as
part of the boot process.   There just isn't space in the bootselector
code to do anything of that nature - the whole thing sits in 450 bytes.

The underlying problem is that the partition number isn't passed
up between the layers of bootstrap so that when the O/S starts
it just searches through the partition table looking for a partition
of the correct type (or a suitable type) and assumes that it the
'root' filesystem.

So although the mbr_bootsel code will read the next layer bootstrap
from the first sector of the requested partition, the loaded code
cannot tell which partition the user was trying to boot.
Quite possibly the OS does the same again.

FWIW I'm running a system that can boot two distict copies of NetBSD
off the same disk - but that involved changes to all 3 layers of
bootstrap code (mbr, pbr and kernel startup).


David Laight: