Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 2009 12:52:14 -0700 (PDT)
From:      Travis Daygale <anti_spamsys@yahoo.com>
To:        freebsd-hackers@freebsd.org
Subject:   compiling root filesystem into kernel (preferably tmpfs root filesystem)
Message-ID:  <313500.27821.qm@web37106.mail.mud.yahoo.com>

next in thread | raw e-mail | index | archive | help
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      



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?313500.27821.qm>