The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

compiling a kernel on another machine 19 March 1999
Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles
See also Build world on your fast box, install on your slow box, which also covers kernel building.

One machine can compile a single kernel and distribute it to other machines if all machines contain the same version of the operating system.  For instructions on how to create a new kernel, refer to the Configuring the FreeBSD Kernel section in the FreeBSD handbook.  Pay special attention to the section on Building and Installing a Custom Kernel.

Why do this?
Why would you want to compile a kernel on one machine and copy it to another?   Well, perhaps the machine in question has very little disk space and can't take the sources.  Or it's a slow box, and it would take hours to compile a kernel.  In my case, it's the space.  I had just installed the system on a Windows 95 machine, and there wasn't much space.  So I used another machine.
How to do this
Basically, you do the same as you would for any custom kernel.  I named the kernel after the name of the machine.  See Building and Installing a Custom Kernel for details.

After compiling the kernel, I used FTP to transfer it from one machine to the other.   Then I did the following:

cd /
chflags noschg kernel
cp kernel kernel.old
cp /var/ftp/incoming/kernel kernel
chflags schg kernel
shutdown -r now

The above will copy the old kernel out and copy the new kernel in.  It also reboots the machine.

Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles