Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 1998 18:01:31 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Klaus Werner Krygier <krygier@kph.uni-mainz.de>
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Linux emulation problem 
Message-ID:  <199804130101.SAA03505@antipodes.cdrom.com>
In-Reply-To: Your message of "Sun, 12 Apr 1998 12:42:50 %2B0200." <Pine.BSF.3.96.980412123933.12972A-100000@krygierpc.kph.uni-mainz.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Is it possible to force the Linux emulator to use the /compat/linux
> tree only for shared libraries and other system files but not on the
> user level?

Not in a useful fashion, no.  There is no way to tell the difference 
between a Linux application searching for something that "should" be in 
/compat/linux and something that "shouldn't".

> In our heterogenous computer environment we use a commercial client/server
> backup system (NSR) which runs on several platforms. Unfortunately, client
> software for this system is available only for Linux and not for FreeBSD :-(.

You should be pestering the software vendor about this. 8)

> This software seems to work fine under FreeBSD (because of the excellent
> Linux emulation :)) but with one ugly exception:
> 
> Instead of files and directories in the / tree the /compat/linux tree is
> accessed.

Directory traversal is problematic.  If you attempt to open "/" for 
traversal in a Linux binary, the search for "/" under /compat/linux 
will succeed.  Subsequently, every directory and file you locate during 
traversal will also be found there.

> For backup purposes this behaviour is not very useful. In the worst case
> a backup consists only of Linux files - the last thing we want to backup.

Understood.

> Can anyone give us some helpful hints how to solve this problem?

If you don't mind not backing up *everything* on the FreeBSD client, 
only back up data under directories in the "real" filespace that have 
no direct equivalent in the Linux filespace.

Depending on your Linux emulation requirements, you may be able to put 
all of the Linux compatibility files into the "real" filespace, and 
make /compat/linux a symbolic link to / (this is extremely ugly, and 
worth avoiding if you can).

Yet another ugly technique would be to ask the Linux software to backup 
only the directory "/real_root", and make /compat/linux/real_root a 
symbolic link to /.  The success of this will to depend on how 
the backup software handles symbolic links.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



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