Results 1 to 5 of 5

Thread: chroot error- "No such file or directory"

  1. #1
    Join Date
    Nov 2010
    Posts
    56

    chroot error- "No such file or directory"

    Hello,
    Here, I try to chroot environment to change a liveCD so I followed this tutorial

    http://doc.ubuntu-fr.org/personnaliser_livecd

    When I was chrooted the right to a
    # Chroot system /
    chroot: cannot execute the command `/ bin / bash ': No such file or directory type

    So I try
    # Chroot system / bin / bash
    chroot: cannot execute the command `/ bin / bash ': No such file or directory type

    Same error.
    Does anyone have any idea? Please help me to solve my problem. Thank you very much

  2. #2
    Join Date
    Apr 2008
    Posts
    3,522

    Re: chroot error- "No such file or directory"

    The chroot command uses, among others, two system calls. First, it changes the root directory (chroot system call (2)) indicating that the directory given as argument is the root to the process current and then tries to run the program given in the second argument (function execve (2 ). In the case of a chroot system [/ bin / bash], the program will be tempted to run the / bin / bash in the new environment, ie, the control system / bin / bash and not / bin / bash you think. Indeed, when the command is executed, the / the new environment is no longer the main directory tree unix basic but the system directory / bin / bash.

  3. #3
    Join Date
    May 2008
    Posts
    4,085

    Re: chroot error- "No such file or directory"

    You did not read carefully the link I gave you. Once chrooted, the command is / bin / sh but in the new environment. It is therefore necessary that you are in your directory, a directory "bin" containing the executable bash.

    So I suggest you try the following system:
    Code:
    mkdir system/bin system/lib system/etc cp /bin/bash /bin/ls system/bin cp /lib/libacl.so.* /lib/libattr.so.* /lib/libc.so.* /lib/libdl.so.* /lib/libncurses.so.* system/lib cp /lib/libpthread.so.* /lib/librt.so.* /lib/libselinux.so.* /lib/libsepol.so.* system/lib cp /lib/ld* system/lib cp /etc/passwd /etc/group system/etc chroot system /bin/bash

  4. #4
    Join Date
    Nov 2009
    Posts
    687

    Re: chroot error- "No such file or directory"

    It happens that the bash was in the system / bin because in fact I started a. Iso file and I copied the files in my system. It was however miss the bookstores that you provided me.

    bash: / usr / bin / groups: / bin / sh: bad interpreter: No such file or directory type
    I have no name! @ abc-laptop: / #

    It's already better. Looks like the environment I wanted chrooted took her hand. Maios bad interpreter is strange

    Thank you again.

  5. #5
    Join Date
    May 2008
    Posts
    3,516

    Re: chroot error- "No such file or directory"

    Hello all with each other.
    So I once again and now I'm at the point angkommen where to chroot into his gentoosytem:

    chroot / mnt / gentoo / bin / bash
    ...
    ...
    ...

    so with the above command If this error:

    root @ ubuntu: / mnt / gentoo # chroot / mnt / gentoo / bin / bash
    chroot: it is not possible, "/ bin / bash" to execute: Error in format of the program file

    How do I solve my problem. Need help.

Similar Threads

  1. Replies: 4
    Last Post: 12-02-2011, 07:10 AM
  2. How to avoid the "FILE or Directory" message in Xcopy
    By Channing in forum Operating Systems
    Replies: 3
    Last Post: 31-03-2010, 12:46 PM
  3. "Failed to open stream No such file or directory" error in PHP
    By EULALIA in forum Software Development
    Replies: 3
    Last Post: 13-07-2009, 02:40 PM
  4. Error message "crt0.o no such file or directory"
    By Francesca in forum Operating Systems
    Replies: 1
    Last Post: 19-02-2009, 12:34 PM
  5. In vista how to disable the "scan" the file in a directory ... ?
    By Brijesh Shah in forum Operating Systems
    Replies: 3
    Last Post: 07-02-2009, 07:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,007,797.08283 seconds with 16 queries