Re: [opensuse] chroot: cannot run command `/bin/bash': No such file or directory
Hi Joe, hi all,
yes, I'm running chroot from the directory I want to chroot...
# pwd
/disk2/mnt/sources
# chroot /disk2/mnt/sources
chroot: cannot run command `/bin/bash': No such file or directory
Martin
----- Original Message ----
From: Joe Morris (NTM)
2. nothing special... just mounted the ISO image and wanted to chroot to where it is mounted...
Did you cd first to the directory you are chrooting to? IIANM, you should cd /disk2/mnt/sources chroot /disk2/mnt/sources exit to leave the chroot. HTH. -- Joe Morris Registered Linux user 231871 --------------------------------------------------------------------- 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
-----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
Carlos, On Monday 13 November 2006 07:35, Carlos E. R. wrote:
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.
If you run chroot with only the new root directory name, it's kind of like "su," in that it runs an interactive shell. Or tries to. In this case, there was no shell to run (or one of its dynamic dependencies could not be resolved), so an error results. It's all in the man page.
...
Randall Schulz --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Carlos E. R.
-
Martin Mielke
-
Randall R Schulz