LFS user and Chroot
pratte at ecn.purdue.edu
Sun Feb 15 07:50:30 PST 2004
On Sun, 15 Feb 2004, Richard Hamilton wrote:
> This is sort of off topic, but....
> Isn't compiling code as root a bad thing in some situations?
Not really. The issue in any *nix is that you want to do as little as
root as possible to avoid potentially dangerous typos like 'rm -rf *' when
'$cwd = /'. However, once you chroot, you are no longer root in your old
system, you are now root in your new LFS system. So, if your LFS build is
taking place in /mnt/lfs, you are now root in /mnt/lfs and lower. Until
you exit from your chroot, you will not be risking any dangerous typos
above /mnt/lfs. At this point, it's perfectly safe.
More information about the lfs-support