HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
SP Week 02 Assignment #2: Linux From Scratch 11.3 Ch. 1-5
Preparation (IMPORTANT!)
- CHECK if your GitHub Account = UserName = GroupName = Hostname.
- Check the output of script “01-Version-Check.sh”.
Make sure, no errors!
This includes “version-check.sh” of
2.2. Host System Requirements.
- bash is the shell in use.
- sh is a symbolic link to bash.
- /usr/bin/awk is a symbolic link to gawk.
- /usr/bin/yacc is a symbolic link to bison or a small script that executes bison.
- Check if you need more SWAP SPACE
- Check if you need to SHRINK and CLEAN your virtual files.
Follow “The Linux From Scratch version 11.3 Book” chapter 1-5
- The Linux From Scratch version 11.3 Book
(mirror1)
(mirror2)
(mirror3)
- Source code mirrors: (source mirror1) (source mirror2) (source mirror3)
- See also previous version LFS 11.2:
- Kernotex’s YouTube LFS 11.2 PlayList
- Kernotex’s Host Linux configuration for LFS Chapter 2.2 - “Host System Requirements”
- The Kernotex’s Linux From Scratch (LFS) 11.2 Highlights Page (here)
Take Note: VirtualBox (+32 GB New Disk)
- “/mnt/lfs” does not exists.
- Disk $LFS (VirtualBox)
echo $LFS
mkdir -pv $LFS
mkfs -v -t ext4 /dev/sdb
mount -v -t ext4 /dev/sdb $LFS
- Append (edit) to /etc/fstab:
/dev/sdb /mnt/lfs ext4 defaults 1 1
Take Note: UTM (+32 GB New Disk)
- “/mnt/lfs” does not exists!
- Read chapter 2
- Your LFS disk is /dev/vdb
- Account root:
- Format and mount /dev/vdb
- Read chapter 2
- Disk $LFS (UTM)
echo $LFS
mkdir -pv $LFS
mkfs -v -t ext4 /dev/vdb
mount -v -t ext4 /dev/vdb $LFS
- Append (edit) to /etc/fstab:
/dev/vdb /mnt/lfs ext4 defaults 1 1
- SYMLINK
- For aarch64, create a symlink (root):
cd $LFS
ln -s lib lib64
- Chapter 5.5. Glibc-2.36
- If you are using AArch64 (Apple Silicon), the example in the book does not work. You have to “trick” the building process. It might be OK since you do not cross-compile it to another architecture.
- DO NOT FOLLOW THE COMPLETE CONFIGURATION OPTIONS in the book. Just do:
../configure \
--prefix=/usr
ALL: DO NOT SKIP
- 2.6. Setting The $LFS Variable
- 3.1. Introduction
- Make sure files “wget-list-sysv” and “md5sums” are in $LFS/sources/:
root:~# ls -al $LFS/sources/{md5sums,wget-list-sysv}
-rw-r--r-- 1 root root 4709 Nov 14 04:36 /mnt/lfs/sources/md5sums
-rw-r--r-- 1 root root 5392 Sep 1 02:43 /mnt/lfs/sources/wget-list-sysv
- Download locations may not always be accessible.
If unsuccessful, try:
(source mirror1) (source mirror2) (source mirror3) - Make sure when to use
- your own account (e.g. “cbkadal” but you are not cbkadal!)
- root account
- lfs account
- Check your “LFS” and “MAKEFLAGS” environment for all accounts (e.g. “cbkadal”, “root”, “lfs”).
echo "LFS=$LFS MAKEFLAGS=$MAKEFLAGS"
Binutils-2.40 - Pass 1: Standard Build Unit (SBU)
mkdir -v build
cd build
time { ../configure --prefix=$LFS/tools \
--with-sysroot=$LFS \
--target=$LFS_TGT \
--disable-nls \
--disable-werror && make && make install; }
Generate LFS Ch. 1-5 Report
- Last, after finishing chapter 5, run:
cd $HOME/myspwork/WEEK02/
bash 02-SP-WEEK02a.sh
Result/Report
cd $HOME/SP_RESULT/W02/
ls -al