Linux compatibility with more than one Linux installed?

Alexander Leidinger Alexander at Leidinger.net
Sat Dec 3 14:24:13 UTC 2011


On Thu, 1 Dec 2011 11:06:19 +0000 (GMT) "Thomas Mueller"
<mueller6727 at bellsouth.net> wrote:


> > The linux-base port is supposed to provide good integration into
> > FreeBSD. Ideally the integration is seamless.
>   
> > The linux-dist ports provide a complete linux environment. You
> > chroot into it and you have a complete linux system. You can
> > compile linux binaries inside the +linux-dist. You can not do this
> > with the linux-base.

> So I guess that's the fundamental difference between linux-base
> installed to /compat/linux, and linux-dist?
> 
> So when I build my Linux installation, then I suppose I can mount
> that partition and chroot into it?

Yes, you just have to mount some FS into the linux-env (devfs,
linprocfs, linsysfs, just like with the linux-base). This assumes your
linux env does not use some linux syscalls which the linuxulator part
in the FreeBSD kernel does not understand. It also assumes you have a
similar setup for important things like DNS servers and such.

> Even as nonroot?  Even run X Window applications?

If you have the same UIDs/GIDs in the linux env (for users), it should
work. Even with X (you can do a hardlink of the X socket in the FS into
the linux env, or you accept a little bit more overhead and go via TCP
-> DISPLAY=hostname:0.0).

> I think on some platforms, chroot is root-only, but running
> 
> ls -l /usr/sbin/chroot in FreeBSD 9.0-RC2
> 
> -r-xr-xr-x  1 root  wheel  7736 Nov 22 11:08 /usr/sbin/chroot

Chroot should only depend on FS access rights.

Bye,
Alexander.

-- 
http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-ports mailing list