On 2/2/20 12:10 AM, Alan Feuerbacher via blfs-support wrote:

Any clues what's going south?

The lfs alias is not meant to be run from lfs user.  The only time you need to be user lfs is when building LFS Chapter 5.

Ok. But I thought that, once you're done building LFS, user lfs is just another random user name.

Not quite. If you change .bash_profile and .bashrc to more "normal" contents, then it would be OK. Notably, you do not want /tools/bin in the PATH and you do want the standard environment that .bash_profile removes.

Can you run

sudo chroot /mnt/lfs /usr/bin/env -i   \
    HOME=/root TERM="$TERM"            \
    PS1='(lfs chroot) \u:\w\$ '        \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    /bin/bash --login

as user alan?

Done. Same result.

Then your build has a problem.

From your host,
ls /mnt/lfs/usr/bin/e*

did it find env?  If not you didn't install coreutils properly.
I see below that you did that and it did not find env.

I did some extra checking just for grins. The Fedora31 system has /usr/bin/env and /bin/env. They are identical.

Because on Fedora /bin and /usr/bin are symlinks.  Check
ls -ld /bin /usr/bin



[alan@localhost ~]$ sudo chroot /mnt/lfs env -i   \
   HOME=/root TERM="$TERM"            \
   PS1='(lfs chroot) \u:\w\$ '        \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin \
   /bin/bash --login

chroot: failed to run command ‘env’: No such file or directory


Based on Ken's response, here are some more results. Of course, this is in the Fedora 31 system:


[alan@localhost ~]$ ll /usr/bin/env
-rwxr-xr-x. 1 root root 54096 Oct 17 01:37 /usr/bin/env

[alan@localhost ~]$ ll /bin/env
-rwxr-xr-x. 1 root root 54096 Oct 17 01:37 /bin/env

The above are looking at your host, not your LFS build.

[alan@localhost ~]$ echo $LFS
/mnt/lfs

[alan@localhost ~]$ ls -l $LFS/usr/bin/env
ls: cannot access '/mnt/lfs/usr/bin/env': No such file or directory

Run

chroot "$LFS" /tools/bin/env -i \
    HOME=/root                  \
    TERM="$TERM"                \
    PS1='(lfs chroot) \u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h

and reinstall coreutils.  Watch for possible errors.

  -- Bruce


--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to