On 5/29/06, Rudi Ludwig <rudihl gmx.de> wrote:
>
> Hello,
Hi,
>
> in a multi-boot setup I need to boot NetBSD i386
> with grub. With some google-search I found the
> grub docu but I couldn't figure the complete lines.
>
There has been a bit of a discussion about this the last
couple of
days on netbsd-current list - check gmane if you want to
have a look.
This is my menu.lst file (the first four lines do not work
with the
version of grub from pkgsrc - they are from a Solaris setup,
but don't
cause trouble here):
+++++++++++++++++++++++
splashimage /grub/os-boot.xpm
foreground = 5381a1
background = e0e0e0
color light-gray/blue black/light-gray
default 2
timeout 10
title W2K
rootnoverify (hd0,1)
makeactive
chainloader +1
boot
title NetBSD-chain
root (hd0,2,a) # NetBSD on 3rd MBR partition of 1st
IDE disk
chainloader +1
title NetBSD
root (hd0,2,a)
kernel /netbsd console=pc root=wd0a
title NetBSD-noMB
root (hd0,2,a)
kernel --type=netbsd /m0 console=pc root=wd0a
title NetBSD-single
root (hd0,2,a)
kernel /netbsd -s console=pc root=wd0a
title NetBSD-conf
root (hd0,2,a)
kernel /netbsd -c console=pc root=wd0a
title NetBSD-old
root (hd0,2,a)
kernel /onetbsd -c console=pc root=wd0a
title Setup GRUB
root (hd0,0)
setup (hd0)
-------------------------------------------------
> What I got so far: grub finds the kernel, the kernel
> goes through the hw but then falls kind of helpless
> and asks for
>
> - root-device
> - dump-device
> - file system
> - init-path (/sbin/init)
You get this, if you have kernel --type=netbsd, as in my
entry No.3 .
The parameters do not get passed if MULTIBOOT is disabled in
the
kernel.
The easiest is to use the entry No.1 - chainload. The NetBSD
kernel
does not have any knowledge about grub.
My default entry, as you can see, happens to be No.2 - this
requires
options MULTIBOOT # Multiboot support (see
multiboot(8))
options MULTIBOOT_SYMTAB_SPACE=1048576
in the kernel, you get:
...
NetBSD 3.99.20 (M0) #2: Sat May 27 00:54:24 BST 2006
root maggie:/usr/src/sys/arch/i386/compile/M0
multiboot: Information structure flags: 0x000007e7
multiboot: Boot loader: GNU GRUB 0.97
multiboot: Command line: /netbsd console=pc root=wd0a
multiboot: 638 KB lower memory, 523200 KB upper memory
total memory = 511 MB
avail memory = 495 MB
...
multiboot messages, but unfortunately there may be some side
effects -
as happened to me a few days ago - if the kernel had
'pseudo-device
ksyms', then netstat would not work. (One certainly could
ask more
questions as to what else doesn't work...)
>
> I can enter these all manually and NetBSD finally comes
> up correctly. Has anyone the complete lines for
> grub to automate this and make it simply work?
I guess, use chainloader.
>
>
> Rudi
>
>
>
Chavdar
|