Add 7.3 - prepare virtual kernel filesystems

This commit is contained in:
Aditya 2023-01-09 15:53:14 +05:30
parent c88a2e072b
commit bb6fa2ee69
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#!/bin/bash
mkdir -pv $LFS/{dev,proc,sys,run}
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
if [ -h $LFS/dev/shm ]; then
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
fi

View file

@ -401,3 +401,22 @@ echo "Chapter 7"
echo "Changing ownership to root"
su -c "bash $PWD/chapter7/7.2-changing-ownership.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter7/7.2-changing-ownership.sh"
fi
# Chapter 7.3
# ===========
echo "Preparing virtual kernel filesystems"
su -c "bash $PWD/chapter7/7.3-prepare-virtual-fs.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter7/7.3-prepare-virtual-fs.sh"
fi