Skip to content
hack reveal logo png
HACK REVEAL
  • Home
  • Android
  • Windows
  • Hacks
    • Hacking
    • Reveals
  • Linux
    • kali Linux
    • Exploits
    • Metasploit
  • Tech
    • Cryptocurrency
  • AI Tools
  • Best Product
hack reveal logo png
HACK REVEAL
Linux from scratch hackreveal.com

Linux From Scratch (LFS) – Make Your Own Operating system

Ankit Chaubey, 24, June 202227, June 2022

Linux From Scratch (LFS) is a type of a Linux installation and the name of a book written by Gerard Beekmans. The book gives readers instructions on how to build a Linux system from source.

TABLE OF CONTENTS

  • 1 Benefits of having a system that is truly your own.
    • 1.1 About The Author
      • 1.1.1 Ankit Chaubey
    • 1.2 Related

Benefits of having a system that is truly your own.

Gerard Beekmans
Linuxfromscratch
Audience
There are many reasons why you would want to read this book. One of the questions many people raise is, “why go
through all the hassle of manually building a Linux system from scratch when you can just download and install an
existing one?”
viiiLinux From Scratch – Version 10.1
One important reason for this project’s existence is to help you learn how a Linux system works from the inside out.
Building an LFS system helps demonstrate what makes Linux tick, and how things work together and depend on each
other. One of the best things that this learning experience can provide is the ability to customize a Linux system to
suit your own unique needs.
Another key benefit of LFS is that it allows you to have more control over the system without relying on someone else’s
Linux implementation. With LFS, you are in the driver’s seat and dictate every aspect of the system.
LFS allows you to create very compact Linux systems. When installing regular distributions, you are often forced to
install a great many programs which are probably never used or understood. These programs waste resources. You
may argue that with today’s hard drive and CPUs, such resources are no longer a consideration. Sometimes, however,
you are still constrained by size considerations if nothing else. Think about bootable CDs, USB sticks, and embedded
systems. Those are areas where LFS can be beneficial.
Another advantage of a custom built Linux system is security. By compiling the entire system from source code, you are
empowered to audit everything and apply all the security patches desired. It is no longer necessary to wait for somebody
else to compile binary packages that fix a security hole. Unless you examine the patch and implement it yourself, you
have no guarantee that the new binary package was built correctly and adequately fixes the problem.
The goal of Linux From Scratch is to build a complete and usable foundation-level system. If you do not wish to build
your own Linux system from scratch, you may nevertheless benefit from the information in this book.
There are too many other good reasons to build your own LFS system to list them all here. In the end, education is by
far the most powerful of reasons. As you continue in your LFS experience, you will discover the power that information
and knowledge truly bring.
LFS Target Architectures
The primary target architectures of LFS are the AMD/Intel x86 (32-bit) and x86_64 (64-bit) CPUs. On the other hand,
the instructions in this book are also known to work, with some modifications, with the Power PC and ARM CPUs.
To build a system that utilizes one of these CPUs, the main prerequisite, in addition to those on the next page, is an
existing Linux system such as an earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or other distribution that
targets the architecture that you have. Also note that a 32-bit distribution can be installed and used as a host system
on a 64-bit AMD/Intel computer.
For building LFS, the gain of building on a 64-bit system compared to a 32-bit system is minimal. For example, in a
test build of LFS-9.1 on a Core i7-4790 CPU based system, using 4 cores, the following statistics were measured:
Architecture Build Time
32-bit
239.9 minutes
64-bit
233.2 minutes
Build Size
3.6 GB
4.4 GB
As you can see, on the same hardware, the 64-bit build is only 3% faster and is 22% larger than the 32-bit build. If you
plan to use LFS as a LAMP server, or a firewall, a 32-bit CPU may be largely sufficient. On the other hand, several
packages in BLFS now need more than 4GB of RAM to be built and/or to run, so that if you plan to use LFS as a
desktop, the LFS authors recommend building on a 64-bit system.
The default 64-bit build that results from LFS is considered a “pure” 64-bit system. That is, it supports 64-bit executables
only. Building a “multi-lib” system requires compiling many applications twice, once for a 32-bit system and once
for a 64-bit system. This is not directly supported in LFS because it would interfere with the educational objective of
providing the instructions needed for a straightforward base Linux system. Some LFS/BLFS editors maintain a fork
of LFS for multilib, which is accessible at http://www.linuxfromscratch.org/~thomas/multilib/index.html. But it is an
advanced topic.
ixLinux From Scratch – Version 10.1
Prerequisites
Building an LFS system is not a simple task. It requires a certain level of existing knowledge of Unix system
administration in order to resolve problems and correctly execute the commands listed. In particular, as an absolute
minimum, you should already have the ability to use the command line (shell) to copy or move files and directories, list
directory and file contents, and change the current directory. It is also expected that you have a reasonable knowledge
of using and installing Linux software.
Because the LFS book assumes at least this basic level of skill, the various LFS support forums are unlikely to be able
to provide you with much assistance in these areas. You will find that your questions regarding such basic knowledge
will likely go unanswered or you will simply be referred to the LFS essential pre-reading list.
Before building an LFS system, we recommend reading the following:
• Software-Building-HOWTO http://www.tldp.org/HOWTO/Software-Building-HOWTO.html
This is a comprehensive guide to building and installing “generic” Unix software packages under Linux. Although
it was written some time ago, it still provides a good summary of the basic techniques needed to build and install
software.
• Beginner’s Guide to Installing from Source http://moi.vonos.net/linux/beginners-installing-from-source/
This guide provides a good summary of basic skills and techniques needed to build software from source code.
LFS and Standards
The structure of LFS follows Linux standards as closely as possible. The primary standards are:
• POSIX.1-2008.
• Filesystem Hierarchy Standard (FHS) Version 3.0
• Linux Standard Base (LSB) Version 5.0 (2015)
The LSB has four separate standards: Core, Desktop, Runtime Languages, and Imaging. In addition to generic
requirements there are also architecture specific requirements. There are also two areas for trial use: Gtk3 and
Graphics. LFS attempts to conform to the architectures discussed in the previous section.
Note
Many people do not agree with the requirements of the LSB. The main purpose of defining it is to ensure
that proprietary software will be able to be installed and run properly on a compliant system. Since LFS
is source based, the user has complete control over what packages are desired and many choose not to
install some packages that are specified by the LSB.
Creating a complete LFS system capable of passing the LSB certifications tests is possible, but not without many
additional packages that are beyond the scope of LFS. These additional packages have installation instructions in BLFS.
Packages supplied by LFS needed to satisfy the LSB Requirements
LSB Core:Bash, Bc, Binutils, Coreutils, Diffutils, File, Findutils, Gawk,
Grep, Gzip, M4, Man-DB, Ncurses, Procps, Psmisc, Sed,
Shadow, Tar, Util-linux, Zlib
LSB Desktop:None

