Operating System Programming 4DISS

(REV358--31-Jan-2024)
Welcome to the Operating System Programming for DISS site. The following is a step-by-step guide to set up a Virtual Debian Guest on VirtualBox. This site has been managed by VauLSMorg since 2020.
This is the WAY!

View on GitHub

HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT

OS Week 09 Assignment #3: Linux From Scratch 12.0 Ch. 6-7


Preparation (IMPORTANT!)


Follow “The Linux From Scratch version 12.0 Book” chapter 6-7


Take Note!

echo "LFS=\"$LFS $(df $LFS|tail -1|awk '{print $1,int($2/1000000)"G"}')\" ARCH $(arch) NPROC=$(nproc) MAKEFLAGS=$MAKEFLAGS"


You might want to combine the commands in chapter 7.2-7.4

echo "= (1) ======================================"; sleep 1
echo "LFS=$LFS NPROC=$(nproc) MAKEFLAGS=$MAKEFLAGS"
echo "= (2) ======================================"; sleep 1
chown -Rv root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
case $(uname -m) in
  x86_64) chown -Rv root:root $LFS/lib64 ;;
esac
mkdir -pv $LFS/{dev,proc,sys,run}
echo "= (3) ======================================"; sleep 1
mount -v --bind /dev $LFS/dev
mount -v --bind /dev/pts $LFS/dev/pts
mount -vt  proc proc  $LFS/proc
mount -vt sysfs sysfs $LFS/sys
mount -vt tmpfs tmpfs $LFS/run
echo "= (4) ======================================"; sleep 1
if [ -h $LFS/dev/shm ]; then
  mkdir -pv $LFS/$(readlink $LFS/dev/shm)
else
  mount -t tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
fi
echo "= (5) ======================================"; sleep 1
df /
echo "= (6) ======================================"; sleep 1
chroot "$LFS" /usr/bin/env -i   \
    HOME=/root                  \
    TERM="$TERM"                \
    PS1='(lfs chroot) \u:\w\$ ' \
    PATH=/usr/bin:/usr/sbin     \
    MAKEFLAGS=-j$(nproc)        \
    /bin/bash --login


The FIRST TIME chroot RESULT

(lfs chroot) I have no name!:/#


Generate LFS Ch. 6-7 Report

AMD64(root)

mv -v $HOME/lfs-temp-tools-12.0.tar.xz /var/tmp/

ARM64(root)

mv -v $HOME/lfs-temp-tools-arm64-r12.0-99.tar.xz /var/tmp/lfs-temp-tools-12.0.tar.xz

AMD64(root) and ARM64(root)

du -s -h /var/tmp/lfs-temp-tools-12.0.tar.xz

(user)

cd $HOME/mywork/WEEK09/
bash 09-WEEK09.sh


Result/Report

cd $HOME/RESULT/W09/
ls -al



HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT