Deleting the kernel source - just with #rm?

andrew clarke mail at ozzmosis.com
Sun Oct 4 13:37:41 UTC 2009


On Sun 2009-10-04 15:15:05 UTC+0200, herbert langhans (herbert.raimund at gmx.net) wrote:

> I just compiled a nice, slim kernel on my laptop, but I dont want to
> carry all the kernel sources around there.
>
> Is it ok just to #rm the content of the /usr/src directory? And will I
> get it completely back from sysinstall or the FreeBSD-servers? Or is
> there a more elegant solution on FreeBSD?

This should be fine.

Since you've built a custom kernel you may want to keep a copy of
your kernel build config ("LINT") file, eg. /usr/src/sys/i386/conf/HOSTNAME.

Note that you can't use freebsd-update to patch a custom (non-GENERIC)
kernel.

You can restore the kernel source code by extracting the ssys.??
binaries (normally found in the /src/ directory, eg.
ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/src/ )
using install.sh (found in the same directory).  Probably also with
sysinstall, but I don't recall the steps to do that.

Regards
Andrew


More information about the freebsd-questions mailing list