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