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

Security Leftovers

today's howtos

Python Programming

  • Teaching Comparing Strings in Python the Hard Way

    Some long-time subscribers may remember that I am teaching math to 10-18 year old students. The COVID-19 situation nearly made me quit and look for an alternative to earn my rent, but my love for the kids and teaching them was stronger. After a few months of shortage, we found ways to responsibly resume the meetings, either online or with safety measures. When schools were closed, some parents wondered what they could do to drag their offsprings away from computers; playing computer games seemed to be the new all-time favorite hobby. Of course, resistance was expected. Why not turn this interest into something useful? I didn’t expect that kids as young as eight are interested to learn how to create games. But why not? I learned from electronic magazines and books how computers, MS BASIC, and Z80 assembly worked when I was ten, and I am sure I would have been interested with eight, if my classmate had broken his leg two years earlier… But that’s not the story I want to tell.

  • This Python script mimics Babbage's Difference Engine

    After some contemplation, Charles Babbage's ghost replied, "This is all well and good, but here you only take the number of rows and give the number of marbles. With my table, I can also tell you how large a pyramid you might construct given a certain number of marbles; simply look it up in the table." Python had to agree that this was indeed the case, yet it knew that surely this must be solvable as well. With little delay, Python came back with another short script. The solution involves thinking through the math in reverse.

  • Setup and debug a Django app in PyCharm Community Edition

    Did you know that the freely available PyCharm community edition is perfectly suited for developing and debugging Django web applications? The goal of the article is to help you setup a new Django application framework in the PyCharm community edition, to the point that you can run and debug the Django application in PyCharm. We’ll also setup a virtual environment for the PyCharm project and install Django inside this virtual environment. [...] PyCharm comes in two editions: the professional edition and the community edition. The professional edition needs to be bought. In contrast, JetBrains makes the community edition free and open source. With other words, you can download the community edition for free and get started with it right away. When inspecting the differences between the PyCharm editions, you’ll notice that the PyCharm professional edition features all sort of Django specific support as you can read here. From this information you might think that you absolutely need to purchase the PyCharm professional edition, when programming and debugging Django applications. This is incorrect. You can definitely program and debug your Django application with the free PyCharm community edition. In this article, I’ll explain step-by-step how you can setup and debug a Django application in the free PyCharm community edition.

  • Using Google Login With Flask

    In this course, you’ll work through the creation of a Flask web application. Your application will allow a user to log in using their Google identity instead of creating a new account. There are tons of benefits with this method of user management. It’s going to be safer and simpler than managing the traditional username and password combinations.

  • Python Morsels: Writing a for loop

    You can use a for loop to loop over any iterable (iter-able). Anything you're able to iterate over can be looped over with a for loop.

  • Design of the Versioned HDF5 Library

    In a previous post, we introduced the Versioned HDF5 library and described some of its features. In this post, we'll go into detail on how the underlying design of the library works on a technical level. Versioned HDF5 is a library that wraps h5py and offers a versioned abstraction for HDF5 groups and datasets. Versioned HDF5 works fundamentally as a copy-on-write system. The basic idea of copy-on-write is that all data is effectively immutable in the backend. Whenever a high-level representation of data is modified, it is copied to a new location in the backend, leaving the original version intact. Any references to the original will continue to point to it.

  • PyCoder’s Weekly: Issue #440 (Sept. 29, 2020)
  • Why use Python Programming for building a Healthcare Application

    Python is one of the best programming languages used across a plethora of industries. The healthcare sector is a significant benefactor of the language. With Python programming in healthcare, institutions and clinicians can deliver better patient outcomes through dynamic and scalable applications. Today, healthcare is generating tons of data from patients and facilities. By making the best use of this data, doctors can predict better treatment methods and improve the overall healthcare delivery system.

  • The Python return Statement: Usage and Best Practices

    The Python return statement is a key component of functions and methods. You can use the return statement to make your functions send Python objects back to the caller code. These objects are known as the function’s return value. You can use them to perform further computation in your programs. [...] Most programming languages allow you to assign a name to a code block that performs a concrete computation. These named code blocks can be reused quickly because you can use their name to call them from different places in your code. Programmers call these named code blocks subroutines, routines, procedures, or functions depending on the language they use. In some languages, there’s a clear difference between a routine or procedure and a function. Sometimes that difference is so strong that you need to use a specific keyword to define a procedure or subroutine and another keyword to define a function. For example the Visual Basic programming language uses Sub and Function to differentiate between the two.

  • Test and Code: 132: mocking in Python - Anna-Lena Popkes

    Using mock objects during testing in Python. Anna-Lena joins the podcast to teach us about mocks and using unittest.mock objects during testing.

  • Resources: Python for Kids

    Friend of Mu, Kevin Thomas has been hard at work creating free-to-use resources for kids (and older kids) who want to learn Python, with the BBC micro:bit and Mu. [...] Meanwhile, in our secret fortress of solitude, the Mu “minions” (Munions..?) have been hard at work on some fantastic updates which we hope to reveal very soon.

  • wxPython by Example – Drag-and-Drop an Image (Video)

    In this tutorial, you will learn how to drag an image into your #wxPython application and display it to your user.

  • Solving Python Package Creation For End User Applications With PyOxidizer - Episode 282

    Python is a powerful and expressive programming language with a vast ecosystem of incredible applications. Unfortunately, it has always been challenging to share those applications with non-technical end users. Gregory Szorc set out to solve the problem of how to put your code on someone else's computer and have it run without having to rely on extra systems such as virtualenvs or Docker. In this episode he shares his work on PyOxidizer and how it allows you to build a self-contained Python runtime along with statically linked dependencies and the software that you want to run. He also digs into some of the edge cases in the Python language and its ecosystem that make this a challenging problem to solve, and some of the lessons that he has learned in the process. PyOxidizer is an exciting step forward in the evolution of packaging and distribution for the Python language and community.

  • Sumana Harihareswara is an open-source software fairy... and other things I learned recording her DevJourney
  • All You Need To Know For Selenium Testing On The Cloud

    Building large-scale web applications take a monumental effort. Testing the quality of these applications requires a whole other level of dedication. From a developer’s vantage point, the focus is on improving the feature set, speeding up the overall performance, and building a scalable product. As far as QA is concerned, a lot of focus is on usability testing and compatibility testing while testing a website or web application. If you are building a consumer-facing website or web application, your product is likely to be accessed by users from across the globe. Your product must be tested on various combinations of web browsers, devices, and platforms (operating systems) to ensure top-notch performance. Hence, browser compatibility testing becomes even more critical. No one wants to lose potential customers because of unpleasant user experience on select few browsers, devices, or platforms.

  • Montreal Python User Group: Montréal-Python 80 – Pedal Kayak

    Greetings Python community, October is fast approaching with vibrant fall colour and our favourite apples. This is the occasion to set the table for our 80th event – Pedal Kayak – which will take place this coming October 26.

  • Simple FPS fingerprint similarity search: variations on a theme

    It's easy to write a fingerprint search tool. Peter Willett tells a story about how very soon after he, Winterman, and Bawden published Implementation of nearest-neighbor searching in an online chemical structure search system (1986) (which described their nearest-neighbor similarity search implementation and observed that Tanimoto similarity gave more satisfactory results than cosine similarity), he heard from a company which wrote their own implementation, on a Friday afternoon, and found it to be very useful. Now, my memory of his story may be missing in the details, but the key point is that it's always been easy to write a fingerprint similarity search tool. So, let's do it! I'll call my program ssimsearch because it's going to be a simplified version of chemfp's simsearch command-line tool. In fact, I'll hard-code just about everything, with only the bare minimum of checking.

Android Leftovers