From 68b56a3c3303ceff24ac3373d17ac5401354527b Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 11 Jan 2025 23:31:54 +0800 Subject: [PATCH] creatingminlayout: Set the owner and permission of $LFS The host distro may have an insane default for root_owner and/or root_perms in /etc/mke2fs.conf, so let's make it sane on our own. Note that MKE2FS_CONFIG=/dev/null makes mke2fs refuse to run so we cannot suppress the host mke2fs.conf. --- chapter04/creatingminlayout.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chapter04/creatingminlayout.xml b/chapter04/creatingminlayout.xml index d4bfe9af1..96f0c591a 100644 --- a/chapter04/creatingminlayout.xml +++ b/chapter04/creatingminlayout.xml @@ -18,6 +18,15 @@ location. We do this so those temporary programs will be overwritten when the final versions are built in . + At first, set the owner and permission mode of the + $LFS directory (i.e. the root + directory in the newly created file system for the LFS system) to + &root; and 755 in case the host distro has been + configured to use a different default for mkfs: + +chown root:root $LFS +chmod 755 $LFS + Create the required directory layout by issuing the following commands as root: