On Sat, Feb 01, 2020 at 07:52:59PM -0700, Alan Feuerbacher via blfs-support
wrote:
> I'm trying to get the alias given in the BLFS book (Basic Packages for
> Linux® From Scratch - Version 2018-09-21 : Chapter 1. Introduction :
> Getting Started After LFS) working, but it fails with the error:
>
Side note: that is an old version of the book, although I doubt that
page has changed since then, and ISTR you were building a much more
recent systemd version the other day. You seem to be trying to
confuse me.
/me looks at the last week's posts : no, you merely said
systemd-devel and I suppose 2018-09-21 is after 9.0, so I'll have to
retract that, although I still feel as if you are trying to spread
confusion.
> /usr/sbin/chroot: failed to run command '/usr/bin/env': No such
> file or directory
>
> The alias is all on one line in .bashrc:
>
> alias lfs='sudo /usr/sbin/chroot /mnt/lfs /usr/bin/env -i
> HOME=/root TERM="$TERM" PS1="\u:\w\\\\$ "
> PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login'
>
> I've tried several variations of the alias, but I don't see what's
> going wrong. I believe I've followed the BLFS book, and what Bruce
> told me about this, exactly. Here are some results:
>
> [alan@localhost ~]$ su lfs Password: bash-5.0$ bash
> ~/mount-virt.sh /mnt/lfs/dev already mounted /mnt/lfs/dev/pts
> already mounted /mnt/lfs/proc already mounted /mnt/lfs/sys already
> mounted /mnt/lfs/run already mounted mkdir: cannot create
> directory '/mnt/lfs/run/shm': File exists bash-5.0$ lfs [sudo]
> password for lfs: /usr/sbin/chroot: failed to run command
> '/usr/bin/env': No such file or directory
>
> The above was done after executing the mount-virt.sh script
> without errors in prior attempts.
>
> To show that that the environment is set up properly (I'm pretty
> sure):
>
> [alan@localhost ~]$ su lfs Password: bash-5.0$ cd bash-5.0$ whoami
> lfs bash-5.0$ pwd /home/lfs bash-5.0$ cat .bashrc set +h umask 022
> LFS=/mnt/lfs LC_ALL=POSIX LFS_TGT=$(uname -m)-lfs-linux-gnu
> PATH=/tools/bin:/bin:/usr/bin export LFS LC_ALL LFS_TGT PATH alias
> ll='ls -l'
>
> alias lfs='sudo /usr/sbin/chroot /mnt/lfs /usr/bin/env -i
> HOME=/root TERM="$TERM" PS1="\u:\w\\\\$ "
> PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login'
>
> Any clues what's going south?
>
> Alan
>
As with any 'No such file or directory' : does it exist, and do all
the libs it wants to use ? Since you have not managed to enter
chroot, add a $LFS prefix when looking at this:
ls -l $LFS/usr/bin/env
and if it does exist
ldd $LFS/usr/bin/env
Also, if your shell on the host system is not /bin/bash then other
changes might be necessary (e.g. on recent SystemRescueCD, based on
Arch, the shell seems to be zsh and passing PS1 doesn't work.
I regret to say that I'm starting to think you are not cut out for
this.
ĸen
--
We had folksingers in the lower bar for six months back home where
I worked. In the end we had to get a man in with a ferret.
-- Polly, in "Interesting Times"
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page