Yasser Zamani wrote: > Hi there, > > While processing chapter 6 of LFS-7.1 could be long, I would like to share my > .sh file which prepares your environment to continue with chapter 6 after system reboot. > > While you are logged in as root (via command su), issue following command to create a .sh file named go-lfs-6.sh:
> cat > go-lfs-6.sh << EOF > LFS = /mnt/lfs > export LFS > mount -v <xxx> $LFS > mount -v --bind /dev $LFS/dev > mount -vt devpts devpts $LFS/dev/pts > mount -vt tmpfs shm $LFS/dev/shm > mount -vt proc proc $LFS/proc > mount -vt sysfs sysfs $LFS/sys > chroot "$LFS" /tools/bin/env -i HOME=/root TERM="xterm" > PS1='\[\033[1;31m\]\u:\w$\[\033[0m\] ' > PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h > EOF > > NOTE: Replace <xxx> with your LFS partition e.g. /dev/sda7. NOTE: chroot > command has been rewrote to make the command prompt color to light red which can help you to separate command's results from each other by eye in bash! > > Then every time you reboot, while you are logged in as root (via command su), > just issue following command to prepare to continue with chapter 6: I'll note that you only want to call this once per boot. You don't want to do all those mounts multiple times unless you unmount them when you exit chroot. Since you want to change PS1, it would be more readable to have: RED="\[\e[1;31m\]" NORMAL="\[\e[0m\]" chroot "$LFS" /tools/bin/env -i HOME=/root TERM="xterm" \ PS1="$RED\u:\w$NORMAL" PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h Another thing. After you finish Chapter 6, you can drop :/tools/bin from the PATH and /tools from the bash command. -- Bruce -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page