Subject: Re: 1.6.1 installer and GRUB
To: None <MLH@goathill.org>
From: Philippe St-Jacques <h0ho@hotmail.com>
List: port-i386
Date: 02/19/2003 23:56:48
>I had a person approach me with questions about how to install
>NetBSD 1.6.1 (RC2 - releng) on a drive with GRUB installed. He was
>trying to determine boot block options using sysinst. I don't have
>a spare machine to test with and we couldn't determine from the
>installer manual or any of the netbsd.org manuals (or anwhere else
>on the net) precisely what the options are and how to use them with
>sysinst (and I don't dual-boot any of my machines). He said that
>the installer manual glosses over a number of important details.
>
>Does anyone know of a more detailed explanation of how to set up
>NetBSD to work with GRUB? The instructions we found stop at the
>point where he is uncertain.
>
>I read the installer manual several times and I couldn't even
>identify where in the manual it was talking about the options he
>said sysinst presents.  Possibly it would be good to review the
>installer manual and sync it with what sysinst actually does. If
>not in disagreement, possibly it could be worded more clearly.
>
>This is not a problem with GRUB. It's with making sure that the
>NetBSD bootloader is installed in the correct location.
>
>Thanks

Hi, I'll add a bit more information explaining two different ways of booting 
NetBSD with GRUB, depending of your other OS you want to dual boot.

If your configuration matches CASE 1, you can keep the existing GRUB 
installation. When installing NetBSD with Sysinst, just don't install 
bootblocks on the primary/master harddrive. Use normal boot blocks. If your 
configuration matches CASE 2, go to case 2.

Case 1

If the existing OS you want to dual boot is linux or any other *NIX, and has 
the /boot/grub directory with conf files, add the following lines to your 
menu.lst, in the grub installation directory (on the partition where you 
installed grub before). It chainloads the netbsd '/' partition, which has 
bootblocks. Just replace the (hdX,Y,Z) by the actual HD, partition and slice 
of your NetBSD Boot partition.

title NetBSD
root (hd1,3,a)
chainloader +1


Case 2

If the existing OS you want to dual boot is Windows NT, 2k or XP, install 
NetBSD's bootblocks in the MBR. After your NetBSD is setup, you can 'make 
install' grub 0.93 in the sysutils/grub directory of the pkgsrc tree. Create 
the /grub directory and copy all nedded files there from 
/usr/pkg/share/grub, as described in GRUB's documentation.

http://www.gnu.org/manual/grub-0.92/html_mono/grub.html#Installation

Then create/edit the menu.lst with entries for both NetBSD and Windows. Here 
is mine:

  default 0
  timeout 30
  fallback 1

  #title Debian
  #kernel (hd1,1)/linux root=/dev/hdb2 hdc=ide-scsi

  title NetBSD
  root (hd1,3,a)
  chainloader +1

  title M$ Windoze 2k
  root        (hd0,0)
  makeactive
  chainloader +1

As you see, you can just chainload windows NT partition. After you have all 
needed files in /grub, install GRUB like this:

# grub-install --root-directory=/ '(hd0,0)'

I've this configuration on my Desktop since I needed Windows to play 
Starcraft. It works great. I hope I answered your question about dual 
booting NetBSD and another OS with GRUB.

Philippe


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail