Re: newbie chroot problem
From: Peter Jensen (usenet_at_pekajemaps.homeip.net)
Date: 18 Aug 2005 17:47:34 GMT
> total 780
> drwxr-xr-x 2 root root 4096 Aug 18 12:23 .
> drwxr-xr-x 4 root root 4096 Aug 18 12:22 ..
> -rwxr-xr-x 1 root root 772760 Feb 17 20:30 bash
> Then, when I try chroot /crtest I get:
> # chroot /crtest
> chroot: cannot run command `/bin/bash': No such file or directory
> [root@localhost /]#
> Obviously, I am missing something here.
I had to look a while to spot it, but it's actually quite simple. You
chroot to /crtest, but all that is there is *another* crtest directory,
where there should have been your new root system. Either move the new
root hierarchy up one level or use chroot /crtest/crtest.
Note that running ldd on a binary is just a minimum requirement for the
app to even start. Other libraries and configuration files may be
required for certain functionality later on. Best of luck with whatever
-- PeKaJe BOFH Excuse #368: Failure to adjust for daylight savings time.