Commit Graph

8390 Commits

Author SHA1 Message Date
Xi Ruoyao
bde421e48d
reboot: fix /dev/shm unmounting command
/dev/shm may be a mount point, or a symlink.
2022-10-02 16:12:26 +08:00
Pierre Labastie
8e0c191b9b umount /dev/shm before rebooting
Now that /dev/shm is always a mountpoint, it needs to be umounted
otherwise dev cannot be umounted.
2022-10-02 09:52:59 +02:00
Pierre Labastie
b3daf01578 Typos reported by "rhubarbpieguy" 2022-10-02 09:49:12 +02:00
David Bryant
4349661a7f Corrected grammatical errors and cleaned up English idiom. 2022-10-01 17:03:20 -05:00
Xi Ruoyao
2bf32ffa3a
kernfs: "device nodes" are in /dev, not "devices"
You cannot throw a NVIDIA GTX 690 into /dev :).
2022-10-01 15:27:19 +08:00
Xi Ruoyao
00588180ee
kernfs: modernize the explanation for bind mounting /dev
If you are using a "modern" distro (with devtmpfs and a modern udev
implementation), a bind mounting is actually not needed because you can
mount devtmpfs anyway.  The only reason for bind mounting is to be
compatible with old host distros where /dev is a directory containing
many static device nodes, or is a tmpfs (not same as devtmpfs) popluated
by bootscript or an old udev (modern udev implementations, including
eudev and systemd-udev used by LFS, strictly requires a devtmpfs on
/dev).

So update the explanation to match the status quo.
2022-10-01 15:14:22 +08:00
Xi Ruoyao
a8f3814a7b
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.
2022-10-01 13:35:59 +08:00
David Bryant
36cb08fbf0 Tweaked English idiom and edited for style. 2022-09-30 15:49:41 -05:00
David Bryant
29526d35ef Made grammatical corrections and stylistic changes to chapter 7.3.
Added clarification; the virtual file systems expose certain information
to programs in user space; chroot won't work without them.
2022-09-30 12:27:55 -05:00
David Bryant
52ddd6c033 Clarify some things in Intro to chroot; simplify some verbiage. 2022-09-30 11:24:14 -05:00
Bruce Dubbs
d11d449565 Merge branch 'trunk' of git.linuxfromscratch.org:lfs into trunk 2022-09-30 11:12:01 -05:00
Xi Ruoyao
543c94cb9c
libstdc++ "stage 3" is not rebuilt for the same reason as "stage 2"
I'm pretty sure "stage 2" libstdc++ (installed in ch6) is already fully
featured.  The reason to rebuild the stage 3 libstdc++ (or entire
stage 3 gcc) is same as the reason to rebuild every packages in multiple
chapters: to "settle down" it.

Merge the content of
https://www.linuxfromscratch.org/lfs/faq.html#rebuild-ch8 into the book
as an explanation.
2022-09-30 17:10:06 +08:00
Xi Ruoyao
77b46db0a8
toolchaintechnotes: highlight why the example (ubuntu vs android) needs "os" field 2022-09-30 16:24:55 +08:00
Xi Ruoyao
e18ba697eb
toolchain technical note: rewrite the descrption for triplet
- Don't say "most building system", refine the dicussion for autoconf.
  Other building systems may use a variant of triplet, or use a
  completely different system designation.
- Explain why a triplet may contain 4 fields in detail. "Histroical
  reason" is not really correct because 3-field triplet is still used
  today for BSD, Fuchsia, IOS, Mac OS X (darwin), Solaris, etc.
- "machine" triplet to "system" triplet (strictly speaking, only the
  first field in the triplet is for the machine).

