Language Selection

English French German Italian Portuguese Spanish

Linux From Scratch 6.1 (part 1?)

Filed under
Linux
Reviews
-s

Linux From Scratch 6.1 was released on July 10 and I thought I'd take a look. This will be my third attempt at installing LFS. My first attempt was way back when I still ran Mandrake everyday (ie. - about 3 years ago) and I got as far as setting up the filesystem directories when I decided this was too much like work and abandoned the quest. My second was not so long ago when 6.0 was the latest and greatest version. I got a base installed and booted, but could not get xorg (blfs) to build. The project was put on the back burner until it simmered away. Today I begin again. Will I have the time and inclination to complete it this time? You know what they say, "third time's a charm!" ... or it is "three strikes, your out?" We'll see.

The first thing I did was untar/uncompress the LFS-Book-6.1-html. Yep, that's how this unique distro is distributed - not by iso or stage tarball, but by instructions. I fired up Konqueror and navigated to the index.html where I read the prerequisites telling me if I didn't know about linux, read "some links to newbie's guides". Then next the system requirements.

I wanted to build from my gentoo install, and I knew that I was using a 2.6.12 kernel with gcc 3.4.4. The system requirements stated that "the host must be running at least a 2.6.2 kernel compiled with GCC-3.0 or higher." So, I guess I'm good.

I recall reading their "book" from cover to cover, or at least until the building of xorg last time, so I refreshed my memory some by reading the preface and introduction. I was a little anxious to get compiling, but I knew if I skipped this step - I'd be sorry later. One of the subheadings is called Errata, and they recommend clicking on the link and checking for any pressing issues prior to building. Yippee - none were listed yet - this version was only just released today. I'll be one of their guinea pigs. I could just follow the guide.

Heyyyy, Chapter 1.1 - How to Build an LFS System states that "As an alternative to installing an entire separate distribution onto your machine, you may wish to use the Linux From Scratch LiveCD. The CD works well as a host system, providing all the tools you need to successfully follow the instructions in this book. Additionally, it contains all the source packages, patches and a copy of this book. So once you have the CD, no network connection or additional downloads are necessary. For more information about the LFS LiveCD or to download a copy, visit http://www.linuxfromscratch.org/livecd/." augh well.... Skipping to Chapter 2... Big Grin

I already had a partition set up and a filesystem created, so... whoops, it's reiser and they recommend ext2 or 3. I guess I'll mke2fs /dev/hda13 and tune2fs -j /dev/hda13. Next, mount it. I still had my /mnt/lfs from the last attempt, so I export LFS=/mnt/lfs as instructed as well as mount /dev/hda13 $LFS and mkdir $LFS/sources. Thus begins the tendious task of downloading all the recommended packages and patches. One bit of advice for ya here: download all tar.gz packages. In my infinite wisdom, I chose as many tar.bz2 packages as possible, but not all are available in bunzip2. Later it would make for more delays when having to check if the package was gunzip'd or bunzip'd and issueing the correct command to decompress.

Next was setting up some further environmental variables and stuff, followed by binutils. LFS offers a suggestion to keep a time on this first compile so that you may be able to estimate how long the remaining packages take to compile - measured in BSUs. My BSU for binutils was:
real 2m26.874s
user 1m44.221s
sys 0m29.469s

As the first pass of gcc builds, I can report the problems encountered so far with book. Root directory owned by root and package sources and directory owned by host system user, causing permission problems when we got to the mkdir ../binutils and ../gcc build directories. Also, no /home/lfs instruction which caused the su - lfs to fail the first attempt. I mkdir /home/lfs and chown lfs:lfs /home/lfs and then as root from host system, just chowned lfs:lfs /mnt/lfs. I hope this is okay and doesn't cause problems later on. But with everything being built and installed by the lfs user, that is of course the permissions on all the files and executables. It only stand to reason the initial directory permissions should be the same. We'll see.

At this point I was just more or less highlighting and pasting the given commands into the virtual environmental shell. All went well and it was time to chroot into lfs and continue with chapter 6. The permissions issue mentioned in the previous paragraph are addressed here. A root group/user is added and directory permissions are changed.

