From owner-freebsd-questions@FreeBSD.ORG Sat Jan 31 10:54:43 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 5B9EF16A4CE; Sat, 31 Jan 2004 10:54:43 -0800 (PST) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ED3D43D39; Sat, 31 Jan 2004 10:54:41 -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 F120040824; Sat, 31 Jan 2004 19:54:02 +0100 (CET) From: Cordula's Web To: bjorn@eikeland.info In-reply-to: (message from Bjorn Eikeland on Sat, 31 Jan 2004 15:29:22 +0100) X-Mailer: Emacs-21.3.1/FreeBSD-4.9-STABLE References: <20040131140833.69B9540823@fw.farid-hajji.net> Message-Id: <20040131185402.F120040824@fw.farid-hajji.net> Date: Sat, 31 Jan 2004 19:54:02 +0100 (CET) cc: freebsd-multimedia@freebsd.org 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: Sat, 31 Jan 2004 18:54:43 -0000 > > in an attempt to save power on FreeBSD servers, I'm > > trying to replace the hdd with a ramdisk. The idea is to: > > > > 1. boot from the hdd (or netboot from an NFS server) > > 2. configure a ram disk (md(4)) > > 3. copy everything that's needed to ram disk > > 4. transfer kernel root to ramdisk (*) > > 5. turn off the hdd (**) > > > > (*) is the hairy question. > > (**) How can that be done? > > I'm probably in over my head here, but; > chroot should change the root filesystem for you. > (look in the manpages for more details) Nope, chroot(2) affects only the calling process, not the whole system. > As for powering down the hdd I did find a page for this, > but havent had time to play with it yet: > http://www.cran.org.uk/bruce/software.php ATAidle is great. Just tried it successfully on a 5.2-RELEASE with two drives. powering down the inactive drive (not the one with swap and root-fs) is possible this way. Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/