From owner-freebsd-emulation@freebsd.org Sun Feb 14 01:19:49 2021 Return-Path: Delivered-To: freebsd-emulation@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 092C554369C for ; Sun, 14 Feb 2021 01:19:49 +0000 (UTC) (envelope-from freebsdlists.admin@protonmail.com) Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "SwissSign Server Gold CA 2014 - G22" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DdTtC73sNz3qwQ for ; Sun, 14 Feb 2021 01:19:47 +0000 (UTC) (envelope-from freebsdlists.admin@protonmail.com) Date: Sun, 14 Feb 2021 01:19:42 +0000 To: "freebsd-emulation@freebsd.org" From: JB Reply-To: JB Subject: Re: Linuxulator: running one's own small Linux in FreeBSD? Message-ID: In-Reply-To: <_RrpGfn44_2JCRIBPe2l0qp03Q7xatJLvQ4yXYAqG4fPMACVJwczoWxlCFf5SeLaj8tqRckboW62Ct7emn3pJOezBS5QIkRWN53v1T4wSO0=@protonmail.com> References: <_RrpGfn44_2JCRIBPe2l0qp03Q7xatJLvQ4yXYAqG4fPMACVJwczoWxlCFf5SeLaj8tqRckboW62Ct7emn3pJOezBS5QIkRWN53v1T4wSO0=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Rspamd-Queue-Id: 4DdTtC73sNz3qwQ X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.10 / 15.00]; HAS_REPLYTO(0.00)[freebsdlists.admin@protonmail.com]; RWL_MAILSPIKE_GOOD(0.00)[185.70.40.132:from]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24:c]; FREEMAIL_FROM(0.00)[protonmail.com]; DKIM_TRACE(0.00)[protonmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCVD_COUNT_ZERO(0.00)[0]; RCVD_IN_DNSWL_LOW(-0.10)[185.70.40.132:from]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[185.70.40.132:from]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[protonmail.com]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[185.70.40.132:from:127.0.2.255]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_EQ_ADDR_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-emulation] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2021 01:19:49 -0000 Corrections: 1. Those *other* modules (the ones missing from your list). 2. You want the *former*, not the latter. Sounds like you want jails with s= tartup scripts. =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 5:12 PM, JB wrote: > > So I guess Linux service is restarted by "service linux restart"? > > service | grep List > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > -l List all scripts in /etc/rc.d and /usr/local/etc/rc.d > > service -l | grep ux > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 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= .ko . > > Those modules won't be loaded until you start the `linux' service with 'l= inux_mounts_enable' enabled (or you mount them yourself with fstab, manuall= y, or another script): > > sysrc linux_mounts_enable=3DYES > > > I had not yet actually attempted to run my small Linuxes in FreeBSD or = NetBSD, not ready yet. > > I still would need such things as init scripts, proc fs, /etc/fstab and= other configuration files. > > The target directory can be empty (in the case of the default emulation p= ath, '/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= want the latter: > > https://www.harshadsharma.com/posts/2020/12/ubuntu-bionic-on-freebsd-with= -iocage-managed-jails/ > > > FreeBSD Handbook online is not sufficiently detailed. > > Sadly, documentation has lagged behind the high pace of OS development. B= ut, better that than a slow pace of development.