The easiest and probably best thing to do (I do it ;) is to use something like this in .bashrc for the lfs user: cd $LFS/sources sh stage1-static.sh 2>&1 | tee /mnt/lfs/sources/logs/detailed-stage1.log exit
Of course your scripts need to be in $LFS/sources/[somewhere]. After the lfs user automatically finished the static tools mount the virutal fs: su - lfs mount .... (see the book) chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" /tools/bin/bash --login +h /sources/stage2-wrapper.sh This way the lfs user builds everything static, exits nicely if everything worked out OK and your script is back in control. After this, I execute a script (in this case called /sources/stage2-wrapper.sh) which builds the rest of the system. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page