LFS-BOOK-10.1Download

About The Author

Ankit Chaubey

See author's posts

    Related

    Linux Reveals LinuxLinux From Scratch

    Post navigation

    Previous post
    Next post

    Related Posts

    Hacking Best Penetration Testing Tools

    The Best Penetration Testing Tools for Linux

    16, March 202316, March 2023

    Penetration Testing is the process of identifying, exploiting and mitigating vulnerabilities in wireless networks. It is an important part of network security and often requires specialized tools to be used. Linux is a great platform for wireless penetration testing as it has a wide variety of tools available for this…

    Read More
    Hacking Binder Trace: a tool for intercepting and parsing Android Binder messages

    Binder Trace: a tool for intercepting and parsing Android Binder messages

    5, June 20235, June 2023

    TABLE OF CONTENTS1 Binder Trace2 ⚙️ Installation3 Arguments4 ▶️ Starting binder trace5 ⌨️ Controls6 🔎 Filtering6.1 About The Author6.1.1 PrakashBinder Trace Binder Trace is a tool for intercepting and parsing Android Binder messages. Think of it as “Wireshark for Binder”. ⚙️ Installation You’ll need a rooted Android device or emulator. Arguments Argument Description -h Prints…

    Read More
    Cyber Security Best Free and Open Source OSINT Tools

    The 9 Best Free and Open Source OSINT Tools

    8, April 2023

    OSINT Tools stands for “Open Source Intelligence,” which refers to the practice of collecting and analyzing information from publicly available sources. These sources may include social media, online forums, news articles, government records, and other publicly accessible data. The goal of OSINT is to gather relevant and accurate information that…

    Read More

    Leave a ReplyCancel reply

    Search

    Recent Posts

    • RapidScan: The Ultimate Multi-Tool Web Vulnerability Scanner
    • Zphisher: The Ultimate Automated Phishing Tool Explained
    • Internet Anonymity 101: The Ultimate Guide for Staying Anonymous Online
    • How to Use Photoshop’s AI Generative Fill In 2023
    • Unlock Instagram Hacks with Inshackle – The Ultimate Tool

    Archives

    • How to Use Photoshop's AI Generative Fill
      How to Use Photoshop’s AI Generative Fill In 2023
    • 40 Best Text to Video AI Tools
    • How to Fix “This account is not allowed to use WhatsApp” Error
      How to Fix “This account is not allowed to use WhatsApp” Error
    • 4 ways to hack cameras
      4 Ways To Hack CCTV Cameras And How To Prevent
    • AI Website Builders
      The 7 Best AI Website Builders In 2023
    • PhoneSploit Pro
      PhoneSploit Pro: Taking Phone Hacking to the Next Level
    • Bypass Your Android Screen Lock Without a Password
      How to Hack/Bypass Android Screen Lock Without a Password
    • Instagram Password Hacking
      Bruteinsta: The Ultimate Instagram Password Hacking Tool?
    • Burner Phone
      What is a Burner Phone: Everything You Need to Know
    • how to access Dark Web
      Exploring the Dark Web: How to Get Started Safely
    • anime face changer
      The Best Ai Anime Editor Apps For Android And iOS
    • How to Unbanned From WhatsApp Quickly In 2023
      How to Unbanned From WhatsApp Quickly In 2023

    AI News (4) AI Tools (10) Android (66) Best Product (29) ChatGPT (1) Cryptocurrency (5) Cyber Security (48) Deal (19) Exploits (11) Games (10) Hacking (79) Hacks (15) How To (64) kali Linux (41) Linux (70) Metasploit (6) Reveals (112) SEO (3) Tech (141) Uncategorized (2) Windows (71) Windows Tips (17)

    ©2023 HACK REVEAL | WordPress Theme by SuperbThemes