[lfs-support] chroot into the temporary ...?

Aleksandar Kuktin akuktin at gmail.com
Tue Sep 24 19:05:36 PDT 2013


>On Wed, 25 Sep 2013 09:56:34 +0800 (CST)
>Wiky  <wiiiky at yeah.net> wrote:
>
> I got it, Thank you.
>
> At 2013-09-25 09:49:36,"Aleksandar Kuktin" <akuktin at gmail.com> wrote:
> >>On Wed, 25 Sep 2013 08:41:37 +0800 (CST)
> >>Wiky <wiiiky at yeah.net> wrote:
> >>
> >>  hi,
> >>     It reads 'That is, we chroot into the temporary mini Linux
> >> system, ..' in Section6.1 of LFS7.4. but when i run 'sudo
> >> chroot /mnt/lfs', it returns 'chroot: failed to run command
> >> `/bin/bash': No such file or directory'. Of
> >> course /mnt/lfs/bin/bash not exists and then I tried 'sudo
> >> chroot /mnt/lfs/tools', it also 'chroot: failed to run command
> >> `/bin/bash': No such file or
> >> directory',but /mnt/lfs/tools/bin/bash exists. I really have no
> >> idea with the problem,maybe I have missed something in Ch5?
> >> Thanks in advance and sorry for my English.
> >
> >You didn't specify which program should chroot exec() after it
> >chroots itself, so it did the default: tried to execute /bin/bash.
> >Since there is no such program (/mnt/lfs/bin/bash in the root
> >filesystem), it failed.
> >
> >To fix this, you should specify which program should be executed.
> >Like this:
> >
> >chroot /mnt/lfs /tools/bin/bash
> >
> >But the full command is in Chapter 6.4. so look it up there.
> >
> >-- 
> >You don't need an AI for a robot uprising.
> >Humans will do just fine.

Don't top post.

Also, a post in the thread "LFSv7.4 stuck at section 6.9.1" gave me an
idea about why you were unable to run `chroot /mnt/lfs/tools'. The bash
that lives there requests the dynamic interpreter (run-time
linker) /tools/lib/ld-<whatever>.so and that did not exist.

You can verify this by adding a symbolic link `tools' to /mnt/lfs/tools
which points to `..'. Like this (command run from /mnt/lfs/tools):

ln -sv .. tools

With this, you should be able to do `chroot /mnt/lfs/tools' without any
problems. Just don't execute Section 6. with that setup because you
will have A LOT of problems and a lot of thrashing. ([thinking]...or
maybe not... anyway, don't do it. not when you are building LFS for the
first time)

-- 
You don't need an AI for a robot uprising.
Humans will do just fine.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20130925/c1258776/attachment.sig>


More information about the lfs-support mailing list