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

4 Neat New GTK Themes for Your Linux Desktop

The new Yaru/Communitheme theme might be the talk of the Ubuntu town right now, but it’s not the only decent desktop theme out there. If you want to give your Linux desktop a striking new look ahead of the autumn then the following quad-pack of quality GTK themes might help you out. Don’t be put off by the fact you will need to manually install these skins; it’s pretty to install GTK themes on Ubuntu 18.04 LTS above, providing you set hidden folders to show (Ctrl + H) in Nautilus first. Read more Also: Getting Things GNOME

Python wriggles onward without its head

At the third annual PyBay Conference in San Francisco over the weekend, Python aficionados gathered to learn new tricks and touch base with old friends. Only a month earlier, Python creator Guido van Rossum said he would step down as BDFL – benevolent dictator for life – following a draining debate over the addition of a new way to assign variables within an expression (PEP 572). But if any bitterness about the proposal politics lingered, it wasn't evident among attendees. Raymond Hettinger, a Python core developer, consultant and speaker, told The Register that the retirement of Python creator Guido van Rossum hasn't really changed things. "It has not changed the tenor of development yet," he said. "Essentially, [Guido] presented us with a challenge for self-government. And at this point we don't have any active challenges or something controversial to resolve." Read more

Today in Techrights

today's leftovers

  • How to Install R on Ubuntu 18.04
  • How to Install HTTP Git Server with Nginx on Ubuntu 18.04 LTS
  • Everything You Need to Know about Linux Containers, Part I: Linux Control Groups and Process Isolation
  • Robert Roth: Five or More GSoC
  • Adventures with NVMe, part 2
    A few days ago I asked people to upload their NVMe “cns” data to the LVFS. So far, 643 people did that, and I appreciate each and every submission. I promised I’d share my results, and this is what I’ve found:
  • The Next Challenge For Fwupd / LVFS Is Supporting NVMe SSD Firmware Updates
    With UEFI BIOS updating now working well with the Fwupd firmware updating utility and Linux Vendor Firmware Service (LVFS) for distributing these UEFI update capsules, Richard Hughes at Red Hat is next focusing on NVMe solid-state drives for being able to ship firmware updates under Linux. Hughes is in the early stages at looking to support NVMe firmware updates via LVFS/fwupd. Currently he is hoping for Linux users with NVMe drives to send in the id-ctrl identification data on your drives to him. This data will be useful so he knows what drives/models are most popular but also for how the firmware revision string is advertised across drives and vendors.
  • [Older] Language, Networking Packages Get Updates in Tumbleweed
    There were two openSUSE Tumbleweed snapshots this past week that mostly focused on language and network packages. The Linux Kernel also received an update a couple days ago to version 4.17.13. The packages in the 20180812 Tumbleweed snapshot brought fixes in NetworkManager-applet 1.8.16, which also modernized the package for GTK 3 use in preparations for GTK 4. The free remote desktop protocol client had its third release candidate for freerdp 2.0.0 where it improved automatic reconnects, added Wave2 support and fixed automount issues. More network device card IDs for the Intel 9000 series were added in kernel 4.17.13. A jump from libstorage-ng 4.1.0 to version 4.1.10 brought several translations and added unit test for probing xen xvd devices. Two Common Vulnerabilities and Exposures fixes were made with the update in postgresql 10.5. Several rubygem packages were updated to versions 5.2.1 including rubygem-rails 5.2.1, which makes the master.key file read-only for the owner upon generation on POSIX-compliant systems. Processing XML and HTML with python-lxml 4.2.4 should have fewer crashes thanks to a fix of sporadic crashes during garbage collection when parse-time schema validation is used and the parser participates in a reference cycle. Several YaST packages receive updates including a new ServiceWidget to manage the service status with yast2-ftp-server 4.1.3 as well with yast2-http-server, yast2-slp-server and yast2-squid 4.1.0 versions.
  • Red Hat Inc Risk Points versus Technology
  • 10 Efficient Raspberry Add-ons To Enhance Performance - Part 8
    Sometimes you may find yourself in great need to improve the functionality of your Raspberry Pi. There is a good chance your Raspberry does not support the functionality you want. There is also a chance that it supports your dream functionality but with the help of an external tool. An add-on in other words. It is pretty obvious that your dream add-on exists in the market or someone somewhere is cracking an algorithm to build. Never mind, here we compile a list of the best add-ons to get for your Raspberry in 2018.
  • Secure Email Service Tutanota sees F-Droid Release
    Back in February, I reviewed an email provider called Tutanota. If you read the article, you will remember that I thought very highly of the service. In my eyes, there were very few downsides to using the encrypted mail service, one of them being that you couldn’t use third-party email clients like Thunderbird for desktop computers or K-9 Mail for mobile devices.
  • Motorola Announces Android Pie Updates for 8 smartphones excluding Moto E5 & G5
  • How To Unsend Emails On Gmail For Android?
  • Nerd Knobs and Open Source in Network Software
    Tech is commoditizing. I've talked about this before; I think networking is commoditizing at the device level, and the days of appliance-based networking are behind us. But are networks themselves a commodity? Not any more than any other system. We are running out of useful features, so vendors are losing feature differentiation. This one is going to take a little longer… When I first started in network engineering, the world was multiprotocol, and we had a lot of different transports. For instance, we took cases on IPX, VIP, Appletalk, NetBios, and many other protocols. These all ran on top of Ethernet, T1, Frame, ATM, FDDI, RPR, Token Ring, ARCnet, various sorts of serial links ... The list always felt a little too long, to me. Today we have IPv4, IPv6, and MPLS on top of Ethernet, pretty much. All transports are framed as Ethernet, and all upper layer protocol use some form of IP. MPLS sits in the middle as the most common "transport enhancer." The first thing to note is that space across which useful features can be created is considerably smaller than it used to be.
  • Meetings that make people happy: Myth or magic?
    People tend to focus on the technical elements of meeting prep: setting the objective(s), making the agenda, choosing a place and duration, selecting stakeholders, articulating a timeline, and so on. But if you want people to come to a meeting ready to fully engage, building trust is mission-critical, too. If you need people to engage in your meetings, then you're likely expecting people to come ready to share their creativity, problem-solving, and innovation ideas.
  • Building microprocessor architectures on open-source hardware and software
     

    "The real freedom you get from open source projects is much more, and more important than the fact that you don't have to pay for it," Frank Gürkaynak, Director of ETHZ's Microelectronics Design Center, writes in an article posted on All About Circuits. "Researchers can take what we provide and freely change it for their experiments. Startup companies can build on what we provide as a starting point and concentrate their time and energy on the actual innovations they want to provide. And people who are disturbed by various attacks on their systems [1, 2] have the chance to look inside and know what exactly is in their system."

  • Create DIY music box cards with Punchbox
    That first time almost brought tears to my eyes. Mozart, sweetly, gently playing on the most perfect little music box. Perfectly! No errors in timing or pitch. Thank you, open source—without Mido, Svgwrite, PyYAML, and Click, this project wouldn't have been possible.
  • Fund Meant to Protect Elections May Be Too Little, Too Late
    The Election Assistance Commission, the government agency charged with distributing federal funds to support elections, released a report Tuesday detailing how each state plans to spend a total of $380 million in grants allocated to improve and secure their election systems. But even as intelligence officials warn of foreign interference in the midterm election, much of the money is not expected to be spent before Election Day. The EAC expects states to spend their allotted money within two to three years and gives them until 2023 to finish spending it. Election experts have expressed skepticism that the money will be enough to modernize election equipment and secure it against state-sponsored cyber threats.