LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-18-2015, 11:35 PM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Rep: Reputation: Disabled
chroot question


I have a question to the professionals out there: when do you make use of chroot? In what kind of situations?
 
Old 11-18-2015, 11:59 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Chroot is a way of isolating applications from the rest of your computer, by putting them in a jail. This is particularly useful if you are testing an application which could potentially alter important system files, or which may be insecure.

Chroot can be used in a number of instances.
https://en.wikipedia.org/wiki/Chroot

Code:
SEE ALSO
       chroot(2)

       The  full  documentation  for chroot is maintained as a Texinfo manual.
       If the info and chroot programs are properly installed  at  your  site,
       the command

              info coreutils 'chroot invocation'

       should give you access to the complete manual.

GNU coreutils 8.21               February 2013                       CHROOT(1)
lines 32-56/56 (END)
HTH
 
Old 11-19-2015, 02:28 AM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
chroot can also be used to reset the root password coming from a rescue system. Image you lost root password, start a live cd, then mount the "original" system and chroot to it. After that passwd root sets a new password.
Another example is if you installed a system through debootstrap to finalize the process you chroot to the new system. Or if you have a virtual disk that you want to access outside of the virtual machine. Mount it through loop and chroot to it.
 
Old 11-19-2015, 08:42 AM   #4
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
Thank you for answers. The answers were most helpful.
 
Old 11-19-2015, 08:52 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Here is a bit unusual way to use chroot. I have a Zotac box as MythTV frontend. Binary distros keep crashing on it, but Gentoo runs rock solid. To run Gentoo one has to compile alot. This little box really can't take compiling, it overheats and shuts down. So I export the root filesystem from Zotac over NFS, mount it from another computer, chroot into Zotac and build everything not using Zotac resources at all.
 
1 members found this post helpful.
Old 11-19-2015, 04:56 PM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by validator456 View Post
Thank you for answers. The answers were most helpful.
Your Welcome:-
 
Old 11-19-2015, 06:10 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'd also add that (for RHEL derived) bind installs as chrooted automatically - this sometimes catches people out
 
  


Reply

Tags
chroot



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot question Bazzaah Slackware 9 07-16-2012 10:52 AM
Chroot question... linus72 Linux - Newbie 0 04-11-2009 06:11 AM
Chroot - question ef_ Linux - Software 3 10-14-2004 05:57 AM
vsftp and chroot question blubbfish Linux - Security 2 10-04-2004 10:03 AM
chroot question akwida Linux From Scratch 8 11-05-2003 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration