Subject: Re: compling mbr for boot from wd1?
To: David Laight <david@l8s.co.uk>
From: Scott Presnell <srp@tworoads.net>
List: netbsd-help
Date: 09/01/2005 14:38:58
David Laight wrote:

> On Thu, Sep 01, 2005 at 02:01:52PM -0700, Scott Presnell wrote:
> 
>>Hi,
>>I'm trying to create a dual boot system with XP on the first drive (wd0)
>>and NetBSD (3.0 beta if it matters) on wd1.  Everything's installed fine, 
>>and I
>>can get from the CD bootloader over to wd1 and boot NetBSD from wd1 no
>>problem. Now I'd like to add an entry to the NT boot menu on wd0.  I've done
>>this successfully when everyone's on the same disk, but not from separate 
>>disks.
>>
>>Under the i386 FAQ entry:
>>
>>
>>>"Adding NetBSD to the Windows NT boot menu"
>>
>>This:
>>
>>
>>>"Please note that if you don't have NetBSD on your first disk, you'll have 
>>
>>to
>>
>>>recompile the bootblock and install it, before you can run the above 
>>
>>command.
>>
>>>(For the recompiling you need some minor tweaking in
>>>/usr/src/sys/arch/i386/boot)."
>>
>>would seem to indicate that I need to compile a custom mbr in 
>>/usr/src/sys/arch/i386/stand/mbr.
>>
>>but I don't know/understand what change to make to mbr.S  If someone could
>>clue me into what change to make I would appreciate it.
> 
> 
> The only thing I can think of is that the windows booter fails to set %dl
> to the drive number (0x81) when you want it to boot the second disk.
> 
> So something like:
> 
> $ printf '\x90\x90\xb2\x81' | dd of=/usr/mdec/mbr bs=1 seek=34 conv=notrunc
> 
> might just do the trick!
> 
Thanks, but that didn't work.  BTW, the error message is always
"Error No active partition"  but indeed the hd1/wd1 0th partition
is marked active and is type 169 as shown by NetBSD's fdisk.
Other suggestions?

	Thanks much.

	- Scott