12.1
12.1-rc1
12.2
12.2-rc1
multilib
trunk
xry111/arm64
xry111/clfs-ng
xry111/loongarch
xry111/loongarch-12.1
xry111/loongarch-12.2
xry111/mips64el
xry111/update-glibc
Last change
on this file since 31a9142 was a8f3814a, checked in by Xi Ruoyao <xry111@…>, 2 years ago |
kernfs: technically, they are not needed for chroot
Chroot command itself does not require kernel VFS mounted. You can mount
/proc, /sys, and /run after entering chroot with
"mount -v -t proc proc /proc" etc. For /dev, if the host kernel
supports devtmpfs, you can also mount /dev in chroot with
"mount -v -t devtmpfs devtmpfs /dev". Even if the host does not support
devtmpfs, it's still possible to mount /proc in chroot, then use
"mount --bind /proc/1/dev /dev".
It's just LFS editors decide to mount them before chroot. So reword
some untrue assertions.
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[d781ffb] | 7 |
|
---|
[ce335792] | 8 | <sect1 id="ch-tools-introduction-chroot">
|
---|
[d781ffb] | 9 | <?dbhtml filename="introduction.html"?>
|
---|
[673b0d8] | 10 |
|
---|
[d781ffb] | 11 | <title>Introduction</title>
|
---|
[81fd230] | 12 |
|
---|
[387a32af] | 13 | <para>This chapter shows how to build the last missing bits of the temporary
|
---|
[52ddd6c] | 14 | system: the tools needed to build the various packages. Now
|
---|
[305c970] | 15 | that all circular dependencies have been resolved, a <quote>chroot</quote>
|
---|
| 16 | environment, completely isolated from the host operating system (except for
|
---|
| 17 | the running kernel), can be used for the build.</para>
|
---|
[ce335792] | 18 |
|
---|
| 19 | <para>For proper operation of the isolated environment, some communication
|
---|
[52ddd6c] | 20 | with the running kernel must be established. This is done via the
|
---|
[a8f3814a] | 21 | so-called <emphasis>Virtual Kernel File Systems</emphasis>, which will be
|
---|
[52ddd6c] | 22 | mounted before entering the chroot environment. You may want to verify
|
---|
| 23 | that they are mounted by issuing the <command>findmnt</command> command.</para>
|
---|
[ce335792] | 24 |
|
---|
| 25 | <para>Until <xref linkend="ch-tools-chroot"/>, the commands must be
|
---|
| 26 | run as <systemitem class="username">root</systemitem>, with the
|
---|
| 27 | <envar>LFS</envar> variable set. After entering chroot, all commands
|
---|
[e286d8db] | 28 | are run as &root;, fortunately without access to the OS of the computer
|
---|
[387a32af] | 29 | you built LFS on. Be careful anyway, as it is easy to destroy the whole
|
---|
[52ddd6c] | 30 | LFS system with bad commands.</para>
|
---|
[cba2d4e] | 31 |
|
---|
[d781ffb] | 32 | </sect1>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.