Why we need to say "vendor can be omitted" explicitly: we mention "gcc
-dumpmachine".  On some distros (like Ubuntu) the output has no vendor
field.  If you think this is too nasty, please remove both.
2022-09-30 10:43:19 +08:00
Bruce Dubbs
488b43aaeb New packages and an xml fix.
Update to bc-6.0.4.
Update to linux-5.19.12.
Fix an xml error.
2022-09-29 20:44:01 -05:00
Bruce Dubbs
79789000a8 Package updates.
Update to iana-etc-20220922.
Update to tzdata-2022d.
Update to readline-8.2.
Update to linux-5.19.11.
Update to libffi-3.4.3.
Update to libcap-2.66.
Update to dbus-1.14.2.
Update to bc-6.0.3.
Update to bash-5.2.
2022-09-29 18:32:56 -05:00
David Bryant
cc0e77d267 Fix English idiom / clarify "General Instructions" section. 2022-09-29 16:30:17 -05:00
Pierre Labastie
eb30b32333 Revert "Update libreadline soversion (used in stripping)"
This reverts commit 0665add6d8.

new version of bash is not yet in the book!
2022-09-29 21:32:29 +02:00
Pierre Labastie
0665add6d8 Update libreadline soversion (used in stripping) 2022-09-29 21:16:06 +02:00
David Bryant
3c4e129d8c Make minor corrections to English idiom / style. 2022-09-29 14:12:10 -05:00
Xi Ruoyao
891b48b84b
toolchaintechnotes: update description about libstdc++
Since r11.0-r199, libstdc++ pass 2 is built as a part of gcc pass 2, not
in chroot.
2022-09-29 20:08:56 +08:00
Xi Ruoyao
de94423625
toolchaintechnotes: revert "second pass" -> "second version" change
"Pass 1" and "Pass 2" have specific meaning in LFS.
2022-09-29 19:43:54 +08:00
Xi Ruoyao
ea9263cbf0
toolchaintechnotes: add the rationale for cross compiling ch6 packages
"need to be cross compiled" alone does not make too much sense: we
compile these packages in chapter 8 anyway.  The real reason forcing a
cross compilation is circular dependency: if building A needs B but
building B needs A, we'll have to cross compile at least one of A and B
or we won't be able to build either in the chroot.
2022-09-29 19:38:47 +08:00
Xi Ruoyao
a243b36b8b
toolchaintechnotes: gcc -dumpmachine is similar to config.guess, but not same
Many distros have some customized things in gcc -dumpmachine.  RHEL uses
x86_64-redhat-linux-gnu, and Ubuntu uses x86_64-linux-gnu ("vendor"
field omitted).  So don't use "same" here, and also mention the "vendor"
field is sometimes omitted.
2022-09-29 19:12:18 +08:00
Xi Ruoyao
aa9ade1fba
more clarification of "log in as lfs user"
And, don't recommended to "log in as lfs through a DM" anymore: if you
log in through a DM then start a terminal emulator, the first shell in
the emulator is often a non-login shell.  It's not something we expect.
2022-09-29 18:26:52 +08:00
Xi Ruoyao
199d14c997
addinguser: don't say "log in as lfs user"
"log in" is a specifically defined action on UNIces.  When you log in
as a user, an entry will be added into /run/utmp and /var/log/wtmp.
But when you switch to lfs with "su", this won't happen.

"man su" also describes "--login" as:

    Provide an environment similar to what the user would expect had
    the user logged in directly.

It's "similar to" logged in, not "really" logged in.

