LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Blfs Version 2013-02-20 lsb missing (http://www.linuxquestions.org/questions/linux-from-scratch-13/blfs-version-2013-02-20-lsb-missing-4175451944/)

yjy4321 02-27-2013 01:04 PM

Blfs Version 2013-02-20 lsb missing
 
After I installed some packages(random number generator, ntp, ssh, etc). I tried to reboot. And I get following errors.
Quote:

/etc/rc.d/rc3.d/S25random: line 26: /lib/lsb/init-functions: No such file or direcotry
/etc/rc.d/rc3.d/S25ntpd: line 26: /lib/lsb/init-functions: No such file or direcotry
/etc/rc.d/rc3.d/S25sshd: line 26: /lib/lsb/init-functions: No such file or direcotry
Code:

# cat /etc/rc.d/init.d/random
[omitted]
. /lib/lsb/init-funtions
[omitted]

# cat /lib/lsb
ls: cannot access /lib/lsb: No such file or directory

Obviously both the directory and the file are missing... What didn't I do right?

After installing each package, all I did was following what the book says...
Code:

make install-random
make install-ntpd
make install-sshd

I don't understand why the random generator failed because there is no install except just one line.... :(

druuna 02-27-2013 01:42 PM

You might have forgotten some parts of chapter 3.

- This one seems obvious: lsb_release-1.4
- These need to be done as well: The Bash Shell Startup Files and The /etc/shells File

Do read the other parts too.

yjy4321 02-27-2013 02:49 PM

lsb_release-1.4 comes after random. So I think it is not related. But I did install it.

I also did all of The Bash Shell Startup Files and The /etc/shells File.
I will check if I have any spelling error. But I don't think this causes it because they all are not related to creating lsb directory or init-functions...

The directory "/lib/lsb" is missing. Which section of the book does create this directory?


PS. LFS version was 6.8 and BLFS version is in the title. I did this BLFS version using LFS version 7.2 and it did not give error.

stoat 02-27-2013 03:27 PM

Quote:

Originally Posted by yjy4321

PS. LFS version was 6.8 and BLFS version is in the title. I did this BLFS version using LFS version 7.2 and it did not give error.

That right there is probably the explanation. Version 6.8 probably did not have that init-functions file. I can't be sure when it occurred exactly, but I do remember that change. And the v6.8 book does not mention init-functions at all.

You probably can make this work by creating the symlink "/lib/lsb/init-functions" pointing to "/etc/rc.d/init.d/functions". Your system should have that file, and it probably will work to provide the functions needed by those new init scripts. You probably will find that file sourced in the init scripts already installed and working in your original v6.8 system. No promises, but no harm trying either.
Code:

su
mkdir /lib/lsb
ln -sv /etc/rc.d/init.d/functions /lib/lsb/init-functions

And just FYI, the /lib/lsb being referred to nowadays is a symlink to /lib/services created by the LFS-Bootscripts package in LFS. That is the real location of init-functions in modern LFS systems.

yjy4321 02-27-2013 06:42 PM

Quote:

Originally Posted by stoat (Post 4901121)
Version 6.8 probably did not have that init-functions file.

That is correct. So I tried to make link. But it did not fix completely. It had more problems. I eventually just copied the file instead of linking. Then I added more functions to it. Then I was able to boot without any error. Thanks!!!!

druuna 02-28-2013 12:35 AM

Quote:

Originally Posted by yjy4321 (Post 4901108)
lsb_release-1.4 comes after random. So I think it is not related.

FYI: The packages in BLFS do not have to be done in the order shown. This is one of the big differences compared to LFS.

This from the Which Sections of the Book Do I Want? chapter:
Quote:

Unlike the Linux From Scratch book, BLFS isn't designed to be followed in a linear manner. This is because LFS provides instructions on how to create a base system which is capable of turning into anything from a web server to a multimedia desktop system. BLFS attempts to guide you in the process of going from the base system to your intended destination. Choice is very much involved.


All times are GMT -5. The time now is 08:44 AM.