From owner-freebsd-questions@FreeBSD.ORG Thu Sep 4 17:43:46 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 037CEAB9 for ; Thu, 4 Sep 2014 17:43:46 +0000 (UTC) Received: from blue.qeng-ho.org (blue.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF361CCA for ; Thu, 4 Sep 2014 17:43:45 +0000 (UTC) Received: from fileserver.home.qeng-ho.org (localhost [127.0.0.1]) by fileserver.home.qeng-ho.org (8.14.7/8.14.5) with ESMTP id s84HE5e0001499; Thu, 4 Sep 2014 18:14:05 +0100 (BST) (envelope-from freebsd@qeng-ho.org) Message-ID: <54089DDD.1040203@qeng-ho.org> Date: Thu, 04 Sep 2014 18:14:05 +0100 From: Arthur Chance User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Victor Sudakov , freebsd-questions@freebsd.org Subject: Re: /etc on a separate filesystem ? References: <20140904150739.GA42707@admin.sibptus.tomsk.ru> In-Reply-To: <20140904150739.GA42707@admin.sibptus.tomsk.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:43:46 -0000 On 04/09/2014 16:07, Victor Sudakov wrote: > Colleagues, > > Is it possible to keep /etc on a separate filesystem? > Lots of people have already pointed out that /etc/fstab is need to mount all file systems other than /. However, the answer is actually yes, if you are prepared to do a bit of work, and you can do it within the standard FBSD framework. nanobsd is an example of this, as is pfSense (or at least the embedded version I run). The magic happens by creating /etc/diskless, which causes /etc/rc to source /etc/initdiskless before doing any other rc work. This was intended for diskless machines which mount their file systems via NFS, but can be (ab)used for other purposes. I suggest you take a look at /etc/initdiskless, which has documentation as a comment near the beginning, and possibly /usr/src/tools/tools/nanobsd/nanobsd.sh which builds FBSD for appliances. Be warned that this isn't something for the inexperienced user.