Re: [lfs-support] Bash: /usr/{literally everything}: no such file or directory

2019-10-14 Thread Douglas R. Reno


On 10/14/19 2:06 PM, Jared Stevens wrote:


We need to address the "no such file or directory" problem first.
Can you run:

ldd /bin/ls

Please and get back to us with the results? What you should get
(used on an SVN system):

renodr [ /sources ]$ ldd /bin/ls
    linux-vdso.so.1 (0x7ffe3b1e8000)
    libcap.so.2 => /lib/libcap.so.2 (0x7fcfff8c)
    libc.so.6 => /lib/libc.so.6 (0x7fcfff6fc000)
    /lib64/ld-linux-x86-64.so.2 (0x7fcfff8e2000)

I believe that your glibc installation might be corrupt. If your
glibc install is corrupt, try using this:

sln libc-2.30.so  /lib/libc.so.6

And then running 'ldconfig'.

We've made some progress!

So the initial output of *'ldd /bin/ls'* was:

*bash: /usr/bin/ldd : /bin/bash: bad interpreter: No such file or 
directory*


And the output of '*sin libc-2.30.so  
/lib/libc.so.6'* was:


*bash: sin: command not found*

Regardless, I ran the*'ldconfig' *command anyways and after a brief 
pause was given the following output:


*ldconfig: Cannot mmap file /usr/lib/libdbus-1.so*

HOWEVER, following this command I was finally able to run commands in 
the /bin directory once again (such as 'ls'), and the output of*'ldd 
/bin/ls'* changed to:


*linux-vdso.so.1 (0x7ffea7f1a000)
libcap.so.2 => /lib/libcap.so.2 (0x7f1b55ef5000)
libc.so.6 => /lib/libc.so.6 (0x7f1b55d31000)
/lib64/ld-linux-x86-64.so.2 (0x7f1b55f1f000)*

Unfortunately, the 'sin' command still outputs the same result. So now 
it appears there is an issue with the libdbus file.


My PATH variable was also restored to how it was before these events 
took place:


*PATH=/opt/rustc/bin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/opt/ant/bin:/opt/jdk/bin:/opt/qt5/bin*

So while everything but that one error with libdbus looks back to 
normal for the moment, I am afraid to try and install (or reinstall) 
anything or change any file locations or settings until I know for 
sure this issue is resolved.


What would you recommend my next steps going forward should be to fix 
libdbus and ensure this issue has been fixed? Furthermore, as I have 
made it this far and you have the experience, what should I do to 
finish the transition from System V to systemd smoothly to avoid 
another potential catastrophe such as this?


As for the dbus problem, try running:

ln -sv ../../lib/libdbus-1.so.3.19.11 /usr/lib/libdbus-1.so

Make sure that you have that library in /lib first

As for some further advice on the sysv to systemd transition, be 
prepared to rebuild X from scratch. You might encounter problems if 
ConsoleKit is installed too. If you have elogind installed, please 
uninstall it. You'll want to rebuild Xorg Libraries, Xorg Applications, 
and xorg-server at minimum (and that should do the trick...)


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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Bash: /usr/{literally everything}: no such file or directory

2019-10-14 Thread Ken Moffat
On Mon, Oct 14, 2019 at 04:17:47PM -0400, Jared Stevens wrote:
> 
> Any suggestions to resolving the libdbus error and completing the
> transition from System V to systemd? I would appreciate any advice.
> 
Not from me, except to check that you are using the systemd version
of blfs (you mentioned following the blfs instructions for dbus).

ĸen
-- 
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
 - Unseen Academicals
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Bash: /usr/{literally everything}: no such file or directory

2019-10-14 Thread Jared Stevens
>
>
> sln != sin
>

Thank you for the clarification. I ran the two commands as specified.
However, I still receive the error about not being able to mmap
libdbus-1.so.

I even went through and reinstalled dbus-1.12.16 (according to the BLFS
instructions not LFS as I had the necessary dependencies), yet the message
still displays when running ldconfig.

The good news is that the issue did not manifest itself again after logging
out and reentering the chroot environment. Whether or not the issue is
truly resolved however will likely depend on how it acts once I am able to
boot into the system again. (I am experiencing a separate issue with GRUB
not being loaded/detected on boot despite the boot option appearing in my
PC BIOS).

Any suggestions to resolving the libdbus error and completing the
transition from System V to systemd? I would appreciate any advice.

