From owner-freebsd-questions@FreeBSD.ORG Sun Oct 4 13:37:40 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34F4106566B for ; Sun, 4 Oct 2009 13:37:40 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from smtp.mel.people.net.au (smtp.mel.people.net.au [218.214.17.98]) by mx1.freebsd.org (Postfix) with SMTP id 38AA28FC14 for ; Sun, 4 Oct 2009 13:37:39 +0000 (UTC) Received: (qmail 9940 invoked from network); 4 Oct 2009 13:37:24 -0000 Received: from unknown (HELO smtp.phoenix) (218.215.179.179) by smtp.mel.people.net.au with SMTP; 4 Oct 2009 13:37:24 -0000 Received: by smtp.phoenix (Postfix, from userid 1001) id 87E6F170D6; Mon, 5 Oct 2009 00:37:37 +1100 (EST) Date: Mon, 5 Oct 2009 00:37:37 +1100 From: andrew clarke To: herbert langhans Message-ID: <20091004133737.GA63827@ozzmosis.com> References: <20091004131504.GB1406@sandcat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091004131504.GB1406@sandcat> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-questions@freebsd.org Subject: Re: Deleting the kernel source - just with #rm? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 13:37:41 -0000 On Sun 2009-10-04 15:15:05 UTC+0200, herbert langhans (herbert.raimund@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