bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chroot diff. errors?


From: Bob Proulx
Subject: Re: chroot diff. errors?
Date: Mon, 17 Aug 2009 16:54:59 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

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:
> 
> address@hidden:disk>chroot .
> /bin/bash: error while loading shared libraries: libncurses.so.5: cannot open 
> shared object file: No such file or directory
> 
> address@hidden: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:
> 
> address@hidden: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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]