Ignore:
Timestamp:
11/18/2022 04:40:53 AM (18 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
2f9498af
Parents:
7054cc6
git-author:
Xi Ruoyao <xry111@…> (11/18/2022 04:35:53 AM)
git-committer:
Xi Ruoyao <xry111@…> (11/18/2022 04:40:53 AM)
Message:

chroot: reword how chroot works

Technically chroot command "tells" bash nothing. It basically calls
chroot("$LFS"), then chdir("/"), then
execve(["/usr/bin/env", "-i", ...]). The kernel also does not tell bash
something like "hey, the root is now $LFS" but just executes (almost) all
system calls from bash as-if $LFS is /.

The man page of chroot says:

DESCRIPTION

Run COMMAND with root directory set to NEWROOT.

Just use the same grammar construction here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/chroot.xml

    r7054cc6 rf714a8f  
    3939  <para>From this point on, there is no need to use the
    4040  <envar>LFS</envar> variable any more because all work will be restricted
    41   to the LFS file system; the <command>chroot</command> command tells the Bash shell that
    42   <filename class="directory">$LFS</filename> is now the root
    43   (<filename class="directory">/</filename>) directory.</para>
     41  to the LFS file system; the <command>chroot</command> command runs the
     42  Bash shell with the root
     43  (<filename class="directory">/</filename>) directory set to
     44  <filename class='directory'>$LFS</filename>.</para>
    4445
    4546  <para>Notice that <filename class="directory">/tools/bin</filename> is not
Note: See TracChangeset for help on using the changeset viewer.