Subject: Re: compling mbr for boot from wd1?
To: Scott Presnell <srp@tworoads.net>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 09/01/2005 22:26:39
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!

	David

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