HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
OS Week 08 Assignment #3: Linux From Scratch 12.0 Ch. 1-5
Preparation (IMPORTANT!)
- Cross-check/revisit here.
- If you need more SWAP SPACE, see here.
- If you neet to SHRINK and CLEAN your virtual file system, see here.
Follow “The Linux From Scratch version 12.0 Book” chapter 1-5
- VirtualBox (AMD64)
- UTM/M1 (ARM64/AARCH64)
- The Linux From Scratch ARM64/AARCH64 Book
- COMPARE
LFS ARM64/AARCH64 is not an official version (KW) and changes frequently. Therefore, it is recommended to use a package similar to the official version of LFS 12.0 (ORI). Because of this, the instructions for the KW version packages often differ from those for the ORI. Since it uses the ORI package, it must sometimes be compiled using the ORI method. Please be careful, especially when working on chapter 8 and explicitly compiling GCC (chapter 8.27).
- Source Code Mirrors: (source mirror1) (source mirror2) (source mirror3)
- Kernotex’s YouTube LFS 12.0 PlayList
Take Note: SKIP Ch 2.4, 2.5, 2.7
Because “/mnt/lfs/” already exists!
- Chapter 2.4. Creating a New Partition
- Chapter 2.5. Creating a File System on the Partition
- Chapter 2.7. Mounting the New Partition
Take Note: DO NOT SKIP Ch 2.6, 3.1 (ROOT)
These are ALL SCRIPTS of chapter 3.1. Make sure no ERRORS!
- See also os1:///home/zzyLFS/
if [[ "$(id -u)" == "0" ]] ; then
echo "============================================"
echo "LFS should be /mnt/lfs AND MAKEFLAGS = cores"
echo "LFS=$LFS MAKEFLAGS=$MAKEFLAGS"
echo "============================================"
sleep 3
mkdir -pv $LFS/sources/
chmod -v a+wt $LFS/sources/
cd $LFS/sources/
wget -c https://www.linuxfromscratch.org/lfs/view/12.0/wget-list-sysv --directory-prefix=$LFS/sources
wget -c --input-file=$LFS/sources/wget-list-sysv --directory-prefix=$LFS/sources
wget -c https://www.linuxfromscratch.org/lfs/view/12.0/md5sums --directory-prefix=$LFS/sources
md5sum -c md5sums
chown root:root $LFS/sources/*
else
echo "=== === === === ERROR: ROOT ONLY === === === ERROR ==="
echo "=== === === === ERROR: ROOT ONLY === === === ERROR ==="
echo "=== === === === ERROR: ROOT ONLY === === === ERROR ==="
fi
ℼ
Make sure files “wget-list-sysv” and “md5sums” are in $LFS/sources/
ls -al $LFS/sources/{md5sums,wget-list-sysv}
# -rw-r--r-- 1 root root 5130 Sep 1 23:00 /mnt/lfs/sources/md5sums
# -rw-r--r-- 1 root root 5932 Sep 1 23:00 /mnt/lfs/sources/wget-list-sysv
- Download locations may not always be accessible.
If unsuccessful, try:
(source mirror1) (source mirror2) (source mirror3)- See also os1:///home/zzyLFS/
- Make sure you have three accounts:
- your own account (e.g. cbkadal but you are not cbkadal!)
- root account
- lfs account
- Make sure when to use:
- your own account (e.g. “cbkadal”)
- root account
- lfs account
- Check your “LFS”, “ARCH”, “NPROC”, and “MAKEFLAGS” environment for all accounts (e.g. “cbkadal”, “root”, “lfs”).
echo "LFS=\"$LFS $(df $LFS|tail -1|awk '{print $1,int($2/1000000)"G"}')\" ARCH $(arch) NPROC=$(nproc) MAKEFLAGS=$MAKEFLAGS"
Binutils-2.41 - Pass 1: Standard Build Unit (SBU)
Chapter 5.2.1. Installation of Cross Binutils (lfs)
mkdir -v build
cd build
time { ../configure --prefix=$LFS/tools \
--with-sysroot=$LFS \
--target=$LFS_TGT \
--disable-nls \
--enable-gprofng=no \
--disable-werror && make && make install; }
Generate LFS Chapters 1-5 Report
Last, after finishing chapter 5, run (cbkadal):
cd $HOME/mywork/WEEK08/
bash 08-WEEK08.sh
Result/Report
(cbkadal):
cd $HOME/RESULT/W08/
ls -al