From owner-freebsd-questions@FreeBSD.ORG Sat Jan 31 06:09:13 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 4BBA516A4CE for ; Sat, 31 Jan 2004 06:09:13 -0800 (PST) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1168C43D2D for ; Sat, 31 Jan 2004 06:09:12 -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 69B9540823 for ; Sat, 31 Jan 2004 15:08:33 +0100 (CET) From: Cordula's Web To: freebsd-questions@freebsd.org X-Mailer: Emacs-21.3.1/FreeBSD-4.9-STABLE Message-Id: <20040131140833.69B9540823@fw.farid-hajji.net> Date: Sat, 31 Jan 2004 15:08:33 +0100 (CET) Subject: 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 14:09:13 -0000 Hello, 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 won't need paging, because there'll be enough ram for everything (ramdisk, kernel and userland). Now the questions are: * How to "attach" the root filesystem to the ram disk? Can this be done only through pxe/netboot before the kernel starts, or is there some kind of system call that can transfer root on a running system? * How to power off (and on) the hdd (both for ATA and SCSI)? * Will the power consumption decrease (no hdd) or will it increase (more ram)? Anybody measured this before with regular diskless machines? Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/