Thanks,

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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Bash: /usr/{literally everything}: no such file or directory

2019-10-14 Thread Ken Moffat
On Mon, Oct 14, 2019 at 03:06:35PM -0400, Jared Stevens wrote:
> > We need to address the "no such file or directory" problem first. Can you
> > run:
> >
> > ldd /bin/ls
> >
> > Please and get back to us with the results? What you should get (used on
> > an SVN system):
> >
> > renodr [ /sources ]$ ldd /bin/ls
> > linux-vdso.so.1 (0x7ffe3b1e8000)
> > libcap.so.2 => /lib/libcap.so.2 (0x7fcfff8c)
> > libc.so.6 => /lib/libc.so.6 (0x7fcfff6fc000)
> > /lib64/ld-linux-x86-64.so.2 (0x7fcfff8e2000)
> >
> > I believe that your glibc installation might be corrupt. If your glibc
> > install is corrupt, try using this:
> >
> > sln libc-2.30.so /lib/libc.so.6
> >
> > And then running 'ldconfig'.
> >
> We've made some progress!
> 
> So the initial output of *'ldd /bin/ls'* was:
> 
> *bash: /usr/bin/ldd : /bin/bash: bad interpreter: No such file or directory*
> 
> And the output of '*sin libc-2.30.so  /lib/libc.so.6'*
> was:
> 
> *bash: sin: command not found*
> 
sin ?  Maybe you need a better font ;-)
Specifically, one which distinguishes lowercase I from lowercase L.

> Regardless, I ran the* 'ldconfig' *command anyways and after a brief pause
> was given the following output:
> 
> *ldconfig: Cannot mmap file /usr/lib/libdbus-1.so*
> 
> HOWEVER, following this command I was finally able to run commands in the
> /bin directory once again (such as 'ls'), and the output of* 'ldd /bin/ls'*
> changed to:
> 
> 
> 
> 
> *linux-vdso.so.1 (0x7ffea7f1a000) libcap.so.2 => /lib/libcap.so.2
> (0x7f1b55ef5000) libc.so.6 => /lib/libc.so.6 (0x7f1b55d31000)
> /lib64/ld-linux-x86-64.so.2 (0x7f1b55f1f000)*
> 
> Unfortunately, the 'sin' command still outputs the same result. So now it
> appears there is an issue with the libdbus file.
> 

sln != sin

ĸen
-- 
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
 - Unseen Academicals
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Bash: /usr/{literally everything}: no such file or directory

2019-10-14 Thread Jared Stevens
> We need to address the "no such file or directory" problem first. Can you
> run:
>
> ldd /bin/ls
>
> Please and get back to us with the results? What you should get (used on
> an SVN system):
>
> renodr [ /sources ]$ ldd /bin/ls
> linux-vdso.so.1 (0x7ffe3b1e8000)
> libcap.so.2 => /lib/libcap.so.2 (0x7fcfff8c)
> libc.so.6 => /lib/libc.so.6 (0x7fcfff6fc000)
> /lib64/ld-linux-x86-64.so.2 (0x7fcfff8e2000)
>
> I believe that your glibc installation might be corrupt. If your glibc
> install is corrupt, try using this:
>
> sln libc-2.30.so /lib/libc.so.6
>
> And then running 'ldconfig'.
>
We've made some progress!

So the initial output of *'ldd /bin/ls'* was:

*bash: /usr/bin/ldd : /bin/bash: bad interpreter: No such file or directory*

And the output of '*sin libc-2.30.so  /lib/libc.so.6'*
was:

*bash: sin: command not found*

Regardless, I ran the* 'ldconfig' *command anyways and after a brief pause
was given the following output:

*ldconfig: Cannot mmap file /usr/lib/libdbus-1.so*

HOWEVER, following this command I was finally able to run commands in the
/bin directory once again (such as 'ls'), and the output of* 'ldd /bin/ls'*
changed to:




*linux-vdso.so.1 (0x7ffea7f1a000) libcap.so.2 => /lib/libcap.so.2
(0x7f1b55ef5000) libc.so.6 => /lib/libc.so.6 (0x7f1b55d31000)
/lib64/ld-linux-x86-64.so.2 (0x7f1b55f1f000)*

Unfortunately, the 'sin' command still outputs the same result. So now it
appears there is an issue with the libdbus file.

My PATH variable was also restored to how it was before these events took
place:

*PATH=/opt/rustc/bin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/opt/ant/bin:/opt/jdk/bin:/opt/qt5/bin*

