From nobody Mon Jan 17 08:36:11 2022 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 19BB519623AE for ; Mon, 17 Jan 2022 08:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JclcD08TCz4hmj; Mon, 17 Jan 2022 08:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642408572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIGlnnjv6kAzDO7BzjPPBOgzFEfFlS5h/i3y3XHz7zE=; b=dOarphufOA2GV8cbmoTzyrUUjRAsRQCDLr01P8M7yWihdThoWLSSl5cUTH102P5GxN5DKK zR0JrNzG7a4so/ZT3zQxY3yxa6ppPLsHcr5ekDX/mfHUQccuuZZoybx1xnDarXjPro5p2s YQK35BkiHi+2lkZGCkRqc6S3kZsirXzjsEqSkY9vB8RvzT8sYxVPy5Io8CdGR762DV53DB El+UikJptkmPJ+gSDBRhscQvsOQQI5aT8kzAk3PWQ0w2o6HbkegownfcfKCyqMV/dyiPNL tQ8F2Sh64witmHXSIbr+y3aCqxWnrpC8UcIh+eQmINbFLk+1He+uPPSei54QrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DACCB2853; Mon, 17 Jan 2022 08:36:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20H8aBE8089589; Mon, 17 Jan 2022 08:36:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20H8aBiR089588; Mon, 17 Jan 2022 08:36:11 GMT (envelope-from git) Date: Mon, 17 Jan 2022 08:36:11 GMT Message-Id: <202201170836.20H8aBiR089588@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Edward Tomasz Napierala Subject: git: e812dc9a23 - main - handbook: Further tweaks to Linuxulator chapter List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e812dc9a2340d565258b32b94143d08e3c0c934d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642408572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIGlnnjv6kAzDO7BzjPPBOgzFEfFlS5h/i3y3XHz7zE=; b=cWc9T02dMzyTnZi98YP/p2hdSEIKDo8gUAcqE5ccK3IoIQ7MJ5jZXzopHxgb3EfRCvMAFD FYrnKLkHFln9a7mDxlXr3Iic781D2t4yAXDFFBlEP+jutjsZdAV6FRolrqnjCKi1oN/Lqe zzy+skQC6ZTnSU2QHQSqQYk7y6kWXcK5It4WdJkGtWExha09dVI234ea4zmGWqL20qfOjs 1zSBMEqd6HXY9l8zCjc92/TD+sp39EAE7PA0tkSb05ym7AOGv6TNA2EPPPuvssIKkQ+Xu8 fTdcLJc0jvCQgCuUsTmrlNBqYzl6FH/uQ4pAO70/QODZlNAJa4BikEyQnUA1Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642408572; a=rsa-sha256; cv=none; b=x7heCFPZ5dB67+GTQyfsdjeC4s7GntuDBzfM7RGxEYg3S1JKeWkMrqlDYoU651/C/DrlYS 5p1UUdRHipwJohxbRw4MMbwTYyP7UA/pkEgNPdAsjxzIt/up6v+g44FTwvpOwYUM37sF0u KIfkFu6aDBYm4rUyRTSHbPpx4GEdYT+TSKDveEOBNc3qWm2eoOj/w/pFIGtPtisw2uJkOQ a9tHBqLe09lxk57oUkgjAWX5vqcFkN/AbobKhKujAPOe0jp1Hk3J9KLuNtxqV2sRTqjUiX 6aiccOToVC/Zsl5V/a0EfM5iEzW2gh6Fz0AnePGFPwT4O5xXPhnuP15iNie3tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/doc/commit/?id=e812dc9a2340d565258b32b94143d08e3c0c934d commit e812dc9a2340d565258b32b94143d08e3c0c934d Author: Edward Tomasz Napierala AuthorDate: 2022-01-17 08:33:43 +0000 Commit: Edward Tomasz Napierala CommitDate: 2022-01-17 08:33:56 +0000 handbook: Further tweaks to Linuxulator chapter Point to Sublime 4, as that's the current version; change misleading paragraph ordering; mention path translation; mention potential problems with 32-bit Reviewed By: debdrup Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D33909 --- .../content/en/books/handbook/linuxemu/_index.adoc | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/documentation/content/en/books/handbook/linuxemu/_index.adoc b/documentation/content/en/books/handbook/linuxemu/_index.adoc index 672a4d74dd..ff7b75b739 100644 --- a/documentation/content/en/books/handbook/linuxemu/_index.adoc +++ b/documentation/content/en/books/handbook/linuxemu/_index.adoc @@ -94,6 +94,11 @@ There are several ways of providing those libraries: one can copy them over from [[linuxemu-packages]] == CentOS Base System from FreeBSD Packages +[NOTE] +==== +This method is not yet available for arm64. +==== + The easiest way to install Linux libraries is to install package:emulators/linux_base-c7[] package or port, which places the CentOS 7-derived base system into [.filename]#/compat/linux#: [source,shell] @@ -102,10 +107,10 @@ The easiest way to install Linux libraries is to install package:emulators/linux .... FreeBSD provides packages for some Linux binary applications. -For example, to install Sublime Text, run this command: +For example, to install Sublime Text 4, along all the Linux libraries it depends on, run this command: [source,shell] .... -# pkg install linux-sublime +# pkg install linux-sublime-text4 .... [[linuxemu-debootstrap]] @@ -115,6 +120,14 @@ An alternative way of providing Linux shared libraries is by using package:sysut This has the advantage of providing a full Debian or Ubuntu distribution. To use it, follow the instructions at FreeBSD Wiki: https://wiki.freebsd.org/LinuxJails[FreeBSD Wiki - Linux Jails]. +After deboostrapping, chroot(8) into the newly created directory and install software in a way typical for the Linux distribution inside, for example: + +[source,shell] +.... +# chroot /compat/ubuntu /bin/bash +root@hostname:/# apt update +.... + It is possible to debootstrap into [.filename]#/compat/linux#, but it is discouraged to avoid collisions with files installed from FreeBSD ports and packages. Instead, derive the directory name from the distribution or version name, e.g., [.filename]#/compat/ubuntu#. If the bootstrapped instance is intended to provide Linux shared libraries without having to explicitly use chroot or jails, one can point the kernel at it by updating the `compat.linux.emul_path` sysctl and adding a line like this to [.filename]#/etc/sysctl.conf#: @@ -124,13 +137,8 @@ If the bootstrapped instance is intended to provide Linux shared libraries witho compat.linux.emul_path="/compat/ubuntu" .... -Afterwards chroot(8) into the newly created directory and install software in a way typical for the Linux distribution you have debootstrapped, for example: - -[source,shell] -.... -# chroot /compat/ubuntu /bin/bash -root@hostname:/# apt update -.... +This sysctl controls kernel's path translation mechanism; see the man:linux[4] man page for details. +Please note that changing it might cause trouble for Linux applications installed from FreeBSD packages; one reason is that many of those applications are still 32-bit, while Ubuntu seems to be deprecating 32-bit library support. [[linuxemu-advanced]] == Advanced Topics