From nobody Thu May 11 20:55:06 2023 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 4QHPKl1f5fz4B1Mk for ; Thu, 11 May 2023 20:55:07 +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 4QHPKl1DjTz424c; Thu, 11 May 2023 20:55:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683838507; 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=X4sBMqwbshL+6RDldmOzHVn2nIzNTb1Ntr+YkFblshg=; b=cMd6VLsUfA3QrQaiGyawgVvlfCngDHVdqr32W0O3+llu37lVZeyUteGHDyIx1XbAEhgry7 j1Bg6EzQEnQb9ADn/EjFJJVSRvJb+MtArYzgIuollEQCxLaAk+DfEQvUTrAsRp83nV4YCk KswvhJprZ7k4Ixs/SddxgLG+IOxHnag0Dg6SsI1J/Tjlh3VqLeNGWfYy0eyp8ppIDKWnyf naCsYHvBzD9aZF6HouEVg6uB6nW8722IDmDh/OZkZActL0+wMaQtsmIMyq1ojprAbuETSS h2d82aH/9otPTxY3A0HNrxo27ekH8YbEdxcyXmIcLiHofshiXb5zPPWGWfvokA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683838507; 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=X4sBMqwbshL+6RDldmOzHVn2nIzNTb1Ntr+YkFblshg=; b=EQy3xZeQZN+aBopCYzBFqZlqFDM9BSt3kBHCyh8jt9ibZyrL5erQv+IqgD8sAheRZHZm0w t1ZukKivSDyZYrPQST9a2d3Ea+5jIHoh1Hy2B5vOfIuHA2iikY++iWs9UoT2DIrCll+jfP WHrqb14+tkKgk6jSDjsOdbBKpEADVycmDm4PL5S7fqQ19J/MD1gKI8sfLHHeaWAj4bwce0 2zbeBCcrygDj7iylfeXwWukEi6YnsqxNMe0REX55OSY8a7XXJPprcY7h6Z6WDdbC/syTKu XEKRdUSeVP4fE0Gmm9sgi1tbLpvtw7z1r2pJLQBGHfNCATRhfL1m9Zhb6R3xtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683838507; a=rsa-sha256; cv=none; b=jC4EmcECjIrOS8ogLhUE3DlngA+o032KVLra+2bq5uH8Po455uMKo+5U46JDw8MU+HlTYO ba4ApS7fio4a5gZj8fwQR0GPA3+SHy+2SHteP/9H17F5SlnSlLNMI7dzmcnuOPjb5e9CPL fJ8TP9qTH3tKDgLuCKiLBIdIaBBsKV3QE4J/smi2Wdr63YvtStSFdn6TTfjIb2C+k5FQf7 6b6sRv9Df8L1v24Q84qiD2xW74Ouf4O7bRNS5gom3aeaPr4aJkGlS/K6c8Vhxr+6q4iFM3 maR259G3gwHn1cnWo8v+69kTBVfeio6cpTIp5x603P/KKbgRhvHSELJu4WzsUg== 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 4QHPKl0Cjlz16rC; Thu, 11 May 2023 20:55:07 +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 34BKt696000855; Thu, 11 May 2023 20:55:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34BKt6Im000854; Thu, 11 May 2023 20:55:06 GMT (envelope-from git) Date: Thu, 11 May 2023 20:55:06 GMT Message-Id: <202305112055.34BKt6Im000854@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Ceri Davies Subject: git: 6ff9b4b44b - main - handbook/linuxemu: minor improvements to grammar, etc. 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: ceri X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ff9b4b44b48bae15da7fdfb0bfd3fcbe59cb8f3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ceri: URL: https://cgit.FreeBSD.org/doc/commit/?id=6ff9b4b44b48bae15da7fdfb0bfd3fcbe59cb8f3 commit 6ff9b4b44b48bae15da7fdfb0bfd3fcbe59cb8f3 Author: Ceri Davies AuthorDate: 2023-05-11 20:48:45 +0000 Commit: Ceri Davies CommitDate: 2023-05-11 20:48:45 +0000 handbook/linuxemu: minor improvements to grammar, etc. --- .../content/en/books/handbook/linuxemu/_index.adoc | 36 +++++++++------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/documentation/content/en/books/handbook/linuxemu/_index.adoc b/documentation/content/en/books/handbook/linuxemu/_index.adoc index 79892d7cfa..0f21401e8d 100644 --- a/documentation/content/en/books/handbook/linuxemu/_index.adoc +++ b/documentation/content/en/books/handbook/linuxemu/_index.adoc @@ -78,7 +78,7 @@ To enable the Linux ABI at boot time, execute the following command: # sysrc linux_enable="YES" .... -Once enabled, it can be started without rebooting executing the following command: +Once configured, it can be enabled without rebooting by executing the following command: [source,shell] .... @@ -88,7 +88,7 @@ Once enabled, it can be started without rebooting executing the following comman This is enough for statically linked Linux binaries to work. The Linux service will load necessary kernel modules and mount filesystems expected by Linux applications under [.filename]#/compat/linux#. -They can be started in the same way native FreeBSD binaries can; they behave almost exactly like native processes and can be traced and debugged the usual way. +Linux binaries can then be started in the same way that native FreeBSD binaries can; they behave almost exactly like native processes and can be traced and debugged the usual way. The current content of [.filename]#/compat/linux# can be checked executing the following command: @@ -110,12 +110,12 @@ dr-xr-xr-x 1 root wheel 0 Apr 11 21:03 sys [[linux-userlands]] == Linux userlands -Linux software requires more than just an ABI to work. -In order to run Linux software a Linux userland must be installed first. +Most Linux software requires more than just an ABI to work, depending perhaps on common libraries. +In order to run such Linux software, a Linux userland must be installed first. [TIP] ==== -If all that is wanted is to run some software already included in the Ports tree, it can be installed via package manager and man:pkg[8] will automatically setup the required Linux userland. +If all that is wanted is to run some software already included in the Ports tree, it can be installed via the man:pkg[8] package manager which will automatically setup the required Linux userland. For example, to install Sublime Text 4, along with all the Linux libraries it depends on, run this command: @@ -177,7 +177,7 @@ To install debootstrap execute the following command: # pkg install debootstrap .... -man:debootstrap[8] needs man:linux[4] ABI enabled. +man:debootstrap[8] needs man:linux[4] ABI support to be enabled as per the instructions above. Once enabled, execute the following command to install Ubuntu or Debian in [.filename]#/compat/ubuntu#: [source,shell] @@ -216,7 +216,7 @@ Then set up mounts in [.filename]#/etc/fstab#. [TIP] ==== -If the contents of the home directory should be shared and to be able to run X11 applications, [.filename]#/home# and [.filename]#/tmp# should be mounted in the linux compat area using man:nullfs[5] for loopback. +If the contents of the home directory should be shared, or to be able to run X11 applications, [.filename]#/home# and [.filename]#/tmp# should be mounted in the linux compat area using man:nullfs[5] for loopback. The following example can be added to [.filename]#/etc/fstab#: @@ -261,7 +261,7 @@ The output should be similar to the following: Linux 3.17.0 x86_64 .... -Once inside the chroot, the system behaves as in a normal Ubuntu installation +Once inside the chroot, the system behaves as per a normal Ubuntu installation. While systemd doesn't work, the man:service[8] command works as usual. [TIP] @@ -357,8 +357,8 @@ This example will result in the following files on the FreeBSD system: .... If a Linux shared library already exists with a matching major revision number to the first column of the `ldd` output, it does not need to be copied to the file named in the last column, as the existing library should work. -It is advisable to copy the shared library if it is a newer version, though. -The old one can be removed, as long as the symbolic link points to the new one. +It is advisable to copy the shared library if it is a newer version. +The old one can be removed if the symbolic link points to the new one. For example, these libraries already exist on the FreeBSD system: @@ -384,24 +384,18 @@ However, it is safe to replace the existing [.filename]#libc.so# with the newer /compat/linux/lib/libc.so.4 -> libc.so.4.6.29 .... -Generally, one will need to look for the shared libraries that Linux binaries depend on only the first few times that a Linux program is installed on FreeBSD. +Generally, it is only necessary to look for the shared libraries that Linux binaries depend on the first few times that a Linux program is installed on FreeBSD. After a while, there will be a sufficient set of Linux shared libraries on the system to be able to run newly installed Linux binaries without any extra work. === Branding Linux ELF Binaries The FreeBSD kernel uses several methods to determine if the binary to be executed is a Linux one: it checks the brand in the ELF file header, looks for known ELF interpreter paths and checks ELF notes; finally, by default, unbranded ELF executables are assumed to be Linux anyway. -Should all those methods fail, an attempt to execute the binary might result in error message: +Should all those methods fail, an attempt to execute the binary might result in an error message: [source,shell] .... % ./my-linux-elf-binary -.... - -The output should be similar to the following: - -[.programlisting] -.... ELF binary type not known Abort .... @@ -425,11 +419,11 @@ Once installed, `root` can use this command to install a [.filename]#.rpm#: .... If necessary, `brandelf` the installed ELF binaries. -Note that this will prevent a clean uninstall. +Note that this will prevent a clean uninstall as the binaries are modified by the `brandelf` program. === Configuring the Hostname Resolver -If DNS does not work or this error appears: +When using Linux binaries, if DNS does not work or this error appears: [.programlisting] .... @@ -446,7 +440,7 @@ multi on .... This specifies that [.filename]#/etc/hosts# is searched first and DNS is searched second. -When [.filename]#/compat/linux/etc/host.conf# does not exist, Linux applications use [.filename]#/etc/host.conf# in the host system but they complain since that file does not exist in FreeBSD. +When [.filename]#/compat/linux/etc/host.conf# does not exist, Linux applications try to use [.filename]#/etc/host.conf# in the host system but they complain since that file does not exist in FreeBSD. Remove `bind` if a name server is not configured using [.filename]#/etc/resolv.conf#. [[linuxemu-misc]]