From that point on I just followed the guide through the package recompiles. It was as they say "by the book". I configured the kernel and skipped the grub portion. I set up some of the config files "the book" suggested - some I copied from gentoo, like my /etc/resolv.conf. I copied the boot kernel and files to /boot, then mv'd that to /boot.bak. I then mounted my hda5 as /boot and copied all the files from /boot.bak to /boot. I set up an entry in my gentoo's lilo.conf, ran lilo and rebooted.

The system rebooted into my fresh LFS install without issue. All the included configuration instructions seemed fairly complete and accurate enough given the users' input and ability to know small details about their machines. Overall I found the instructions in the book easy to follow and accurate. I think anyone with basic commandline experience could have a successful install and with just a few more hints (for example: delete previous gcc-build directory/sources and untar/compress fresh), a newbie might too. Tho LFS is designed to be just your basic system ready for your customizations and additions, the book really needs to include at least a console web browser (links or lynx) and wget. It took me about 10 hours or so to go from clicking on the html book to logging into my new system (bearing in mind I had to break from time to time to eat, watch some movies, and fight with my boyfellar). So for anyone wanting their own homemade system or to learn more how a Linux operating system is put together and works (if one pays attention to valuable information/explanations included as opposed to <cough>mindlessly <cough>copying and pasting), I can recommend LFS-6.1.

Now on to BLFS. Unfortunately Beyond Linux From Scratch is always a book behind it seems. To me it's not a real install until one can log into a window manager. Hopefully by next weekend BLFS will be caught up and we can possibly have a part 2. But I have a base ready and waiting for it. Big Grin

I remember...

Within my first year of linux, back under RH 7 or Mandrake.
I seem to remember I had a nice LFS install on a smaller partition (500Mb), the biggest problem I had was adding it to my host lilo config.
I remember I was able to boot to bash in under 5sec due to the lack of what some people would consider 'functionality' and under 10sec for a minimal X session with mplayer fired up waiting for me to play a dvd.
I even got as far as installing KDE 3.5 on that sucker a few weeks before it became available under Mandrake (that was a mission with dial-up) I ended up buying a source cd from somewhere Big Grin

I ended up down this route after finding I had to keep rebuilding my kernel for a winmodem which had a working driver which wouldn't be accepted into the mainline kernel or the distro ones either.

Reiser is available under LFS provided kernel support and reiserfsprogs (see BLFS) are built and installed in the minimal system (stage 2 i seem to remember).

I eventually gave up with this as I like living on the cutting edge too much (escpecially with KDE4) and my laptop is not capable of rolling it's own gentoo weekly which requires less personal input into the configuration and dependency managemnet than LFS which is quite intensive for watching dependencies (although there's no circular dependencies which makes sence).

Speaking of which I installed paco as a text based package manager which I still grab again for my SuSE install when I have to compile that all-so-important package from source. I find it's quicker than me generating my own rpm, which (I suppose) would be easier to upgrade...

At the moment I have a chroot jail on my system which I copied loosley from LFS which allows me to do any work with the latest compilers etc without polluting my main system.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

