On 2/1/2020 8:52 PM, Ken Moffat via blfs-support wrote:
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.
I guess the confusion comes from the fact that Bruce sent me the link 2
and 3 weeks ago:
http://www.linuxfromscratch.org/~bdubbs/basic-blfs-book/starting.html
Of course, I looked in the LFS and BLFS books to find a newer version, but
apparently it's no longer there. Nevertheless, I'm sure I've seen the
information before, and it's perfectly reasonable.
/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 already checked all that. Nevertheless:
[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
[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
[alan@localhost ~]$ ldd /usr/bin/env
linux-vdso.so.1 (0x00007ffe86bfd000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcc3f5f5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcc3f7e5000)
[alan@localhost ~]$ echo $SHELL
/bin/bash
Alan
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page