Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Feb 2010 12:10:46 -0500
From:      Pierre-Luc Drouin <pldrouin@pldrouin.net>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        RW <rwmaillists@googlemail.com>, freebsd-questions@freebsd.org
Subject:   Re: Memory disk "a la mfsroot"?
Message-ID:  <4B743A16.9020201@pldrouin.net>
In-Reply-To: <4B74283B.1070903@infracaninophile.co.uk>
References:  <4B7419F5.7050602@pldrouin.net>	<4B741E56.8010002@infracaninophile.co.uk>	<20100211153925.7b88844d@gumby.homeunix.com> <4B74283B.1070903@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Seaman wrote:
> -----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 <m.seaman@infracaninophile.co.uk> 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.
>   
By this do you mean that I would need to copy the whole content of the 
read-only filesystem to the memory disk?

I looked at the man page for mount_unionfs and there is a big warning 
saying that it is a bad idea to use it, so I guess I will pass on this 
solution...

What I am trying to do basically is to mount a filesystem from a CD but 
I want to use a memory disk to allow write operations. I would basically 
want the filesystem to behave like a regular read-write filesystem, but 
not have to copy everything into a memory disk. What does "mfs_root" do 
exactly in the official FreeBSD boot CDs? Does it copy the content of 
mfsroot.gz into a memory disk? That filesystem is so small that I guess 
it can be copied without any problem...

Thanks!
> 	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-----
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>   




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