I just tried to automating mounting while loggin in without any extra typing; However, I'll use your advise instead, thanks!
What about second idea? i.e. defining .bashrc for user root like lfs user to export $LFS variable. The book does not talk about repeating the steps, it may consider we will learn this from previous sections. Thanks! > Date: Mon, 7 May 2012 12:53:11 -0500 > From: bruce.du...@gmail.com > To: lfs-support@linuxfromscratch.org > Subject: Re: [lfs-support] mounting via .bashrc as root (2 suggestions) > > Yasser Zamani wrote: > > Hi there, > > > > I have two suggestions for the book which I hope will be helpful: > > > > As in every computer boot up and logging in as lfs user I had to run 'mount > /dev/sda7 /mnt/lfs' as root, I added (rewrited) this to .bashrc file as > following (rewriting LFS-7.1 4.4. Setting Up the Environment section): > > > > cat > ~/.bashrc << "EOF" > > set +h > > umask 022 > > LFS=/mnt/lfs > > LC_ALL=POSIX > > LFS_TGT=$(uname -m)-lfs-linux-gnu > > PATH=/tools/bin:/bin:/usr/bin > > export LFS LC_ALL LFS_TGT PATH > > mount /dev/sda7 $LFS > > EOF > > That is a very bad idea. What problem are you trying to solve? > > If you want to automate mounting and changing to the root user after a > reboot, do > something like this: > > cat > go-lfs.sh <<EOF > #!/bin/bash > su -C mount /dev/sda7 /mnt/lfs > su - lfs > EOF > > bash go-lfs.sh > > -- Bruce > -- > http://linuxfromscratch.org/mailman/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/lfs/faq.html > Unsubscribe: See the above information page
-- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page