I have a few questions about chroot:

  1. What are the minimum requirements for chroot? Can you chroot into another Unix OS that has /bin/bash in it?
  2. Is it possible for the chroot to run in other architectures besides the host OS?
  3. Will bash_profile be executed before the new chrooted environment starts?
link|improve this question
feedback

1 Answer

up vote 0 down vote accepted
  1. No (*)
  2. No (*)
  3. No - bash_profile is loaded by bash and therefore inside the chroot

(*) You can chroot from one variant of Linux to another, and you can chroot from FreeBSD to a Linux chroot provided you have the required linux personality support. The opposite is not possible. Not sure about Solaris and other more obscure unices.

(*) You obviously cannot change the architecture - how could you? Your CPU cannot execute other CPU instruction sets without an emulation layer (a virtual machine for example). What you can do is switch from 64-bit to 32-bit personality with:

linux32 chroot /path/to/32bitchroot
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.