LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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


Reply
  Search this Thread
Old 10-20-2010, 08:26 PM   #1
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Build notes for LFS 6.6 with package users. . .


Hi all,

I've compiled and formatted my build notes and posted them to my blog. It's about 3,700 words, so I had to split the notes into three blog posts:

Part 1

Part 2

Part 3

I'm interested in any feedback. I'm working on an LFS 6.7 build now.

Regards,
 
Old 10-21-2010, 07:18 AM   #2
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
A very interesting process for package management. I found the Slackware pkgtools scripts very useful for this purpose. I just use installpkg, makepkg, removepkg and upgradepkg, though. While building the temp tools, I also install tar-1.13, the rev binary from util-linux-ng, which, expat and xz. I use SlackBuilds for all packages, and don't use optimization. Of course, I modify the build scripts to suit an LFS system. The other major detour I take is using the Linux-Libre kernel (it's not that major a deviation, in fact) instead of the mainline. I substitute other packages as well; grub, e2fsprogs and sysklogd, instead using lilo, reiser4 and rsyslog. I have successfully upgraded glibc from 2.11 to 2.12, and kernel from 2.6.34 to the latest (including kernel headers), without any fuss. Haven't yet had to upgrade gcc. Will see how that works out when a new release arrives.
What I like about your build process is the small, nifty scripts you use to ease building the more mundane parts of LFS. I have wanted to do that, but end up taking the more laborious path. I can only guess (as I don't see it mentioned otherwise) that you are on a 32-bit box. I'd like to know if you've tried this process on a 64-bit system. Following the LFS instructions to build a 64-bit setup doesn't always produce satifactory results. I have done it, but am not entirely happy about it. So if you have attempted and succeeded in setting up a 64-bit build, it'd be great if you can post your notes on that. I know there's CLFS, but I don't want to go that way (don't want eglibc). Also, have you gone further and tried BLFS? Would be very interested in knowing if you have, coz writing over 200 build-scripts is a pain, really.

Last edited by corbis_demon; 10-21-2010 at 07:20 AM.
 
Old 10-21-2010, 09:13 AM   #3
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by corbis_demon View Post
A very interesting process for package management.
All the credit goes to Matthias Benkmann, the author of the original hint.

Quote:
I found the Slackware pkgtools scripts very useful for this purpose. I just use installpkg, makepkg, removepkg and upgradepkg, though. While building the temp tools, I also install tar-1.13, the rev binary from util-linux-ng, which, expat and xz.
Can you install tar-1.13 along side later versions of tar?

Quote:
I use SlackBuilds for all packages, and don't use optimization. Of course, I modify the build scripts to suit an LFS system.
I'm a dyed-in-the-wool slacker, so your approach is pretty much exactly how I would have tackled it had I not gone with the package users scheme.

Are you using a BSD-style init too?

