%general-entities; ]> Creating a limited directory layout in LFS filesystem The first task performed in the LFS partition is to create a limited directory hierarchy so that programs compiled in (as well as glibc and libstdc++ in ) may be installed in their final location. This is needed so that those temporary programs be overwritten when rebuilding them in . Create the required directory layout by running the following as root: mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin} for i in bin lib sbin; do ln -sv usr/$i $LFS/$i done case $(uname -m) in x86_64) mkdir -pv $LFS/lib64 ;; esac mkdir -pv $LFS/usr/lib32 ln -sv usr/lib32 $LFS/lib32 mkdir -pv $LFS/usr/libx32 ln -sv usr/libx32 $LFS/libx32 mkdir -pv $LFS/usr/lib{,x}32 ln -sv usr/lib32 $LFS/lib32 ln -sv usr/libx32 $LFS/libx32 The above command is correct. The ln command has a few syntactic versions, so be sure to check info coreutils ln and ln(1) before reporting what you may think is an error. Programs in will be compiled with a cross-compiler (more details in section ). In order to separate this cross-compiler from the other programs, it will be installed in a special directory. Create this directory with: mkdir -pv $LFS/tools