LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS chapter-by-chapter complete commands with notes (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-chapter-by-chapter-complete-commands-with-notes-927674/)

DrinkinHomeBrew 02-04-2012 10:48 PM

LFS chapter-by-chapter complete commands with notes
 
I did a successful build earlier last month, and this weekend I did another one. Something I really would have liked was a complete set of all commands that I could just cut-and-paste, so here it is.

In addition to having all of the commands (e.g. extracting source files) in a simple location to cut-and-paste from, I've added additional notes that I found useful along the way. I also made a few changes I found potentially useful like tee-ing output of many build commands so to review later for tracing errors.

I'm also including the .config files for both the vmware and virtualbox kernel configuration.

http://dl.dropbox.com/u/17108167/LFSv7.0_Commands.txt
http://dl.dropbox.com/u/17108167/vir...xkernel.config
http://dl.dropbox.com/u/17108167/vmw...xkernel.config

druuna 02-05-2012 03:37 AM

Hi DrinkinHomeBrew,

Very nice of you to create and post this, some might find this handy.

A few remarks:
Quote:

Don't use 64-bit for the initial host, since it causes issues in the build
This isn't true for the recent LFS versions. I've been building LFS on 64 bit (multilib) systems without any problems.

I also notice you use the su command and not the su - command. The latter might be preferable because that one set a full root environment.

Quote:

ln -sf /bin/bash /bin/sh
You need to remove the link to dash before you create the link to bash.

Quote:

# ================================================

### Read Me

### To restart the process from this point (I didn't do this, so I don't know the process)
### ?? Remove all directories in $LFS except: lost+found, sources. Copy /tools from /root/lfs-tools ??
### ?? Anything else ??
The safest way to restart with chapter 6 is to create a backup of all that is done up to and including chapter 5.
As root user:
Code:

cd $LFS/..
tar jcf lfs.7.tmpenv.tar.bz2 lfs

If, for whatever reason you need to re-start with chapter 6 (as root user):
Code:

cd $LFS/..
rm -rf lfs
tar jxf lfs.7.tmpenv.tar.bz2

About using make's -jX option: The only time I had problems using it was when testing (make check/test) some packages.

Again: Nice job!

PS: I did not check each and every command, so other small issues might still be present.

DrinkinHomeBrew 02-06-2012 09:20 AM

Thanks for the feedback.

I took out the 64-bit statement because, in hindsight, that was from the first time I tried on a pre-7.0 version that I never completed. So I'll take your word for it that this is no longer an issue.

I'll try your other suggestions and update it. I really like the idea of making a tar archive of sources and tools instead of copying them as I've been doing. Probably a more efficient way to back those files up. Also, unlinked from dash before linking to bash wasn't necessary since the force switch does it automatically. At least in Mint it worked.

I'm going to build it a few more times, so I'll update it as I go along.

kedar kapil 02-14-2012 04:40 AM

hey drinkinhomebrew.....my friend has been stuck with an error in the chroot environment during the installation of linux api headers and the error is as follows:

/bin/sh: perl: command not found
make[2]: *** [/sources/linux-3.1/usr/include/asm-generic/.install] Error 127
make[1]: *** [asm-generic] Error 2
make: *** [headers_install] Error 2


can you suggest me where the error is...by the way he has got some error while entering the chroot envi and so he reinstalled the complete toolchain carefully...despite doing that he still got the above error......so can you suggest me an answer....

druuna 02-14-2012 04:42 AM

Quote:

Originally Posted by kedar kapil (Post 4601919)
hey drinkinhomebrew.....my friend has been stuck with an error in the chroot environment during the installation of linux api headers and the error is as follows:

/bin/sh: perl: command not found
make[2]: *** [/sources/linux-3.1/usr/include/asm-generic/.install] Error 127
make[1]: *** [asm-generic] Error 2
make: *** [headers_install] Error 2


can you suggest me where the error is...by the way he has got some error while entering the chroot envi and so he reinstalled the complete toolchain carefully...despite doing that he still got the above error......so can you suggest me an answer....

Cross-posting is against the LQ rules. Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place.

Continue in the other/original thread: kedar kapil post #10.

Also: Please create your own threads, don't litter other threads with your issue's!

AdherentX 03-15-2012 11:41 PM

hey! Would you mind upload the three file again?
 
hey!
I've run into some troubles when I make LFS.
The link you posted is invalid now. Would you mind upload the three file again?

druuna 03-16-2012 01:57 AM

Hi,
Quote:

Originally Posted by AdherentX (Post 4627990)
I've run into some troubles when I make LFS.
The link you posted is invalid now. Would you mind upload the three file again?

I just checked all three links and they work nicely.


All times are GMT -5. The time now is 07:27 AM.