Re: [SOLVED] [opensuse] chroot: cannot run command `/bin/bash': No such file or directory
Hello Carlos, hello all, after reading all the replies posted to the list I reviewed everything again and again making tests here and there. In fact, as Carlos stantes, the command chroot itself runs perfectly. But in order to avoid the error that started this thread I must replicate the whole environment (directory tree /bin, /lib, /lib/tls, etc) on the chroot'ed jail for each command to be executed, as suggested by other users on their posts (sorry guys if I don't remember your names now but you know who you are ;) ). So, copying both binaries and libraries (obtained by running ldd /path/to/binary) was quite tedious but at least I'm on the correct road now... Let's see what happens next! :-) Thanks everybody for their help and suggestions! Regards, Martin ----- Original Message ---- From: Carlos E. R. <robin.listas@telefonica.net> To: OpenSuSE <opensuse@opensuse.org> Sent: Monday, November 13, 2006 4:35:26 PM Subject: Re: [opensuse] chroot: cannot run command `/bin/bash': No such file or directory -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2006-11-13 at 06:41 -0800, Martin Mielke wrote:
# pwd /disk2/mnt/sources
# chroot /disk2/mnt/sources chroot: cannot run command `/bin/bash': No such file or directory
Mi understanding is that trying to run a command that is not local to the chroot environment would fail. But the chroot command itself should run. Look, the info page says: | Exit status: | | 1 if `chroot' itself fails | 126 if COMMAND is found but cannot be invoked | 127 if COMMAND cannot be found | the exit status of COMMAND otherwise nimrodel:~ # chroot /mnt ; echo $? chroot: cannot run command `/bin/bash': No such file or directory 127 nimrodel:~ # So, it is trying to execute a command on entry, although I have specified none. It must be bash itself. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFWJDAtTMYHG2NR9URAon1AKCPzPYULzNY5QXr2lC2CkbbqgDwqQCfd/mi gd1E7XPAVKe9JpxG6OUca2M= =VRtk -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (1)
-
Martin Mielke