Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2021 01:12:50 +0000
From:      JB <freebsdlists.admin@protonmail.com>
To:        "freebsd-emulation@freebsd.org" <freebsd-emulation@freebsd.org>
Subject:   Re: Linuxulator: running one's own small Linux in FreeBSD?
Message-ID:  <_RrpGfn44_2JCRIBPe2l0qp03Q7xatJLvQ4yXYAqG4fPMACVJwczoWxlCFf5SeLaj8tqRckboW62Ct7emn3pJOezBS5QIkRWN53v1T4wSO0=@protonmail.com>

next in thread | raw e-mail | index | archive | help

=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
On Saturday, February 13, 2021 2:25 AM, Thomas Mueller <mueller6722@twc.com=
> wrote:

> So I guess Linux service is restarted by "service linux restart"?

# service | grep List
-l      List all scripts in /etc/rc.d and /usr/local/etc/rc.d

# service -l | grep ux
linux

The `service' command controls the rc script that starts the service.


> kldstat on my Freebsd showed only linux.ko, linus_common.ko and linux64.k=
o .

Those modules won't be loaded until you start the `linux' service with 'lin=
ux_mounts_enable' enabled (or you mount them yourself with fstab, manually,=
 or another script):

sysrc linux_mounts_enable=3DYES


> I had not yet actually attempted to run my small Linuxes in FreeBSD or Ne=
tBSD, not ready yet.
>
> I still would need such things as init scripts, proc fs, /etc/fstab and o=
ther configuration files.

The target directory can be empty (in the case of the default emulation pat=
h, '/compat/linux') when starting the service. It doesn't actually "start" =
your guest OS. I don't know what your plans are, but running Linux inside a=
 jail is different than using the compatibility layer. It sounds like you w=
ant the latter:

https://www.harshadsharma.com/posts/2020/12/ubuntu-bionic-on-freebsd-with-i=
ocage-managed-jails/


> FreeBSD Handbook online is not sufficiently detailed.

Sadly, documentation has lagged behind the high pace of OS development. But=
, better that than a slow pace of development.



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