seperate first time chroot and later chroot
This commit is contained in:
parent
630393b898
commit
31fd5ab659
|
@ -21,7 +21,6 @@ fi
|
||||||
echo "Entering now the chroot environment, continue with chapter 7 p1:"
|
echo "Entering now the chroot environment, continue with chapter 7 p1:"
|
||||||
echo "bash chap7p1.sh"
|
echo "bash chap7p1.sh"
|
||||||
|
|
||||||
|
|
||||||
chroot "$LFS" /usr/bin/env -i \
|
chroot "$LFS" /usr/bin/env -i \
|
||||||
HOME=/root \
|
HOME=/root \
|
||||||
TERM="$TERM" \
|
TERM="$TERM" \
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source vars.sh
|
||||||
|
|
||||||
|
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)
|
||||||
|
else
|
||||||
|
mount -t tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Entering now the chroot environment"
|
||||||
|
|
||||||
|
chroot "$LFS" /usr/bin/env -i \
|
||||||
|
HOME=/root \
|
||||||
|
TERM="$TERM" \
|
||||||
|
PS1='(lfs chroot) \u:\w\$ ' \
|
||||||
|
PATH=/usr/bin:/usr/sbin \
|
||||||
|
/bin/bash --login
|
Loading…
Reference in New Issue