Graphics: AMDGPU and X.Org Elections

  • amdgpu drm-next-5.2
  • AMDGPU Has Another Round Of Updates Ahead Of Linux 5.2
    Feature work on DRM-Next for the Linux 5.2 kernel cycle is winding down while today AMD has sent in what could be their last round of AMDGPU feature updates for this next kernel release. Building off their earlier Linux 5.2 feature work are more updates. That earlier round brought new SMU11 enablement code for Vega 20, various other Vega 20 features, HMM preparations, and other code changes.
  • 2019 Election Round 2 voting OPEN
    To all X.Org Foundation Members: The round 2 of X.Org Foundation's annual election is now open and will remain open until 23:59 UTC on 2 May 2019. Four of the eight director seats are open during this election, with the four nominees receiving the highest vote totals serving as directors for two year terms. There were six candidates nominated. For a complete list of the candidates and their personal statements, please visit the 2019 X.Org Elections page at https://www.x.org/wiki/BoardOfDirectors/Elections/2019/ The new bylaw changes were approved in the first round of voting. Here are some instructions on how to cast your vote: Login to the membership system at: https://members.x.org/ If you do not remember your password, you can click on the "lost password" button and enter your user name. An e-mail will be sent to you with your password. If you have problems with the membership system, please e-mail membership at x.org. When you login you will see an "Active Ballots" section with the "X.Org 2019 Elections Round 2" ballot. When you click on that you will be presented with a page describing the ballot. At the bottom you will find a number of dropdowns that let you rank your candidates by order of preference. For the election: There is a pull-down selection box for 1st choice, 2nd, choice, and so on. Pick your candidates top to bottom in order of preference, avoiding duplicates. After you have completed your ballot, click the "Cast vote" button. Note that once you click this button, your votes will be cast and you will not be able to make further changes, so please make sure you are satisfied with your votes before clicking the "Cast vote" button. After you click the "Vote" button, the system will verify that you have completed a valid ballot. If your ballot is invalid (e.g., you duplicated a selection or did not answer the By-laws approval question), it will return you to the previous voting page. If your ballot is valid, your votes will be recorded and the system will show you a notice that your votes were cast. Note that the election will close at 23:59 UTC on 2 May 2019. At that time, the election committee will count the votes and present the results to the current board for validation. After the current board validates the results, the election committee will present the results to the Members. Harry, on behalf of the X.Org elections committee
  • It's Time To Re-Vote Following The Botched 2019 X.Org Elections
    While there were the recent X.Org Foundation board elections, a do-over was needed as their new custom-written voting software wasn't properly recording votes... So here's now your reminder to re-vote in these X.Org elections. At least with the initial round of voting they reached a super majority and the ballot question of whether the X.Org Foundation should formally fold FreeDesktop.org into its umbrella worked and that X.Org + FreeDesktop.org hook-up passed so all is well on that front. But for the Board of Directors elections, that's where re-voting is needed with the voting software that now correctly records the votes.

today's howtos

Games: Lutris and More

  • Epic Games Store Now On Linux Thanks To Lutris
    While the Epic Games Store itself is not officially supported by the open source Linux operating system, a third-party gaming client has now made sure that you can access the store and launcher on your own distro. The Epic Games Store is now accessible on Linux via the Lutris Gaming client. The client is available to all Linux users, who in the past has provided the same users a way to play PC games without the need to have Windows installed in their machines. Although Linux is not necessarily the go-to platform when it comes to PC gaming, there is a very niche audience dedicated to making the platform work in favor of open-source and to counteract what could be perceived as a heavily Windows-biased PC gaming community. Linux gaming is somewhat tedious to the relatively casual or normal user, although there are some within the Linux community that advertise and try to foster its growth in terms of gaming, as there are some games that can run better on the operating system. That is to say, if you have a lot of patience to try and make it work.
  • You Died but a Necromancer revived you is good fun in a small package
    Sometimes, simplicity is what makes a game and in the case of You Died BaNRY that's very true. The game has little depth to it but makes up for that in just how frantic and fun it can be. The entire gameplay is just you (or you and friends) attempting to cross a small level filled with platforms, spikes and all sorts of crazy traps. It's ridiculously easy to get into as well, since the controls are so basic all you need to worry about is your movement.
  • Forager is a weirdly addictive casual grinding game that has mined into my heart
    I'm not usually one for games that have you endlessly wander around, collect resources, build a little and repeat but Forager is so ridiculously charming it's lovely.
  • DragonRuby Game Toolkit, a cross-platform way to make games with Ruby
    Now for something a little different! Ryan "Icculus" Gordon, a name known for many Linux ports and SDL2 teamed up with indie developer Amir Rajan to create a new cross-platform toolkit. Why was it created? Well, in a nutshell they both "hate the complexity of today's engines" and this toolkit was actually made to help ship A Dark Room for the Nintendo Switch, which shows how versatile it is.

10+ Open Source Software Writing Tools That Every Writer Should Know

Being a professional writer requires two key things to help ensure success: commitment and support. The former comes from the writer, and the latter comes from the tools he (or she) uses to get the job done. Below is a list of 11 great and lesser-known writing tools or apps, many of which are free and open-source, that can help improve the quality of your writing and make you a more productive and successful writer. Read more