From owner-freebsd-questions@FreeBSD.ORG Sun Jun 14 16:30:37 2015 Return-Path: Delivered-To: freebsd-questions@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F8D27EC for ; Sun, 14 Jun 2015 16:30:37 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6CB0379 for ; Sun, 14 Jun 2015 16:30:36 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-111-193.dynamic.qsc.de [92.195.111.193]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 291722517E; Sun, 14 Jun 2015 18:24:18 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t5EGOI2s002066; Sun, 14 Jun 2015 18:24:18 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 14 Jun 2015 18:24:18 +0200 From: Polytropon To: tak.official@gmail.com Cc: FreeBSD Questions Subject: Re: reload kernel without reboot? Message-Id: <20150614182418.56857acc.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 16:30:37 -0000 On Sun, 14 Jun 2015 13:24:59 +0430, takCoder wrote: > my question is: Is there a way to reload freebsd kernel in which i don't > need to restart to apply the changes? Probably not, because the kernel is the first thing the OS boot mechanism will load, and this is required at the earliest stage of OS booting for the kernel to work as intended. What you would need is to change the kernel binary content (after source change and compile run) both on disk and in memory, with all its location references and dependency resolutions so the result parts will work consistently again. I'd say that's a very hard task, nearly impossible. However, if you are able to move the things you want to "dynamically load and unload" into kernel modules - there might be a solution for you. Kernel modules can be dealt with easily using kldload and kldunload. However, the kernel itself cannot be unloaded and reloaded with those tools. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...