Bob: Thanks very much for taking the time and explaining in full detail! I appreciate it....(tho didnt expect it)! :-)
Best Regards; Mehdi B. > Date: Mon, 17 Aug 2009 16:54:59 -0600 > From: b...@proulx.com > To: mehd...@hotmail.com > CC: bug-coreutils@gnu.org > Subject: Re: chroot diff. errors? > > Mehdi _1 wrote: > > Sometimes the command chroot does not work, for instance ,earlier > > the same command (below) worked in the same directory! But now I > > get these: > > > > r...@ubuntu9:disk>chroot . > > /bin/bash: error while loading shared libraries: libncurses.so.5: cannot > > open shared object file: No such file or directory > > > > r...@ubuntu9:disk>pwd > > /media/disk > > This means that loading libncurses.so.5 needed by bash in the chroot > failed. In the chroot probably means /media/disk/lib/libncurses.so.5 > inside the chroot but also means any dependent libraries too. Do all > of those libraries exist in the chroot? > > > The /media/disk is a hard drive not on obtical but I changed > > directories anyway but then I get this other error: > > > > r...@ubuntu9:xen>chroot /mnt/xen/ > > chroot: cannot run command `/bin/bash': No such file or directory > > That means that /mnt/xen/bin/bash could not be invoked in the chroot. > Does it exist there? > > > Sorry for the long email, I am not looking for answer or reply, it > > is probably something I am running/doing?! Though as I said the > > chroot worked earlier today on the same machine!? > > The most typical problem people have with creating chroots is not > installing all of the necessary executables and dependent libraries > inside the chroot. The documentation for chroot says: > > If you want to use a dynamically linked executable, say `bash', then > first run `ldd bash' to see what shared objects it needs. Then, in > addition to copying the actual binary, also copy the listed files to > the required positions under your intended new root directory. > Finally, if the executable requires any other files (e.g., data, state, > device files), copy them into place, too. > > Bob _________________________________________________________________ Windows Live: Keep your friends up to date with what you do online. http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009