Quote:
The other major detour I take is using the Linux-Libre kernel (it's not that major a deviation, in fact) instead of the mainline. I substitute other packages as well; grub, e2fsprogs and sysklogd, instead using lilo, reiser4 and rsyslog. I have successfully upgraded glibc from 2.11 to 2.12, and kernel from 2.6.34 to the latest (including kernel headers), without any fuss. Haven't yet had to upgrade gcc. Will see how that works out when a new release arrives.
Very cool. I've been following your other thread on the Linux-Libre kernel. It looks interesting and seems to work pretty well.

Quote:
What I like about your build process is the small, nifty scripts you use to ease building the more mundane parts of LFS.
I take credit for the first, big, script but the remainder are from Max Mann on the lfs-dev list.

However, I used and modified the "build" script that comes with the package users hint on my package builds. It works well.

Quote:
I can only guess (as I don't see it mentioned anywhere) that you are on a 32-bit box. I'd like to know if you've tried this process on a 64-bit system. Following the LFS instructions to build a 64-bit setup doesn't always produce satifactory results.
I have some more details on my build in this thread. But yeah, I'm building 32-bit LFS right now. I did a lot of reading about LFS (years worth, really) before giving it a try and it seems that, other than CLFS, building a reliable 64-bit LFS takes additional work -- at least for now.

More to the point, while my first LFS build was in a QEMU-KVM virtual machine, the one I'm currently working on is on a real computer, a Pentium III, so 32-bit is still the way to go for me.

Quote:
Also, have you gone further and tried BLFS? Would be very interested in knowing if you have, coz writing over 200 build-scripts is a pain, really.
No, no BLFS yet, but that's my intention. I'll let everyone know how it goes.

Regards,
 
Old 10-21-2010, 11:29 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@Lufbery: That's indeed a nice post about using package management in LFS!

I've been tinkering with (B)LFS for years now and am running BLFS+ as my main OS since version 4.0 (or 4.1, I don't really recall). A package management system is still "missing" on my side, although I'm getting to a point that the ease of a simple pms starts to outweigh the work it takes to do it all by hand.

You've just given me a good reason to start building, again
I just upgraded (still working on some BLFS details) and kept thinking (like many times before): How can one "automate" LFS and, more interesting to me, BLFS.

Automating LFS isn't worth it: It takes one long day to do it by hand. An automated builder is probably somewhat faster, but my version had to be adjusted to all the changes that occur from one (minor) version to the next. All in all it also took a long day to get a working LFS.

As already mentioned by corbis_demon, creating some 200 scripts for BLFS is a lot of work. It might be worth it..... All I need is time, coffee, cigarettes and probably more time

Keep us posted if you do start with BLFS!

BTW: One of my LFS highlights: LFS on a Mac Pro: It is possible! (Things have become much, much easier nowadays!).
 
Old 10-21-2010, 12:35 PM   #5
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
Quote:
Originally Posted by Lufbery View Post
Can you install tar-1.13 along side later versions of tar?
Yeah, I just run "./configure && make" and then stick the resulting binary in /tools/bin. Of course, I rename it to tar-1.13. Isn't that something Slack does as well? In fact I grabbed the tar-1.13 tarball from a Slack mirror.

Quote:
Are you using a BSD-style init too?
I do, actually. As a longtime Slackware user, I'm familiar with them. I found this text quite useful.

I truly commend you for the effort you've put in documenting the whole process, and posting it for the benefit of the LQ community, all the while being so thorough. Many folks seem willing to try out LFS, as the replies to your thread in the Slackware forum demonstrate. Thank you so much for your fine contributions towards making LFS gain a wider user-base.

EDIT: BTW, is there some disadvantage to using eglibc instead of glibc? CLFS uses it, but I can't bring myself to use it, and is the reason I've stayed away from building a 64-bit CLFS system.

Last edited by corbis_demon; 10-21-2010 at 12:48 PM.
 
Old 10-22-2010, 09:08 AM   #6
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Hi guys,

Thanks for the feedback and additional information. The cool thing about LFS is that it's both complete (if you follow the directions exactly as in the book, it works perfectly) and flexible (you don't have to follow the directions exactly because there's a bit of leeway built into a source-based distribution).

I view the package users scheme as an enhancement rather than a deviation, but additional documentation and tip-sharing is very helpful to people building LFS with package users. My goal has been to facilitate the documentation and tip-sharing.

Corbis: please keep sharing your experiences; especially the parts where you go off the beaten track.

Druuna: If you're building with package users, please share your experiences and let me know if you experience something different during your build than what we (Max, Bryan, and I) have documented in the build notes posted here.

Regards,
 
Old 10-24-2010, 09:51 AM   #7
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
Hi all,
I eventually gave in and decided to construct a CLFS system (64-bit multilib), but since I didn't want to use Eglibc, I swapped it for Glibc instead, and was mildly surprised that I got not other error than the usual posix/annex failure. I've read that Eglibc is better suited for cross-building purposes, but I have stubbornly resisted.

Have also made a few other changes; am using the 0.11 version of ppl, coz it supports approximations with bounded integers. Also, using both PolyLib and the experimental Integer Set Library backends for cloog. Oh, and using a git pull of cloog instead of the version in the book. For a text editor, I replaced Vim with Joe. I'm also using those programs from LFS which are not included in the CLFS book. Compiled a patched Linux-libre 2.6.36 kernel, with Con Kolivas' patch (BFS instead of CFS), an updated TuxOnIce patch for the new kernel, the IMQ (multi-queue) patch, the BFQ I/O scheduler from Paolo Valente and a couple of security fixes. Still waiting for updates from Edward Shiskin for the reiser4 patch.

Another interesting bit has been writing the build script for PPL. I could never figure out how it happened, but turns out the script ran in an infinite loop. I executed it and left for my workplace, and when I returned it was still running, well over 9 hours! I saw that it had already created the package, but kept going on (PPL takes a long time to build anyhow). So I wrote the script again and this time it worked. Still have the errant script, and have been trying to find the bug in it, but couldn't find any.

The rest of the book compiled fine enough. Will update when I start building the BLFS packages (will use the package users method suggested by Lufbery).
 
Old 10-26-2010, 09:49 AM   #8
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Hi all,

I made a few small updates to my build notes:

Part 1

Part 2 -- a few enhancements to the section on chapter 6.6.

Part 3 -- more on Shadow. Please check my Bash code if you can.

Regards,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Build notes for LFS 6.6 with package users. . . Lufbery Slackware 1 10-20-2010 08:10 PM
Successful LFS (with package users) build! Lufbery Linux From Scratch 7 10-12-2010 08:25 PM
LXer: Microsoft Lures Notes Users LXer Syndicated Linux News 0 01-23-2006 03:31 AM
Has anyone tried to use package management conary to build LFS? jery_wang2002 Linux From Scratch 1 05-31-2005 06:30 PM
Where are the package list and release-notes? JordanH Fedora 3 11-14-2004 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration