From owner-freebsd-emulation@freebsd.org Sun Feb 14 01:13:03 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 BEB5A542FC9 for ; Sun, 14 Feb 2021 01:13:03 +0000 (UTC) (envelope-from freebsdlists.admin@protonmail.com) Received: from mail-40135.protonmail.ch (mail-40135.protonmail.ch [185.70.40.135]) (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 4DdTkQ20cbz3qQY for ; Sun, 14 Feb 2021 01:13:01 +0000 (UTC) (envelope-from freebsdlists.admin@protonmail.com) Date: Sun, 14 Feb 2021 01:12:50 +0000 To: "freebsd-emulation@freebsd.org" From: JB Reply-To: JB Subject: Re: Linuxulator: running one's own small Linux in FreeBSD? Message-ID: <_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: 4DdTkQ20cbz3qQY X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.09 / 15.00]; HAS_REPLYTO(0.00)[freebsdlists.admin@protonmail.com]; FREEMAIL_FROM(0.00)[protonmail.com]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; DKIM_TRACE(0.00)[protonmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; NEURAL_HAM_SHORT(-0.99)[-0.985]; RCVD_COUNT_ZERO(0.00)[0]; RCVD_IN_DNSWL_LOW(-0.10)[185.70.40.135:from]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; FAKE_REPLY(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[protonmail.com]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_EQ_ADDR_ALL(0.00)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[185.70.40.135:from]; FREEMAIL_CC(0.00)[twc.com]; 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:13:03 -0000 =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 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.