So, don't say "log in" or the users may assume they must really log in
as lfs in a VT or DM.
2022-09-29 17:52:11 +08:00
David Bryant
562062295e Polish up the prose in "Toolchain Technical Notes". Fix capitalization.
Rough edges remain. For instance, $LFS_TGT-ld is referenced, but not
clearly defined. Will need to discuss wirh other editors to resolve.
2022-09-28 14:56:52 -05:00
David Bryant
dd7f9df19f Cleaned up verbiage in unnumbered intro to part 3 (chapters 5 et seq). 2022-09-28 11:26:36 -05:00
David Bryant
ef93b66006 Adjust English idiom and clarify directions (chapters 4.5 and 4.6). 2022-09-27 13:42:07 -05:00
David Bryant
ec7b046623 Tweaked English idiom / clarified directiions in chapters 4.3 and 4.4. 2022-09-27 13:07:58 -05:00
David Bryant
2646c571d7 Clarify "mounting a partition" (chapter 2.7). 2022-09-27 12:21:38 -05:00
David Bryant
97f4747aaf Tweak introduction as Pierre Labastie suggested (chapter 4.2). 2022-09-27 12:11:23 -05:00
Xi Ruoyao
471a32e836
whatsnew: add a paragraph about PIE+SSP change 2022-09-27 10:47:11 +08:00
Xi Ruoyao
f427ba2336
kernel: adjust the instruction for mounting /boot
LFS and the host may use different /boot configuration, so do not assume
they'll share a /boot partition (two different /boot partition or only one
with separate /boot are possible).
2022-09-25 15:16:23 +08:00
Xi Ruoyao
4d04dc743f
init.d/swap: you can't mount a swap partition 2022-09-25 13:36:11 +08:00
Xi Ruoyao
f4066122e0
libelf: add a x86 specific test failure
It's caused by a minor GAS issue, which should be fixed in
binutils-2.40.

See https://sourceware.org/bugzilla/show_bug.cgi?id=29450 and
https://sourceware.org/bugzilla/show_bug.cgi?id=29451.
2022-09-25 12:56:08 +08:00
Xi Ruoyao
ad9fbd14ae
mounting: create &fstab; conventional entity and use it 2022-09-24 18:56:45 +08:00
Xi Ruoyao
f001ece905
creatingfilesystem: Refine the condition where a FS is needed
For example, a swap partition does not contain any FS.  And, if you want
to clone a partition, you can use

    dd if=/dev/<old-partition> of=/dev/<new-partition>

then it's unnecessary to create a FS on new-partition before operation.
This is sometimes faster than creating a new FS, mounting both
partition, then "cp -av" if the old-partition contains many small files.
2022-09-24 18:48:50 +08:00
David Bryant
2ed0e93787 Refine verbiage in chapter 4.2 (Creating a limited directory layout). 2022-09-23 15:52:30 -05:00
David Bryant
1cb4a25b36 Tweak English idiom in chapter 4.1 (Introduction) 2022-09-23 15:16:02 -05:00
David Bryant
81793c6efc Minor changes to verbiage in chapter 3.2 (All Packages) 2022-09-23 14:57:48 -05:00
David Bryant
50e70dbc1f Clarify verbiage in chapter 2.6 (Setting the $LFS Variable). 2022-09-23 14:08:34 -05:00
Xi Ruoyao
10d7c7a820
binutils: document a test failure
It happens on both x86_64 and aarch64.
2022-09-23 23:48:46 +08:00
David Bryant
b6a67d37b5 Clean up English idiom / grammar in chapter 3.1 (Introduction).
(Note that "errata" are plural; "erratum" is the singular nun.)
2022-09-22 17:08:43 -05:00
David Bryant
9011f2d242 Clean up grammar / idiom in chapter 2.7 (Mounting the New Partition) 2022-09-22 16:17:48 -05:00
David Bryant
4ca7966259 Corrected grammar / idiom / punctuation.
Also added an introduction explaining what a file system does.
2022-09-22 15:24:38 -05:00
David Bryant
58f92b0647 Correcting idiom / syntax again, based on feedback from Bruce & Doug. 2022-09-22 14:31:32 -05:00
Xi Ruoyao
b00063f2a5
partition: update the description for /tmp with tmpfs 2022-09-23 02:03:38 +08:00
Xi Ruoyao
fc472c83d9
partition: update examples for /opt
We don't use /opt for GNOME, so use Texlive as another example.
2022-09-23 01:40:51 +08:00
Xi Ruoyao
67756f3ec2
fix a typo 2022-09-23 01:31:26 +08:00