So while everything but that one error with libdbus looks back to normal
for the moment, I am afraid to try and install (or reinstall) anything or
change any file locations or settings until I know for sure this issue is
resolved.

What would you recommend my next steps going forward should be to fix
libdbus and ensure this issue has been fixed? Furthermore, as I have made
it this far and you have the experience, what should I do to finish the
transition from System V to systemd smoothly to avoid another potential
catastrophe such as this?

Thanks so much for the help!

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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Bash: /usr/{literally everything}: no such file or directory

2019-10-14 Thread Douglas R. Reno


On 10/14/19 12:33 AM, Jared Stevens wrote:
So I have little doubt that I have somehow managed to completely ruin 
my LFS build and will likely have to start all over again (for what 
will be the fourth time). I figured I would throw one last Hail Mary 
and ask in here for any suggestions, however, before giving up on 
two/three weeks of hard work.


So just a little backstory, I initially built my LFS system using the 
*System V *version of the book. I was able to boot and had made 
progress all the way up to Xorg.


However, I was having issues with getting certain modules/services to 
load and run properly on my system, and having no experience 
whatsoever with System V (only systemd in my past experiences with 
Linux), I decided to see if I could*switch my system over to systemd.*


Initially, there weren't any problems. I was able to install 
Systemd-241 no problem, and I moved the rc.d and init.d directories 
elsewhere to hopefully prevent any old scripts from being called.


Of course this now meant that I had to reinstall certain programs and 
their systemd symlinks as opposed to the System V bootscripts. I had 
been doing this for most of the day today with little issue.


While I was looking back over previously installed programs for 
changes from System V to systemd, I noticed the section in LFS's 
Glibc-230 install where it calls for _systemd support files for 
_*_nscd_, *which were not installed when I initially built Glibc-230.


Here is where I made my first mistake: to install the support files 
for *nscd*, I assumed I would have to re-make the *GLibc* package and 
install them. So to follow the LFS book's commands properly (where it 
uses "CC="gcc -ffile-prefix-map=/tools=/usr" before the configure) I 
extracted my saved "tools" directory I had saved from the build back 
into my LFS build in chroot and reran the configure, make, and make 
check commands for GLibc.


To avoid potential problems and because my existing GLibc install was 
working fine, however, I did NOT run "make install." Instead, I ran 
just the install commands for nscd as follows:


install -v -Dm644 ../nscd/nscd.tmpfiles
/usr/lib/tmpfiles.d/nscd.conf
install -v -Dm644 ../nscd/nscd.service
/lib/systemd/system/nscd.service

Afterwards, I removed the GLibc directory and attempted to continue 
with my transfer to systemd. However, this is when all hell broke loose.


Now, whenever I enter the chroot environment (haven't even tried 
booting the thing because I doubt I could), although I can login as 
root and mount all of the disk partitions properly, Bash cannot find 
absolutely anything in the /usr, /sbin, or /bin directories any longer.


For example, I will receive the following error for simple commands 
such as 'ls':


bash: /bin/ls: No such file or directory

This is despite the fact that such file DOES in fact exist. Assuming I 
had messed up my $PATH variable, I tried restoring it by executing:


export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

However, this did not fix my issue. I tried retracing my steps in LFS 
to see if a symlink was broken or something, but even though I can run 
'ls' and other commands when running off of the /tools bash symlink, 
attempts at running the normal bash is completely broken.


I haven't the slightest clue what I did wrong to affect Bash during 
the GLibc systemd attempted fix as I never touched bash until after 
the problem manifested (I may have made it worse while trying to fix 
it, however). Furthermore, I never overwrote my existing GLibc install.


I appreciate any suggestions that may help with my problem. I also 
accept if I have managed to royally destroy my build and would be 
better off starting over again as well.


Hi Jared,

Firstly, I don't recommend moving from SysV to systemd on the same 
build, however it is possible and I used to do it. We need to address 
the "no such file or directory" problem first. Can you run:


ldd /bin/ls

Please and get back to us with the results? What you should get (used on 
an SVN system):


renodr [ /sources ]$ ldd /bin/ls
    linux-vdso.so.1 (0x7ffe3b1e8000)
    libcap.so.2 => /lib/libcap.so.2 (0x7fcfff8c)
    libc.so.6 => /lib/libc.so.6 (0x7fcfff6fc000)
    /lib64/ld-linux-x86-64.so.2 (0x7fcfff8e2000)

