NetBSD Problem Report #13174
Received: (qmail 10124 invoked from network); 12 Jun 2001 09:03:14 -0000
Message-Id: <200106120152.f5C1qAa00369@ian-dsl-1-86.cet.com>
Date: Mon, 11 Jun 2001 18:52:10 -0700 (PDT)
From: ian@ian-dsl-1-86.cet.com
Reply-To: ericksonik@lycos.com
To: gnats-bugs@gnats.netbsd.org
Subject: i386-FAQ booting 2nd disk from NT's boot menu
X-Send-Pr-Version: 3.95
>Number: 13174
>Category: port-i386
>Synopsis: i386-FAQ booting 2nd disk from NT's boot menu
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: port-i386-maintainer
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 12 09:04:00 +0000 2001
>Closed-Date:
>Last-Modified: Sun Sep 10 16:50:01 +0000 2006
>Originator: Ian K. Erickson
>Release: NetBSD 1.5
>Organization:
Cowles Publishing; Spokane, WA
>Environment:
System: NetBSD ian-dsl-1-86 1.5 NetBSD 1.5 (GENERIC) #1: Sun Nov 19 21:42:11 MET 2000 fvdl@sushi:/work/trees/netbsd-1-5/sys/arch/i386/compile/GENERIC i386
It's an ordinary PC with 2 ATA hard drives, 4 gig each. NT4 was installed on
the first disk with the 2nd for file, both NTFS. The second disk was unassigned
its drive letter and reformatted with NetBSD 1.5. So NT is on my wd0, and
NetBSD is installed on wd1.
>Description:
I installed NetBSD 1.5 on my second hard drive. I can only boot into
it with a rescue floppy. My 1st disk has NT4, with an NTFS C:\. The
FAQ implies how to boot NetBSD from a 2nd disk from NT's boot menu,
but the directions are incomplete and don't seem to work.
The i386-FAQ says how to boot
NetBSD from a 2nd partition on NT's boot disk using the menu, but when
it describes how to do it when NetBSD is on the 2nd drive it says
"you have to recompile the boot block and install it ... with some
minor tweaking in /usr/src/sys/arch/i386/boot".
That directory/path doesn't exist in the 1.5 source (I installed all
the ...src.tgz packages in the source directory on ftp.netbsd.org).
It also doesn't really give you a clue how to tweak the files mentioned,
if you found them. I searched the source with grep, but I didn't find
anything like a #define to (un)comment to make the change.
I tried a couple experiments with dd'ing the boot block of rwd1a to
a DOS disk, copying it to my C:\ and adding a line to it in C:\boot.ini
but I got an error like "No NetBSD" that locked the machine solid.
Control-Alt-Delete would not reboot the PC.
>How-To-Repeat:
Take a PC with 2 hard disks (ATA). Install NT on it. Install NetBSD on
the 2nd disk. Try the directions in the i386-FAQ under "Adding NetBSD
to the Windows NT boot menu". Unless you know how to recompile the
bootblock with the source changes alluded to, you need a rescue floppy
to boot back into NetBSD.
>Fix:
The fix hinted at in the FAQ might work (if you knew what to tweak)
but there's an easier fix that should be in the FAQ. I used the free
program BOOTPART.EXE from NT to snag NetBSD's boot block on wd1a to
a file and add a "NetBSD" entry to NT's boot menu (C:\boot.ini).
Now I can boot into NetBSD from NT's boot menu, instead of having to
use the rescue floppy. I didn't try OSBS, but I didn't want a solution
that could comprimise the boot process of NT itself.
Bootpart is at http://www.winimage.com/bootpart.htm
It's "postcard-ware". I guess I owe him a postcard.
Here's what I did (after installing BSD)
- booted into NT
- downloaded bootpart.zip and unzipped it to C:\bootpart\
- opened a command shell
- cd C:\bootpart
- bootpart
- (showed the list of partitions. NT was # 0:, NetBSD was 1:)
- bootpart 1 netbsd "NetBSD 1.5"
- bootpart list
- (shows NetBSD using the new file C:\bootpart\netbsd to load 1:)
C:\boot.ini basically has a line pointing to C:\bootpart\netbsd
NT's boot menu has a "NetBSD 1.5" entry which boots NetBSD.
The FAQ should have this in it since it's so straight-forward. You
might be able to include bootpart.exe in the install utilities. People
new to NetBSD are probably like me going to try it on a 2nd disk.
>Release-Note:
>Audit-Trail:
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: PR/13174 i386-FAQ booting 2nd disk from NT's boot menu
Date: Sun, 10 Sep 2006 17:46:00 +0100
The following should work, but I don't have anything to test it on!
1) Copy the NetBSD partition boot code (probably only the first 512 byes
are needed) to a file. Either by reading the (typically) rwd0a
partition or from /usr/mdec/bootxx_ffsv1 (or equiv).
eg $ dd if=/usr/mdec/bootxx_ffsv1 of=boot_image count=1
2) Overwrite the start with code to setup %dl before jumping over space
reserved for the FAT volume info:
eg $ disk=1
eg $ printf '\xb2\x8'$disk'\xeb\x3a' | dd conv=notrunc of=boot_image
3) Arrange to get the modified file into your windows filesystem for the
windows boot manager to load.
It is also possible to use the NetBSD bootselector to load your windows
install by pressing '1' and press 'F2' to load the mbr of the 2nd disk
and hence the NetBSD kernel (possibly via the bootmenu code).
Although it is worth checking that there is code at the start of your
windows partition before overwriting the mbr.
David
--
David Laight: david@l8s.co.uk
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.