Subject: Re: What kernel am I using?
To: Andy Ruhl <acruhl@gmail.com>
From: John Hauser <jhauser@pobox.com>
List: port-cobalt
Date: 07/14/2004 14:56:31
Andy Ruhl wrote:

> I had mentioned this before, but I'm having this problem:
> 
> login: andy
> Password:
> Last login: Wed Jul 14 21:07:31 2004 from 192.168.1.254
> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
>         The NetBSD Foundation, Inc.  All rights reserved.
> Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
>         The Regents of the University of California.  All rights reserved.
> 
> NetBSD 1.6.1 (GENERIC) #0: Thu Jun 26 22:22:53 CEST 2003
> 
> Welcome to NetBSD!
> 
> (andy@taz)[/home/andy] > uname -a
> NetBSD taz.andy.com 1.6.2_STABLE NetBSD 1.6.2_STABLE (TAZ1) #0: Wed Jul 14 12:5t
> (andy@taz)[/home/andy] >
> 
> I'm thinking this might have something to do with having to have
> kernels in 2 places, one in the linux /boot partition, and the other
> in the netbsd / partition. The dmesg states that I'm booting this TAZ1
> kernel, so I know that's the one I'm running. Why does the login
> report 1.6.1 (GENERIC)?
> 
> Also, what actual files to I need in the linux /boot directory? I'm
> seeing all kinds of .gz stuff, but I believe all I need is the
> netbsd.gz file right?
> 

from the Netbsd/cobalt faq:
<http://www.netbsd.org/Ports/cobalt/faq.html#kernel>

How do I prepare the harddisk for installing NetBSD? (top)
<snip>


     The final step is to create a bootable kernel in the right place. 
For that, we compress the kernel from the "kern" set, and put it on the 
Linux root dir. Setting up an entry in (/mnt)/etc/fstab to do so is 
recommended:

	/dev/wd0e /altroot ext2fs rw 0 1

     With that line in (/mnt)/etc/fstab, we can mount the Linux root 
partition, and drop our kernel in the expected place:

	mount /altroot
	cd /altroot/boot
	mv vmlinux.gz vmlinux.gz.linux
	cp /netbsd vmlinux
	gzip -v9 vmlinux

     Note that the kernel needs to be present (and in sync!) in the 
following places:

         * /netbsd: tools like netstat want that
         * /altroot/boot/vmlinux.gz: booted by the Cobalt firmware

     After these steps, the firmware should be able to find the kernel 
and boot it:

	reboot