compiling kernel for another machine then installing - how?
mwm-dated-1051194487.705ba5 at mired.org
Sat Apr 19 07:28:09 PDT 2003
In <20030419053455.63747.qmail at web40109.mail.yahoo.com>, Paul Jansen <vlaero at 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
> 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
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
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 Meyer <mwm at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
More information about the freebsd-questions