From owner-freebsd-emulation@freebsd.org Sat Feb 13 10:25:31 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 22DD2528156 for ; Sat, 13 Feb 2021 10:25:31 +0000 (UTC) (envelope-from mueller6722@twc.com) Received: from p-impout002.msg.pkvw.co.charter.net (p-impout002aa.msg.pkvw.co.charter.net [47.43.26.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dd62L2hXCz3qLf for ; Sat, 13 Feb 2021 10:25:29 +0000 (UTC) (envelope-from mueller6722@twc.com) Received: from localhost ([96.28.177.163]) by cmsmtp with ESMTP id As78lNcFSFRqFAs78ly39w; Sat, 13 Feb 2021 10:25:23 +0000 X-Authority-Analysis: v=2.3 cv=cZSsUULM c=1 sm=1 tr=0 a=xqrt2BZAGHte7XHhrxJgbA==:117 a=xqrt2BZAGHte7XHhrxJgbA==:17 a=HpEJnUlJZJkA:10 a=pGLkceISAAAA:8 a=UNWf5WQ7AAAA:8 a=exsrQlN4hxvbHHdDqF0A:9 a=TmY6P1tBX-PGzTCW-pm6:22 Date: Sat, 13 Feb 2021 10:25:32 +0000 From: "Thomas Mueller" To: freebsd-emulation@freebsd.org CC: JB Subject: Re: Linuxulator: running one's own small Linux in FreeBSD? References: <3OWRHri6YXev4KcRSoZUcPlowZ8fJeyKbDQXI_3Rak2YHuPKx9_mmN4KSvPH0s09ws0q2kG6tuwUagLbFLpE_mfpYwQ8qy-TSvO_WP6A240=@protonmail.com> <60275607.1c69fb81.18de5.04ffSMTPIN_ADDED_MISSING@mx.google.com> X-CMAE-Envelope: MS4wfK6xFhA5Tl7/1dK0gQSHcA46ZkwRvYO/ppSS7H58fbZ/1F5W0+0VGsF+AKWMVTUTpKaEGIhnSsPTl+6Ehrvt1anJpDF1ssj1KI4NGO0UY08BDf84cqp2 rdmRbG5DKOa2kQ+r3h1GFpFXvDXX9KPe4HEiFTClnuLQFVzMrd889Vm4oluW/IORZGKU63eUhEWW4r0RSIKJRmgMQC3ocEHUPab0L2JmeuuaQ56mcVBWpujE X-Rspamd-Queue-Id: 4Dd62L2hXCz3qLf X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mueller6722@twc.com designates 47.43.26.133 as permitted sender) smtp.mailfrom=mueller6722@twc.com X-Spamd-Result: default: False [0.23 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[twc.com]; R_SPF_ALLOW(-0.20)[+ip4:47.43.26.0/24]; NEURAL_HAM_SHORT(-0.97)[-0.967]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[96.28.177.163:received]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[twc.com]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[47.43.26.133:from]; ASN(0.00)[asn:40294, ipnet:47.43.24.0/21, country:US]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(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]; DMARC_NA(0.00)[twc.com]; SPAMHAUS_ZRD(0.00)[47.43.26.133:from:127.0.2.255]; MISSING_MID(2.50)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[47.43.26.133:from]; FREEMAIL_CC(0.00)[protonmail.com]; RCVD_COUNT_TWO(0.00)[2]; 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: Sat, 13 Feb 2021 10:25:31 -0000 from Damjan Jovanovic : > On Sat, Feb 13, 2021 at 6:31 AM Thomas Mueller wrote: > > from JB: > > > If it's just a local directory, you can use `sysctl' to tell the kernel > > what the emulation path is: > > > sysctl compat.linux.emul_path=/foo/bar > > > Then restart the `linux' service. > > How do I restart the 'linux' service? > > I am familiar with "/etc/rc.d/mountd restart", but don't think I could do > > "etc/rc.d/linux restart" (or linuxd). > $ sudo service linux describe > Enable Linux ABI > > I tried "sysctl -a | grep "linux" from FreeBSD and got nothing; also > > sysctl compat.linux.emul_path > > gave me "Unknown oid" error. > $ sysctl compat.linux.emul_path > compat.linux.emul_path: /compat/linux > $ kldstat|grep lin > 2 1 0xffffffff8247b000 fb58 linprocfs.ko > 3 5 0xffffffff8248b000 d770 linux_common.ko > 6 1 0xffffffff824aa000 6618 linsysfs.ko > 11 4 0xffffffff83408000 12d30 linuxkpi.ko > 12 3 0xffffffff8341b000 13f30 linuxkpi_gplv2.ko > 26 1 0xffffffff834ee000 3c490 linux.ko > 27 1 0xffffffff8352b000 35cb0 linux64.ko > This is on FreeBSD 12.2. > I think you're missing some of the base packages, and didn't load "kldload > linux". So I guess Linux service is restarted by "service linux restart"? kldstat on my Freebsd showed only linux.ko, linus_common.ko and linux64.ko . 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. FreeBSD Handbook online is not sufficiently detailed. Tom