Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Apr 2003 09:28:06 -0500
From:      Mike Meyer <mwm-dated-1051194487.705ba5@mired.org>
To:        =?iso-8859-1?q?Paul=20Jansen?= <vlaero@yahoo.com.au>
Cc:        questions@freebsd.org
Subject:   Re: compiling kernel for another machine then installing - how?
Message-ID:  <16033.23798.356601.919618@guru.mired.org>
In-Reply-To: <20030419053455.63747.qmail@web40109.mail.yahoo.com>
References:  <20030419053455.63747.qmail@web40109.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In <20030419053455.63747.qmail@web40109.mail.yahoo.com>, Paul Jansen <vlaero@yahoo.com.au> typed:
> I've also looked in the handbook but it doesn't
> discuss this issue.
> Basically I've got a slow machine and a much faster
> machine.  I wanted to compile the kernel for the
> slower machine on the faster one to save a lot of
> time.  I've followed the directions in the handbook to
> compile a kernel as normal but I'm not sure exactly
> what I need to copy and where.  Is it easier to NFS
> mount to do this?  I tried and ran into some pathing
> issues.
> Can anyone help?

What you need to copy depends on which version of FreeBSD you are
running. With 4.x, you need to get /kernel and the contents of
/modules into place. With 5-whatever, you just need the contents of
/boot/kernel.

For 4.x, if you are just building a custom kernel for a system that is
already running from the sources you started with, you can copy either
/usr/src/sys/compile/CONFIGNAME/kernel (traditional kernel build
methodology) or /usr/obj/usr/src/sys/CONFIGNAME/kernel (make
buildkernele methodology) over, and use the /modules that is already
installed.

If you need to install /modules, it's probably easiest to NFS-mount
the /usr/src and /usr/obj on the target system and do a "make
install". The trick here is that you have to mount /usr/src with the
same path name as it has on the fast system, as that path name is used
in the object tree. So if it's really /usr/src on your fast system,
mount it as /usr/src on the slow one. If it's really in
/my/scratch/disk/freebsd/src and /usr/src is a symlink to that, you
have to mount it as /my/scratch/disk/freebsd/src on the slow system,
and create the symlink if you want. /usr/obj doesn't have that
requirement, but I do it the same way anyway.

The only way I know of to do this for 5.0 is the NFS-mount and
install, but I haven't really gotten into 5.0.

	<mike
-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16033.23798.356601.919618>