diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 0c1d33f6d..d255411b1 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,11 @@ +2023-07-22 Xi Ruoyao + * In mountvirtfs, create symlinks /dev/{fd,std{in,out,err}} and + /dev/core (optional). + +2023-07-16 Xi Ruoyao + * In udev, set SYSTEMD_LOG_TARGET=kmsg so systemd-udevd will correctly + log messages. + 2023-07-15 Xi Ruoyao * Use /bin/udevadm instead of /sbin/udevadm. diff --git a/bootscripts/lfs/init.d/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index 21d98a05d..bbf30cf90 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -7,8 +7,9 @@ # Authors : Gerard Beekmans - gerard@linuxfromscratch.org # DJ Lucas - dj@linuxfromscratch.org # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org +# Xi Ruoyao - xry111@xry111.site # -# Version : LFS 7.0 +# Version : LFS 12.0 # ######################################################################## @@ -62,6 +63,29 @@ case "${1}" in log_info_msg2 " ${INFO}/dev/shm" mount -o nosuid,nodev /dev/shm || failed=1 + (exit ${failed}) + evaluate_retval + if [ "${failed}" = 1 ]; then + exit 1 + fi + + log_info_msg "Create symlinks in /dev targeting /proc: ${INFO}/dev/stdin" + ln -sf /proc/self/fd/0 /dev/stdin || failed=1 + + log_info_msg2 " ${INFO}/dev/stdout" + ln -sf /proc/self/fd/1 /dev/stdout || failed=1 + + log_info_msg2 " ${INFO}/dev/stderr" + ln -sf /proc/self/fd/2 /dev/stderr || failed=1 + + log_info_msg2 " ${INFO}/dev/fd" + ln -sf /proc/self/fd /dev/fd || failed=1 + + if [ -e /proc/kcore ]; then + log_info_msg2 " ${INFO}/dev/core" + ln -sf /proc/kcore /dev/core || failed=1 + fi + (exit ${failed}) evaluate_retval exit $failed diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index f7d4b9bff..f3b07b022 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -7,8 +7,9 @@ # Authors : Zack Winkles, Alexander E. Patrakov # DJ Lucas - dj@linuxfromscratch.org # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org +# Xi Ruoyao - xry111@xry111.site # -# Version : LFS 7.0 +# Version : LFS 12.0 # ######################################################################## diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 9954b6c6d..f3f0648f3 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,17 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2023-07-22 + + + [xry111] - Make the mountvirtfs bootscript create essential + symlinks in /dev. Fixes + #5289. + + + + 2023-07-15 diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index b056cccd4..6feeb2f1e 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -463,8 +463,7 @@ Device Drivers ---> Install the documentation for the Linux kernel: -install -d /usr/share/doc/linux-&linux-version; -cp -r Documentation/* /usr/share/doc/linux-&linux-version; +cp -r Documentation -T /usr/share/doc/linux-&linux-version; It is important to note that the files in the kernel source directory are not owned by root. Whenever a diff --git a/packages.ent b/packages.ent index 7095cf435..513cf9a69 100644 --- a/packages.ent +++ b/packages.ent @@ -392,7 +392,7 @@ - +