> Date: Wed, 9 May 2012 11:36:32 -0500
> From: [email protected]
> To: [email protected]
> Subject: Re: [lfs-support] .sh file for chapter 6 (all mounts in one)
> 
> 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.

Actually I done these because of foot note at 
http://www.linuxfromscratch.org/lfs/view/stable/chapter06/chroot.html
Also, I thought rebooting system will unmountes them too like it unmountes my 
LFS partition! what does make this difference?

> 
> Since you want to change PS1, it would be more readable to have:
> 
> RED="\[\e[1;31m\]"
> NORMAL="\[\e[0m\]"

Nice idea; thanks!

> 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.

Roger, I'll.

-Yasser
                                          
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to