From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 10 05:42:52 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 39F8E1065670; Fri, 10 Apr 2009 05:42:52 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-fx0-f167.google.com (mail-fx0-f167.google.com [209.85.220.167]) by mx1.freebsd.org (Postfix) with ESMTP id F2E658FC16; Fri, 10 Apr 2009 05:42:50 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: by fxm11 with SMTP id 11so890552fxm.43 for ; Thu, 09 Apr 2009 22:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=UF3DZ3rM/WX3m1N6QUuq92hDSTQz02oVmzhIb1rLulc=; b=pvyUFv0rsf6FBfJegpdwlZxIjaCD1qRZgfAjTX2OLQ/yNMNHPFetUNjt6h17/RSqWx XjbvMTazhWJNeejERlCr66cSFF2RqqZq22DFs+VLhtLemLUl+woQeaIZt80X5OV+mHLi DKKXyoUCfX9M7GPR6UUHytB2foOS9+X9dSiO8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=c3yfSoKFNQLh871bpLV5FIbXLF7eYp4oqplPjYXo4h4B06zAxwjB9/czN2GJwKWpPl ATnZI+1lLF100l3VF3cXxU06t15VNtfjaGlYxH7kkr84o3S3UOSK9qGjLqMSV9G2nA0W o0lFiGy3QzDk/gR5JvoLYBHQ2fwQMl6wUsqTA= Received: by 10.86.51.10 with SMTP id y10mr509531fgy.51.1239342169924; Thu, 09 Apr 2009 22:42:49 -0700 (PDT) Received: from ?0.0.0.0? ([196.34.241.123]) by mx.google.com with ESMTPS id 3sm1215551fge.19.2009.04.09.22.42.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Apr 2009 22:42:48 -0700 (PDT) From: David Naylor Organization: Private To: Travis Daygale Date: Fri, 10 Apr 2009 07:43:24 +0200 User-Agent: KMail/1.9.10 References: <104771.62272.qm@web37103.mail.mud.yahoo.com> In-Reply-To: <104771.62272.qm@web37103.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1429101.k2Q3nErVYx"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200904100743.28140.naylor.b.david@gmail.com> X-Mailman-Approved-At: Fri, 10 Apr 2009 11:26:22 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Sam Leffler Subject: Re: 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: Fri, 10 Apr 2009 05:42:52 -0000 --nextPart1429101.k2Q3nErVYx Content-Type: multipart/mixed; boundary="Boundary-01=_8xt3J28kuX58opI" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_8xt3J28kuX58opI Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 09 April 2009 08:34:22 Travis Daygale wrote: > David, thank you for the great information! =A0Yes, I would appreciate se= eing > the scripts and hearing about the other method you outline. =A0 Yes, you > understand what I want to achieve exactly. Please see attached for the scripts. There is now a README file, that=20 *should* explain everything, I hope. If you are running FreeBSD 7 then=20 usbbt.sh needs to be edited (newfs and du have options only supported=20 by -current). =20 > I see what you're saying about not needing to put it in the kernel file, > though for a variety of reasons, I do prefer a single file in the end.=20 Although testing is made much easier by having it as a module (and not havi= ng=20 to rebuild the kernel every time). =20 > And=20 > I did find this after posting (didn't see it on previous searches, though= I > invested a lot of time looking before I > posted):http://lists.freebsd.org/pipermail/freebsd-hackers/2006-November/= 01 >8662.html I have built a root image that I put in the kernel as described = in > the Nov 2006 post. =A0My UFS root image consists of /sbin/init, where ini= t is > a statically compiled C program that just spits out "Hello world" and > sleeps, this binary runs fine under FBSD. =A0At this point, I have the ke= rnel > booting but it panics because it says it can't find init.... =A0Hmmm... = =A0I > believe (haven't had time to test) that it is finding root? =A0 The kernel complains when there is no root (and asks for one). =20 Here is a hint: /> grep init_ /boot/defaults/loader.conf #init_path=3D"/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sys= install" #init_shell=3D"/bin/sh" # The shell binary used by init(8). #init_script=3D"" # Initial script to run by init(8) before chrooti= ng. #init_chroot=3D"" # Directory for init(8) to chroot into. If you need further help on this please provide more information (the outpu= t=20 produced by the kernel, for starters). > Not sure=20 > though what loader args I might need to be providing? =A0Could it be a /d= ev > issue (though I'm not needing sh, etc., since my init is not a real init)? > =A0Still figuring this out. The kernel automatically mounts /dev/ for you (just make sure there is a mo= unt=20 point). =20 Just to point out. There are two other scripts (that I know of) that also= =20 produce live images: freesbie and nanobsd. Neither do RAM based images=20 (again, as far as I know). =20 Sam: I've cc'ed you so you can have a look at my scripts, if you are=20 interested. I'll send you an e-mail once I've read through nanobsd carefull= y. =20 Regards --Boundary-01=_8xt3J28kuX58opI-- --nextPart1429101.k2Q3nErVYx Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAkne3IAACgkQUaaFgP9pFrLtnwCeOvEM/3Vf/gMrHQElyPtIiWwR S/0AoIjUTRFwB4Km05NyZrlfGbg60/Jd =rI8I -----END PGP SIGNATURE----- --nextPart1429101.k2Q3nErVYx--