RE: What is the chroot environment?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Richard Wilson [mailto:RWilson@xxxxxxxxxxxxx]
> 
> This may be a silly question, I've only been working with 
> Linux for about 3
> months now, so please forgive me if this is not an 
> appropriate question.
> 
> There is no mention of the --nochroot switch in Martin 
> Hamilton's RedHat
> Linux KickStart How to.
> 
> Red Hat's customization guide briefly mentions this but does 
> not really
> explain why I need to set this switch.
> 
> My scripts seem to run without --nochroot, why would I need 
> to use this?

The chroot command is to `change root`.  On a running system, the root is
set to /.  There are instances when it is good to change the root for
certain programs (e.g. bind), so that it cannot get out of the changed root
directory.

In relation to kickstart, the installer changes the root to /mnt/sysimage,
which happens to be the root of your newly installed system.  You would use
--nochroot, for instance, if you wanted to get something from the CD.  You
can use both --nochroot and the chrooted environment:

%post
commands
etc...

%post --nochroot
cp /mnt/source/directory/on/cd /mnt/sysimage/root

(this copies the directory on the cd to /root).

Forrest





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux