DEV Community

pipishuo
pipishuo

Posted on

some problem about buildding LFS on Debian with WSL

I encountered some problems when I build LFS on Debian with WSL.
The official document is here

LFS chroot cannot find /usr/bin/env

run the command ln -sv usr/lib $LFS/lib in $LFS.
I crushed same problem when i am building Linux from Scratch. on the "4.2. Creating a Limited Directory Layout in the LFS Filesystem",I run the part of shell ln -sv usr/$i $LFS/$i go wrong ,so i not have the symbol link $LFS/lib->usr/liband the problem arose.

Analogically. I need to run ln -sv usr/bin $LFS/bin and ln -sv usr/sbin $LFS/sbin

Top comments (2)

Collapse
 
pipishuo profile image
pipishuo

8.37. Libtool-2.5.4
./configure --prefix=/usrno acceptable m4 could be found in \$PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended

Yesterday I close power off my PC.Now I only runchroot "$LFS" /usr/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
MAKEFLAGS="-j$(nproc)" \
TESTSUITEFLAGS="-j$(nproc)" \
/bin/bash --login

I forget the commands of 7.3. Preparing Virtual Kernel File Systems
runmount -v --bind /dev $LFS/dev
mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
mount -vt tmpfs tmpfs $LFS/run

It's working!

Collapse
 
pipishuo profile image
pipishuo

In 8.13. M4-1.4.20,need to run commandmake distclean.otherwise make error