I believe that your glibc installation might be corrupt. If your glibc 
install is corrupt, try using this:


sln libc-2.30.so /lib/libc.so.6

And then running 'ldconfig'.


The reason why this might fix it is that 'sln' is linked statically so 
that you can use it in the event that the dynamic linker is not 
available or functioning properly. It was written to fix broken glibc 
installations so that you're not stuck completely rebuilding your system.


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

Do not top post on this list.

A: Because it messes up the order in

Re: [lfs-support] Bash: /usr/{literally everything}: no such file or directory

2019-10-14 Thread Trent


On 10/14/19 12:33 AM, Jared Stevens wrote:
So I have little doubt that I have somehow managed to completely ruin 
my LFS build and will likely have to start all over again (for what 
will be the fourth time). I figured I would throw one last Hail Mary 
and ask in here for any suggestions, however, before giving up on 
two/three weeks of hard work.


So just a little backstory, I initially built my LFS system using the 
*System V *version of the book. I was able to boot and had made 
progress all the way up to Xorg.


However, I was having issues with getting certain modules/services to 
load and run properly on my system, and having no experience 
whatsoever with System V (only systemd in my past experiences with 
Linux), I decided to see if I could*switch my system over to systemd.*


Initially, there weren't any problems. I was able to install 
Systemd-241 no problem, and I moved the rc.d and init.d directories 
elsewhere to hopefully prevent any old scripts from being called.


Of course this now meant that I had to reinstall certain programs and 
their systemd symlinks as opposed to the System V bootscripts. I had 
been doing this for most of the day today with little issue.


While I was looking back over previously installed programs for 
changes from System V to systemd, I noticed the section in LFS's 
Glibc-230 install where it calls for _systemd support files for 
_*_nscd_, *which were not installed when I initially built Glibc-230.


Here is where I made my first mistake: to install the support files 
for *nscd*, I assumed I would have to re-make the *GLibc* package and 
install them. So to follow the LFS book's commands properly (where it 
uses "CC="gcc -ffile-prefix-map=/tools=/usr" before the configure) I 
extracted my saved "tools" directory I had saved from the build back 
into my LFS build in chroot and reran the configure, make, and make 
check commands for GLibc.


To avoid potential problems and because my existing GLibc install was 
working fine, however, I did NOT run "make install." Instead, I ran 
just the install commands for nscd as follows:


install -v -Dm644 ../nscd/nscd.tmpfiles
/usr/lib/tmpfiles.d/nscd.conf
install -v -Dm644 ../nscd/nscd.service
/lib/systemd/system/nscd.service

Afterwards, I removed the GLibc directory and attempted to continue 
with my transfer to systemd. However, this is when all hell broke loose.


Now, whenever I enter the chroot environment (haven't even tried 
booting the thing because I doubt I could), although I can login as 
root and mount all of the disk partitions properly, Bash cannot find 
absolutely anything in the /usr, /sbin, or /bin directories any longer.


For example, I will receive the following error for simple commands 
such as 'ls':


bash: /bin/ls: No such file or directory

This is despite the fact that such file DOES in fact exist. Assuming I 
had messed up my $PATH variable, I tried restoring it by executing:


export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

However, this did not fix my issue. I tried retracing my steps in LFS 
to see if a symlink was broken or something, but even though I can run 
'ls' and other commands when running off of the /tools bash symlink, 
attempts at running the normal bash is completely broken.


I haven't the slightest clue what I did wrong to affect Bash during 
the GLibc systemd attempted fix as I never touched bash until after 
the problem manifested (I may have made it worse while trying to fix 
it, however). Furthermore, I never overwrote my existing GLibc install.


I appreciate any suggestions that may help with my problem. I also 
accept if I have managed to royally destroy my build and would be 
better off starting over again as well.


Thanks,

Jared



I am sure you will get better responses from others later, but my 1/2 
cent here is.


I was just reading something the other day to the effect of once you 
start messing with those libraries/library folders, you will have to 
rebuild every application which depend on those libraries.


You may want to start again. The current one I am building of version 9, 
I have rebuilt about five times already within the past week. What I 
have done is copied all the commands into a text file as I am building 
it. Yes, sometimes there are mistakes in it which I do find later which 
is partially the reason for building multiple times.


This has allowed me to make sections into scripts once I know there are 
no more mistakes/errors in it. Run it and go do other things.


Trent

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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style