Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-07-2012, 12:40 AM
|
#1
|
|
Member
Registered: Aug 2012
Posts: 137
Rep: 
|
I can not remove tools directory and boot LFS without it, please consider my problem
Hi
I'd been familiar with LFS about 3 month ago, after that I build LFS twice time.
I desided to build LFS with fewer packages. for this I do any thing according to LFS7.2 book up to end of section 6.6
After that I installed packages with below order:
1) I first installed Kernel headers
2)Glibc
3)xz
4)pkg-config
5)zlib
6)kmod
7)util-linux
8)udev
9)sysvinit
10)bison
11)bash
12)make
13)sed
14)grep
15)shadow
I selected these packages according to dependency that described in the LFS book.
then I did chapter 7,8 and 9 instructions and booted the system.
until I dosn't remove tools directory, the LFS is booting and any thing be right, but when I remove the tools directory and booting the system, I encounter with kernel panic error.
what is the dependency between my LFS system and the tools directory?
how can I handle this error?
please don't tell me that " you must install all packages in chapter 6", I want to build LFS with fewer installed packages.
thank you
Last edited by k84834; 11-07-2012 at 12:56 AM.
|
|
|
|
11-07-2012, 01:08 AM
|
#2
|
|
Senior Member
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,177
|
I believe that everything in chapter 6 is necessary to build system must be done in the exact order of the book, but you can strip some of the unecessary stuff at the end of chapter 6
|
|
|
|
11-07-2012, 01:16 AM
|
#3
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,718
|
Although I'm not 100% sure this experiment will work I do have a few points you might need to consider:
- First and foremost: You do not mention doing chapter 6.10. (Adjusting the Toolchain). That's a very important step in the build.
Quote:
|
Now that the final C libraries have been installed, it is time to adjust the toolchain so that it will link any newly compiled program against these new libraries.
|
I do believe this is the core of your problem.
- Secondly: How did you decide the order in which you installed the packages? This from chapter 6.1:
Quote:
|
The order that packages are installed in this chapter needs to be strictly followed to ensure that no program accidentally acquires a path referring to /tools hard-wired into it.
|
- Thirdly: Did you run all the checks/test for the aforementioned packages and did they all pass?
- Last: If you want help you need to post more details. Saying that you encounter a kernel panic doesn't tell us anything, besides that something went wrong. What was the actual error you encountered?
|
|
|
|
11-07-2012, 02:06 AM
|
#4
|
|
Member
Registered: Aug 2012
Posts: 137
Original Poster
Rep: 
|
Quote:
Originally Posted by druuna
- First and foremost: You do not mention doing chapter 6.10. (Adjusting the Toolchain). That's a very important step in the build.I do believe this is the core of your problem.
|
yes, I mentioned to the section 6.10 but for know path of my search directories and Dynamic linker and so on. dosn't replace old ld with new one (ld-new), in this section I just do below commands:
Code:
root:/sources# readelf -l a.out | grep ': /tools/lib'
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
root:/sources# grep -o '/.*/lib.*/crt[1in].*succeeded' dummy.log
/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../crt1.o succeeded
/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../crti.o succeeded
/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../crtn.o succeeded
root:/sources# grep -B1 '^ /.*/include' dummy.log
#include <...> search starts here:
/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/include
/tools/include
/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/include-fixed
root:/sources# grep 'SEARCH.*/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
SEARCH_DIR("/tools/lib");
root:/sources# grep "/lib.*/libc.so.6 " dummy.log
attempt to open /tools/lib/libc.so.6 succeeded
root:/sources# grep found dummy.log
found ld-linux.so.2 at /tools/lib/ld-linux.so.2
can you find what is the problem with these informations?!
when I installed mentioned packages, I didn't change prefix directory and installed them in /usr.
have you any ideas?
thanks for your replies.
Last edited by k84834; 11-07-2012 at 02:10 AM.
|
|
|
|
11-07-2012, 02:53 AM
|
#5
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,718
|
Before I try to answer I first have a question: What is it you are trying to accomplish?
I'm asking because of the following: If you manage to create a minimal LFS system based on the above mentioned package you'll end up with a system that can do hardly anything. Installing/building any package after you're finished will not be possible.
That's ok if this is just an exercise in making the smallest system based on LFS. If you want to use/expand your (minimal) LFS system once you're finished, that's not ok......
Quote:
Originally Posted by k84834
Quote: Originally Posted by druuna
Quote:
|
- First and foremost: You do not mention doing chapter 6.10. (Adjusting the Toolchain). That's a very important step in the build.I do believe this is the core of your problem.
|
yes, I mentioned to the section 6.10 but for know path of my search directories and Dynamic linker and so on.
|
It probably is a language problem, but I really don't understand what it is you are saying in the above answer.
Quote:
dosn't replace old ld with new one (ld-new), in this section I just do below commands:
Code:
root:/sources# readelf -l a.out | grep ': /tools/lib'
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
.
.
.
root:/sources# grep found dummy.log
found ld-linux.so.2 at /tools/lib/ld-linux.so.2
can you find what is the problem with these informations?!
|
You need to successfully execute all the commands in chapter 6.10. As mentioned in the book and quoted by me in a previous post: This is a crucial step to make sure that the correct libraries are used once they come available.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:27 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|