From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 24 18:32:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7FEA816A403 for ; Fri, 24 Nov 2006 18:32:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6979143D67 for ; Fri, 24 Nov 2006 18:32:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kAOIVoRw041217; Fri, 24 Nov 2006 11:31:50 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 24 Nov 2006 11:32:34 -0700 (MST) Message-Id: <20061124.113234.-2101771679.imp@bsdimp.com> To: aag.lists@gmail.com From: "M. Warner Losh" In-Reply-To: <2f3a439f0611142305n441d3adwf7738ae40f9103e3@mail.gmail.com> References: <2f3a439f0611142305n441d3adwf7738ae40f9103e3@mail.gmail.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 24 Nov 2006 11:31:50 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Ramdisk support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2006 18:32:49 -0000 In message: <2f3a439f0611142305n441d3adwf7738ae40f9103e3@mail.gmail.com> "Aditya Godbole" writes: : Is there any ramdisk support in freebsd, as there is in netbsd? If : there is no such functionality right now, is anyone working on it? : What are the alternatives if I want to mount a root filesytem from ram? mdconfig will create one at run time. If you want to compile it into the kernel, then you need to create your image (mine is for an ARM, and I call my image ARM-MD). You then need the following config options: options MD_ROOT #MD is a potential root device options MD_ROOT_SIZE=8192 # 8MB ram disk makeoptions MFS_IMAGE=/home/imp/ARM-MD options ROOTDEVNAME=\"ufs:md0\" in your kernel. This is for -current. I'm unsure if the MFS_IMAGE stuff has been MFC'd or not. If not, then you'll need to perform the following steps after you build the kernel to add the image: @dd if="${MFS_IMAGE}" ibs=8192 of="${KERNEL_KO}" \ obs=`strings -at d "${KERNEL_KO}" | \ grep "MFS Filesystem goes here" | awk '{print $$1}'` \ oseek=1 conv=notrunc 2>/dev/null && \ strings ${KERNEL_KO} | \ grep 'MFS Filesystem had better STOP here' > /dev/null || \ (rm ${KERNEL_KO} && echo 'MFS image too large' && false) where KERNEL_KO is typically 'kernel'. Warner