From owner-freebsd-questions@FreeBSD.ORG Tue Feb 3 08:06:30 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AEFB16A4CE for ; Tue, 3 Feb 2004 08:06:30 -0800 (PST) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FC7B43D4C for ; Tue, 3 Feb 2004 08:06:25 -0800 (PST) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (localhost [127.0.0.1]) by fw.farid-hajji.net (Postfix) with ESMTP id D59F740827; Tue, 3 Feb 2004 17:05:46 +0100 (CET) From: Cordula's Web To: cpghost@cordula.ws In-reply-to: <20040131140833.69B9540823@fw.farid-hajji.net> (message from Cordula's Web on Sat, 31 Jan 2004 15:08:33 +0100 (CET)) X-Mailer: Emacs-21.3.1/FreeBSD-4.9-STABLE References: <20040131140833.69B9540823@fw.farid-hajji.net> Message-Id: <20040203160546.D59F740827@fw.farid-hajji.net> Date: Tue, 3 Feb 2004 17:05:46 +0100 (CET) cc: freebsd-questions@freebsd.org Subject: Re: Transferring the root filesystem to a ramdisk? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: cpghost@cordula.ws List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 16:06:30 -0000 > in an attempt to save power on FreeBSD servers, I'm > trying to replace the hdd with a ramdisk. The idea is to: Thanks to all who helped, on and off-list. To sum up: * Spin down and up of ATA devices: /usr/ports/sysutils/ataidle or SCSI devices: camcontrol {start | stop} device * Changing the root device of an already running kernel is very hard, and should be avoided at all costs. (A suggestion was to modify loader(8), and have the kernel use a chunk of pre-loaded memory as initial root device a.k.a. md(4). However, this would involve a _lot_ of work.) * /sbin/init could chroot() to the new root device. (This is possible, but requires easy access to the underlying root fs where init was originally located. => disk must spin up on request, so it can't be completely turned off.) * diskless(8) is possible, though only when connectivity is available. Since our intended use is to embed FreeBSD in moving robots that are connected with each other through an ad hoc mobile network, where the radio links are both intermittent and low-bandwidth; and since the systems are not always well connected or reachable, diskless(8) is not a solution. We've finally decided to use flash ram for the root device, and avoid the complete issue of moving root. Thanks again for all the help and insights. -cpghost. -- Cordula's Web. http://www.cordula.ws/