View Single Post
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#13
A chroot shell means a shell obtained by chrooting.

The chroot command (implementing the chroot call) makes all processes spawned by it (typically a shell, and whatever is run from that shell) see something other than the real root directory ( / ) as the root directory.

Perhaps the most common use of chroot is on rescue CDs for fixing broken Linux installs, which boot up using an image on the CD, mount your harddrive somewhere, and chroot there. It's also used for running things (daemons, typically) in a "chroot jail", so that any exploits that compromise that service can't propagate upward and compromise the whole machine. A particularly famous instance of that use is in the iPhone, hence the term "jailbroken" for an iPhone from whose chroot jail has been compromised. But it's also used for running similar, but different, systems on the same machine. The kernel has to be the same, since there's only one kernel running, but system libraries can differ.

So you could set up a debian root filesystem on your SD card, then
Code:
chroot /media/mmc2/debroot/
would start /media/mmc2/debroot/bin/sh (which would think it was /bin/sh) thinking that /media/mmc2/debroot/ was /. And you could have completely different libraries in that filesystem, and programs linked against them rather than the N800 versions, and they'd run just fine.
 

The Following 2 Users Say Thank You to Benson For This Useful Post: