From 4d04dc743f9e8bf0938491a152441053fcfc88dd Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 25 Sep 2022 13:32:29 +0800 Subject: [PATCH 1/2] init.d/swap: you can't mount a swap partition --- bootscripts/lfs/init.d/swap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootscripts/lfs/init.d/swap b/bootscripts/lfs/init.d/swap index 9747024c5..14075ae19 100644 --- a/bootscripts/lfs/init.d/swap +++ b/bootscripts/lfs/init.d/swap @@ -20,8 +20,8 @@ # Should-Stop: $local_fs # Default-Start: S # Default-Stop: 0 6 -# Short-Description: Mounts and unmounts swap partitions. -# Description: Mounts and unmounts swap partitions defined in +# Short-Description: Activates and deactivates swap partitions. +# Description: Activates and deactivates swap partitions defined in # /etc/fstab. # X-LFS-Provided-By: LFS ### END INIT INFO From f427ba2336446315375c372da8a30cd66a04be06 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 25 Sep 2022 15:16:23 +0800 Subject: [PATCH 2/2] 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). --- chapter10/kernel.xml | 16 +++++++++++----- general.ent | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index ac104e4b4..e7bcfdb87 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -335,12 +335,18 @@ Device Drivers ---> the /boot directory. - If the host system has a separate /boot partition, the files copied - below should go there. The easiest way to do that is to bind /boot on the - host (outside chroot) to /mnt/lfs/boot before proceeding. As the - &root; user in the host system: + If you've decided to use a separate &boot-dir; partition for the + LFS system (maybe sharing a &boot-dir; partition with the host + distro) , the files copied below should go there. The easiest way to + do that is to create the entry for &boot-dir; in &fstab; first (read + the previous section for details), then issue the following command + as the &root; user in the + chroot environment: -mount --bind /boot /mnt/lfs/boot +mount /boot + + The path to the device node is omitted in the command because + mount can read it from &fstab;. The path to the kernel image may vary depending on the platform being diff --git a/general.ent b/general.ent index 82d69cf08..1328f7c7c 100644 --- a/general.ent +++ b/general.ent @@ -122,6 +122,7 @@ root"> lfs"> /etc/fstab"> +/boot"> %packages-entities;