Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Can't change root in cross-lfs-multilib-x86_64

  1. #1
    Join Date
    Jun 2010
    Location
    London
    Posts
    572

    Default Can't change root in cross-lfs-multilib-x86_64

    Hi,

    I get chroot error during chrooting into clfs

    Code:
    chroot "${CLFS}" /tools/bin/env -i HOME=/root TERM="${TERM}" PS1='\uw\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h
    chroot: cannot change root directory to : No such file or directory
    My builds went smooth, it gave a couple of errors but I fixed those.

    How do I chroot into clfs.

    Best,

    Dave

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,733

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    What you do not show is what the value of the parameter CLFS is. It looks like ${CLFS} gives a file that does not exist (No such file or directory). Thus first show:
    Code:
    echo "${CLFS}"
    Henk van Velden

  3. #3
    Join Date
    Jun 2010
    Location
    London
    Posts
    572

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    Quote Originally Posted by hcvv View Post
    What you do not show is what the value of the parameter CLFS is. It looks like ${CLFS} gives a file that does not exist (No such file or directory). Thus first show:
    Code:
    echo "${CLFS}"

    It gives -
    /mnt/clfs
    I've set environment right and followed the book in totality. Didnt get any errors till bash build and later had to rebuild ncurses & bash. Should I set environment again.

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,733

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    As you may have noticed I am not even looking into clfs (I do not even know what it is) or if you build/installed that correct. I am simply looking at the chroot statement you typed and the error it gives.

    So you want to chroot to /mnt/clfs. Now the next mini-step (I thought you would have found that yourself) in this troubleshooting is of course checking if /mnt/clfs exists:
    Code:
    ls -l /mnt/clfs
    Thus, little step by little step, one checks all the parameters of the chroot statement to see if we can see the same a chroot sees: No such file or directory.
    Henk van Velden

  5. #5
    Join Date
    Jun 2010
    Location
    London
    Posts
    572

    Lightbulb Re: Can't change root in cross-lfs-multilib-x86_64

    Quote Originally Posted by hcvv View Post
    As you may have noticed I am not even looking into clfs (I do not even know what it is) or if you build/installed that correct. I am simply looking at the chroot statement you typed and the error it gives.

    So you want to chroot to /mnt/clfs. Now the next mini-step (I thought you would have found that yourself) in this troubleshooting is of course checking if /mnt/clfs exists:
    Code:
    ls -l /mnt/clfs
    Thus, little step by little step, one checks all the parameters of the chroot statement to see if we can see the same a chroot sees: No such file or directory.
    Here are various details -

    /mnt/clfs$ ls -l
    total 60
    drwxr-xr-x 9 clfs root 4096 Dec 27 08:36 cross-tools
    -rw-r--r-- 1 root root 434 Dec 27 16:16 errors
    drwx------ 2 root root 16384 Dec 27 03:54 lost+found
    -rw-r--r-- 1 root root 25151 Dec 27 16:31 progress
    drwxrwxrwx 37 clfs root 4096 Dec 27 16:43 sources
    drwxr-xr-x 14 clfs root 4096 Dec 27 13:17 tools
    ls -la /lib/ld*
    -rwxr-xr-x 1 root root 133995 Nov 29 2007 /lib/ld-2.5.1.so
    lrwxrwxrwx 1 root root 11 Nov 29 2007 /lib/ld-linux-x86-64.so.2 -> ld-2.5.1.so
    clfs:/mnt/clfs$ ldd -v /bin/bash
    libreadline.so.5 => /lib/libreadline.so.5 (0x00002b802bec9000)
    libhistory.so.5 => /lib/libhistory.so.5 (0x00002b802c006000)
    libncursesw.so.5 => /lib/libncursesw.so.5 (0x00002b802c10e000)
    libdl.so.2 => /lib/libdl.so.2 (0x00002b802c276000)
    libc.so.6 => /lib/libc.so.6 (0x00002b802c37a000)
    /lib64/ld-linux-x86-64.so.2 (0x00002b802bdad000)

    Version information:
    /bin/bash:
    libdl.so.2 (GLIBC_2.2.5) => /lib/libdl.so.2
    libc.so.6 (GLIBC_2.4) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    /lib/libreadline.so.5:
    libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    /lib/libhistory.so.5:
    libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    /lib/libncursesw.so.5:
    libdl.so.2 (GLIBC_2.2.5) => /lib/libdl.so.2
    libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    /lib/libdl.so.2:
    libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    libc.so.6 (GLIBC_PRIVATE) => /lib/libc.so.6
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    /lib/libc.so.6:
    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    ldd /bin/bash
    libreadline.so.5 => /lib/libreadline.so.5 (0x00002b82cee9f000)
    libhistory.so.5 => /lib/libhis

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,733

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    Please, please, use CODE instead of QUOTE tags around computer text. Posting in Code Tags - A Guide

    This will take some extra time for me to study because all layout is flown out of the windows (no pun intended).
    Henk van Velden

  7. #7
    Join Date
    Jun 2010
    Location
    London
    Posts
    572

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    Sorry abt that. Check the corrected version. I got this off typescript and there may be few errors in the text body. Files 'errors' & 'progress' are text files with various details and are not part of build.

    Code:
    /mnt/clfs$ ls -l
    total 60
    drwxr-xr-x  9 clfs root  4096 Dec 27 08:36 cross-tools
    -rw-r--r--  1 root root   434 Dec 27 16:16 errors
    drwx------  2 root root 16384 Dec 27 03:54 lost+found
    -rw-r--r--  1 root root 25151 Dec 27 16:31 progress
    drwxrwxrwx 37 clfs root  4096 Dec 27 16:43 sources
    drwxr-xr-x 14 clfs root  4096 Dec 27 13:17 tools
    
    ls -la /lib/ld*
    -rwxr-xr-x 1 root root 133995 Nov 29  2007 /lib/ld-2.5.1.so
    lrwxrwxrwx 1 root root     11 Nov 29  2007 /lib/ld-linux-x86-64.so.2 -> ld-2.5.1.so
    clfs:/mnt/clfs$ ldd -v /bin/bash
    	libreadline.so.5 => /lib/libreadline.so.5 (0x00002b802bec9000)
    	libhistory.so.5 => /lib/libhistory.so.5 (0x00002b802c006000)
    	libncursesw.so.5 => /lib/libncursesw.so.5 (0x00002b802c10e000)
    	libdl.so.2 => /lib/libdl.so.2 (0x00002b802c276000)
    	libc.so.6 => /lib/libc.so.6 (0x00002b802c37a000)
    	/lib64/ld-linux-x86-64.so.2 (0x00002b802bdad000)
    
    	Version information:
    	/bin/bash:
    		libdl.so.2 (GLIBC_2.2.5) => /lib/libdl.so.2
    		libc.so.6 (GLIBC_2.4) => /lib/libc.so.6
    		libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
    		libc.so.6 (GLIBC_2.3.4) => /lib/libc.so.6
    		libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    	/lib/libreadline.so.5:
    		libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
    		libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    	/lib/libhistory.so.5:
    		libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    	/lib/libncursesw.so.5:
    		libdl.so.2 (GLIBC_2.2.5) => /lib/libdl.so.2
    		libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
    		libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    	/lib/libdl.so.2:
    		libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
    		libc.so.6 (GLIBC_PRIVATE) => /lib/libc.so.6
    		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    	/lib/libc.so.6:
    		ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    
    
    ldd /bin/bash
    	libreadline.so.5 => /lib/libreadline.so.5 (0x00002b82cee9f000)
    	libhistory.so.5 => /lib/libhis

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,733

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    It seems that /mnt/clfs exists (even if you gave me a different output then I asked for). I see also that /mnt/clfs/tools exists. What about /mnt/clfs/tools/bin/env?

    EDIT: I do not know why you gave me the other iinformation. Do not know how to interprete in connection with the chroot error.
    Henk van Velden

  9. #9
    Join Date
    Jun 2010
    Location
    London
    Posts
    572

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    From what I understand is that there is a linking error. I have bash with staticlib but a dynamic link is needed (its still unclear to me). Some other guys at clfs irc asked that information too so I thought it might be appropriate.

    For /mnt/clfs/tools/bin/env, I will have to login and check. Will get the details in few minutes.

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,733

    Default Re: Can't change root in cross-lfs-multilib-x86_64

    Well, not knowiing anything about that product, I know something about chroot. In the end all files you mention there must exist. That is, the directories that go into the PATH variable used by env must not exist in the sense that they do not give an error here. That means that /mnt/clfs/tools/bin/env must be there, but also /mnt/clfs/tools/bin/bash. When one of them is not there a "No such file or directory" can be expected, but I admit that chroot shows it in s strange place. I think it gets a non zero return code and then says that it can not chroot and then places the message that it got after that. Which gives the strange combination.

    When you say that /mnt/clfs/tools/bin/bash might be corrupted, I am not sure that "No such file or directory" would be the result. But on the other hand, who knows whith those old Unix/Linux tools with cryptic error messages.
    Henk van Velden

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •