From owner-freebsd-questions@FreeBSD.ORG Thu Feb 11 15:54:45 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D5A11065700 for ; Thu, 11 Feb 2010 15:54:45 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 80B108FC1D for ; Thu, 11 Feb 2010 15:54:44 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o1BFsZlw003970 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 11 Feb 2010 15:54:35 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk o1BFsZlw003970 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1265903675; bh=EM/0zy7IFAvoLF/7EdEhrtywKATZM+/lcTq+neHcgWU=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Message-ID:=20<4B74283B.1070903@infracaninophile.co.uk>|Date:=20T hu,=2011=20Feb=202010=2015:54:35=20+0000|From:=20Matthew=20Seaman= 20|Organization:=20Infracaninophi le|User-Agent:=20Mozilla/5.0=20(Macintosh=3B=20U=3B=20Intel=20Mac= 20OS=20X=2010.6=3B=20en-GB=3B=20rv:1.9.1.7)=20Gecko/20100111=20Thu nderbird/3.0.1|MIME-Version:=201.0|To:=20RW=20|CC:=20freebsd-questions@freebsd.org|Subject:=20Re:=20Memo ry=20disk=20"a=20la=20mfsroot"?|References:=20<4B7419F5.7050602@pl drouin.net>=09<4B741E56.8010002@infracaninophile.co.uk>=20<2010021 1153925.7b88844d@gumby.homeunix.com>|In-Reply-To:=20<2010021115392 5.7b88844d@gumby.homeunix.com>|X-Enigmail-Version:=201.0|Content-T ype:=20text/plain=3B=20charset=3DUTF-8|Content-Transfer-Encoding:= 207bit; b=EddXr5cAvMbzvTpr3IS5Q3BamsLgMUlptB8y75DKHhUGZQrt2v5h7zY7hWjuugyTM aRWp5Xsx9m4RusVFo4fGuicfHmYbeYtr2n2ePlKqaDjQmUL66tlZSmsHr0Qlex3fpq uvrl8c4QMlnHnKE3DWHFhmWdx6ryeEKHO/FocRTI= Message-ID: <4B74283B.1070903@infracaninophile.co.uk> Date: Thu, 11 Feb 2010 15:54:35 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: RW References: <4B7419F5.7050602@pldrouin.net> <4B741E56.8010002@infracaninophile.co.uk> <20100211153925.7b88844d@gumby.homeunix.com> In-Reply-To: <20100211153925.7b88844d@gumby.homeunix.com> X-Enigmail-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Memory disk "a la mfsroot"? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 15:54:45 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/02/2010 15:39, RW wrote: > On Thu, 11 Feb 2010 15:12:22 +0000 > Matthew Seaman wrote: >> On 11/02/2010 14:53, Pierre-Luc Drouin wrote: >> >>> I would like to know if there is a mount command that allows to >>> create a memory disk that can be initialized from a file. What I am >>> looking for is something like mount_mfs -F, but that does not >>> modify the actual file. I know what I could easily to this by >>> copying the content of the file to the memory disk, but I am >>> looking for a solution that can be configured via fstab. >> >> Yes. See mdconfig(8) -- there are examples in there of exactly what >> you want to do. > > I don't think covers what he is asking for. I think you would need a > union filsystem that overlays a swap-backed filesystem on top of a > file-backed filesystem - if that's possible. Actually, I was thinking more along the lines of mounting a .iso as a cd9660 filesystem. Which won't muck up the underlying .iso, but only because it's read-only. You could mount a FFS image read-only in exactly the same way -- I think there's a 'last mounted on' field in the backing file image that will be updated if the it is writable (even if the fs itself is mounted ro) but that's not the right answer either. Basically, you're going to have to mount and initialise as two separate operations as far as I can see. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkt0KDsACgkQ8Mjk52CukIxZaACcCIsHKNBckWDFzRWDJqEH/vVC Pd4AnRp74n7+Jl+z28VwBEYqpfQmNVJ0 =lxug -----END PGP SIGNATURE-----