Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Dec 2011 10:33:21 +0000 (GMT)
From:      "Thomas Mueller" <mueller6727@bellsouth.net>
To:        freebsd-ports@freebsd.org
Cc:        Alexander Leidinger <Alexander@Leidinger.net>
Subject:   Re: Linux compatibility with more than one Linux installed?
Message-ID:  <20111205103321.EFD22106564A@hub.freebsd.org>
References:  <20111203152354.000043af@unknown>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Thu, 1 Dec 2011 11:06:19 +0000 (GMT) "Thomas Mueller"
> <mueller6727@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 don't think I really understand this part.
 
> > 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.

So I guess it's possible at least in theory to run Linux by chroot from FreeBSD, but there are stumbling blocks.

One would be limited as to Linux file system, it might not work with ext4 or btrfs.

Also, I'd be running with one of the newer Linux kernels, meaning possibly ahead of FreeBSD's linuxulator.

I noticed FreeBSD's Linux emulation was some versions behind current Linux.

Tom




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