From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 4 20:18:56 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE74F1065679 for ; Sat, 4 Apr 2009 20:18:55 +0000 (UTC) (envelope-from anti_spamsys@yahoo.com) Received: from web37106.mail.mud.yahoo.com (web37106.mail.mud.yahoo.com [209.191.85.108]) by mx1.freebsd.org (Postfix) with SMTP id 9C4448FC22 for ; Sat, 4 Apr 2009 20:18:55 +0000 (UTC) (envelope-from anti_spamsys@yahoo.com) Received: (qmail 28344 invoked by uid 60001); 4 Apr 2009 19:52:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1238874734; bh=Bl07SLgnbZgT2HkqgNpP2bGixVnwu9jvKXVqEOpN4SA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=MARfimK4WA8e82odyMXiH83gmo+haAIbRRRWxpOwNdMg1YhjE7VQL3XAl+07DOkKyTlHnsulAnpI+zhuieKaULKNvWTCo+2CN0JfuhfbGdrMeswU6Ih2xJIBTnDBIHOXc0RAZlq86wkDojX3qrmD130YUsHU8SCvh0To1N+MMU8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=o477H8LGRV9xmCs9b/XCCQzbCj/JUqs8P9zxlbygKfO+d4Ey6mv20mlKut3o67lnpq+kXcni7/mnY4YRrG9JkYNTb30I4/io4NfLwaw1M+AGbjXd9hzaQ9n1ORTLRp5Qj8T7Z2RDGHfyLGNc8bZsaPWBmkpVEdfEfy2lYESfdBs=; Message-ID: <313500.27821.qm@web37106.mail.mud.yahoo.com> X-YMail-OSG: 91t907AVM1k3q9C26hV.zDVpeUXzW3JCnBb2ZUMEsjfiH5QyscfY8X4DwwQsJu0GDU31eYH.yzih1x78fAkDGU18IdyotAc69yBRgBbhG1DutVKHel1eO2n1Lpuz1KSF55UH6QH2qjgJXhCUoSDL2BfQw8xomf9IOPJDMAks3dFH51X2oGKUhy1.7RYTPyilf1Cu6_sNEoMIRHmJEyEcrGaH.SMD8AmBY4igSRaivbDVzxDdi4qDv3Nw2VvmYvVzxOhFxNOKVKRsfto7haqRJJ0v_FccT_A5zhBZagFtz.uvkn3hIGV1 Received: from [76.227.12.174] by web37106.mail.mud.yahoo.com via HTTP; Sat, 04 Apr 2009 12:52:14 PDT X-Mailer: YahooMailClassic/5.2.15 YahooMailWebService/0.7.289.1 Date: Sat, 4 Apr 2009 12:52:14 -0700 (PDT) From: Travis Daygale To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 04 Apr 2009 20:35:25 +0000 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: compiling root filesystem into kernel (preferably tmpfs root filesystem) 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: Sat, 04 Apr 2009 20:18:56 -0000 In both the loader and kernel compiling doc, I see snippets of information = like this: #Make space in the kernel for a root filesystem on a md device.options MD_R= OOT_SIZE=3D10 boot_dfltrootInstructs the kernel to mount the statically compiled-in root = file system. My question is, how does one compile a root filesystem into the FreeBSD ker= nel? =A0When mounted, I want this root filesystem to run entirely in memory= with no other backing store (not even a readonly flash disc nor other back= ing media such as DVD/CD). The standard FreeBSD DVD install disc uses just such a root? =A0(Though see= ms to rely heavily on the rescue binaries being on a read only filesystem b= acked by the install DVD?) I'm still trying to reverse engineer how that wa= s done, without much luck. =A0 Is there a place/documentation I should be finding? =A0PicoBSD, NanoBSD, NF= S root diskless systems... all tantalizing close, but not the same thing (r= ead only roots backed by media other than memory). The root filesystem I'm wanting would presumably be in some conceptual sens= e similar to initramfs in Linux land, if that helps explain what I'm trying= to achieve. =A0In fact I have a Linux distribution which consists of a sin= gle giant kernel image and when boot, runs entirely in memory, the kernel i= n fact can't read filesystems other than tmpfs because no filesystems are c= ompiled in. =A0It appears all of this won't be possible in FreeBSD (looks l= ike ufs is required) but it appears I can get close to this. Indeed, I'd love a way for the root filesystem in FreeBSD to be of type tmp= fs, again similar to what is possible on the Linux side, though I'm much le= ss concerned with the type of filesystem (it just needs to be compiled into= the FreeBSD kernel and needs to be a memory backed filesystem when it moun= ts, no other backing store). Thanks in advance! Trever =0A=0A=0A