Linux From Scratch
Linux From Scratch 12.1 for systemd
Introduction
...
Preparing for the Build
Preparing the Host System
Creating a New Partition
su - root
# legacy
# partitioning
parted /dev/sdb -- unit mib
parted /dev/sdb -- mklabel gpt
parted /dev/sdb -- mkpart primary 1 3
parted /dev/sdb -- mkpart primary ext4 3 515
parted /dev/sdb -- mkpart root ext4 515 -1
parted /dev/sdb -- set 1 bios_grub on
# formating
mkfs.ext4 -v /dev/sdb2
mkfs.ext4 -v /dev/sdb3
# UEFI
# partitioning
parted /dev/sdb -- unit mib
parted /dev/sdb -- mklabel gpt
parted /dev/sdb -- mkpart primary 1 3
parted /dev/sdb -- mkpart ESP fat32 3 515
parted /dev/sdb -- mkpart root ext4 515 -1
parted /dev/sdb -- set 1 bios_grub on
parted /dev/sdb -- set 2 esp on
# formating
mkfs.fat -F 32 -n boot /dev/sdb2
mkfs.ext4 -v /dev/sdb3Setting The $LFS Variable
Mounting the New Partition
Packages and Patches
Final Preparations
Creating a Limited Directory Layout in the LFS Filesystem
Adding the LFS User
Setting Up the Environment
Building the LFS Cross Toolchain and Temporary Tools
Compiling a Cross-Toolchain
Binutils-2.42 - Pass 1
GCC-13.2.0 - Pass 1
Linux-6.7.4 API Headers
Glibc-2.39
Libstdc++ from GCC-13.2.0
Cross Compiling Temporary Tools
M4-1.4.19
Ncurses-6.4-20230520
Bash-5.2.21
Coreutils-9.4
Diffutils-3.10
File-5.45
Findutils-4.9.0
Gawk-5.3.0
Grep-3.11
Gzip-1.13
Make-4.4.1
Patch-2.7.6
Sed-4.9
Tar-1.35
Xz-5.4.6
Binutils-2.42 - Pass 2
GCC-13.2.0 - Pass 2
Entering Chroot and Building Additional Temporary Tools
Prerequisite
Gettext-0.22.4
Bison-3.8.2
Perl-5.38.2
Python-3.12.2
Texinfo-7.1
Util-linux-2.39.3
Cleaning up and Saving the Temporary System
Building the LFS System
Installing Basic System Software
[[Linux From Scratch 12.1#Prerequisite|Prerequisite]]
findmnt | grep $LFSPreparing Virtual Kernel File Systems
Entering the Chroot Environment
Man-pages-6.06
Iana-Etc-20240125
Glibc-2.39
Zlib-1.3.1
Bzip2-1.0.8
Xz-5.4.6
Zstd-1.5.5
File-5.45
Readline-8.2
M4-1.4.19
Bc-6.7.5
Flex-2.6.4
Tcl-8.6.13
Expect-5.45.4
DejaGNU-1.6.3
Pkgconf-2.1.1
Binutils-2.42
GMP-6.3.0
MPFR-4.2.1
MPC-1.3.1
Attr-2.5.2
Acl-2.3.2
Libcap-2.69
Libxcrypt-4.4.36
Shadow-4.14.5
GCC-13.2.0
Ncurses-6.4-20230520
Sed-4.9
Psmisc-23.6
Gettext-0.22.4
Bison-3.8.2
Grep-3.11
Bash-5.2.21
Libtool-2.4.7
GDBM-1.23
Gperf-3.1
Expat-2.6.0
Inetutils-2.5
Less-643
Perl-5.38.2
XML::Parser-2.47
Intltool-0.51.0
Autoconf-2.72
Automake-1.16.5
OpenSSL-3.2.1
Kmod-31
Libelf from Elfutils-0.190
Libffi-3.4.4
Python-3.12.2
Flit-Core-3.9.0
Wheel-0.42.0
Setuptools-69.1.0
Ninja-1.11.1
Meson-1.3.2
Coreutils-9.4
Check-0.15.2
Diffutils-3.10
Gawk-5.3.0
Findutils-4.9.0
Groff-1.23.0
GRUB-2.12
GRUB-2.12 for UEFI
Gzip-1.13
IPRoute2-6.7.0
Kbd-2.6.4
Libpipeline-1.5.7
Make-4.4.1
Patch-2.7.6
Tar-1.35
Texinfo-7.1
Vim-9.1.0041
MarkupSafe-2.1.5
Jinja2-3.1.3
Systemd-255
D-Bus-1.14.10
Man-DB-2.12.0
Procps-ng-4.0.4
Util-linux-2.39.3
E2fsprogs-1.47.0
Stripping
Cleaning Up
System Configuration
General Network Configuration
Managing Devices
Configuring the system clock
Configuring the Linux Locale
Configuring the System Locale
Creating the /etc/inputrc and /etc/shells File
Systemd Usage and Configuration
Making the LFS System Bootable
Creating the /etc/fstab File
Linux-6.7.4
Using GRUB to Set Up the Boot Process
Rescue(option)
Config
legacy boot
UEFI boot
The End
Appendices
...
Reference:
Last updated