Add 7.4 - enter chroot environment

This commit is contained in:
Aditya 2023-01-10 10:15:45 +05:30
parent bb6fa2ee69
commit 1b4481df6f
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#!/bin/bash
chroot "$LFS" /usr/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
/bin/bash --login

View file

@ -420,3 +420,15 @@ then
stop_script "chapter7/7.3-prepare-virtual-fs.sh"
fi
# Chapter 7.4
# ===========
echo "Entering the Chroot Environment"
su -c "bash $PWD/chapter7/7.4-enter-chroot.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter7/7.4-enter-chroot.sh"
fi