Re: Weird behaviour of mount_unionfs with executables

From: Ulrich Spoerlein <spoerlein_at_informatik.uni-wuerzburg.de>
Date: Mon, 4 Jul 2005 10:44:54 +0200
On Sat, 02.07.2005 at 14:40:48 +0200, Dario Freni wrote:
> Hi everybody, I'm working on rewriting FreeSBIE toolkit for my Summer
> of Code project. Before that, I'm trying to adapt actual scripts with
> latest -current (expecially ppc). I noticed a weird behaviour of
> unionfs either in i386 and ppc. Under FreeSBIE, we use to mount memory
> file systems over compressed ones via unionfs. Under -current,
> whenever I recall an rwx file, it is correctly executed the first
> time, then it is copied to the upper layer (why? I haven't modified it
> yet) with wrong permission, so it is unexecutable.

I did something like this a year ago, when I first heard about FreeSBIE.
(Together with a completely different way of installing packages).

I mounted one big md on /etc, /usr/local/etc, /var and /home. That way
you don't need to worry about binaries. Similarly, if someone fills up
the md, tough luck.

I guess the file is copied to the upper layer, because of atime changes,
you want to disable them as well. I don't know the current status wrt to
FreeSBIE, but you should really use ISO9600 as the root FS, that should
make sure no atime updates are tried.

> I'm also afraid that copying files to the upper layer also when
> they're not modified could fill up our mfs entirely. I'm almost sure
> there's a totally different behaviour under RELENG_5, as we haven't
> encountered such problems.

I made it so, that one could specify a large file on a FAT32 partition,
that file then got attached to /dev/md0 and unionfs-mounted. That way
one could have a 2 GB md, which should be enough for everybody. This
also gives persistent configurations across reboot.

That, coupled with a script, looking for that special file on every
partition (USB-Sticks, for example) on boot-up made it very convenient
to work with.

I recon the Knoppix guys have now adapted a similar scheme ...

Ulrich Spoerlein
-- 
 PGP Key ID: F0DB9F44				Encrypted mail welcome!
Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn."
didn't you understand?

Received on Mon Jul 04 2005 - 06:44:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:38 UTC