This commit is contained in:
YellowJacketLinux 2024-10-05 19:03:27 -07:00
parent 27992b2bae
commit 085448d19c
3 changed files with 29 additions and 38 deletions

View File

@ -1,7 +1,6 @@
#!/bin/bash
LFS=/mnt/newlfs
#LFS=/home/mpeters/newlfs
function myfail {
echo "$1"
@ -13,25 +12,21 @@ if [ "`whoami`" != "root" ]; then
myfail "Must run this script as r00t"
fi
mkdir -pv ${LFS}/{etc,var} ${LFS}/usr/{bin,lib,sbin}
mkdir -p ${LFS}/{etc,var} ${LFS}/usr/{bin,lib,sbin}
for i in bin lib sbin; do
ln -sv usr/$i ${LFS}/$i
ln -s usr/$i ${LFS}/$i
done
case $(uname -m) in
x86_64) mkdir -pv ${LFS}/lib64 ;;
esac
mkdir -p ${LFS}/lib64
mkdir -pv ${LFS}/tools
mkdir -p ${LFS}/tools
groupadd lfs
useradd -s /bin/bash -g lfs -m -k /dev/null lfs
chown -v lfs ${LFS}/{usr{,/*},lib,var,etc,bin,sbin,tools}
case $(uname -m) in
x86_64) chown -v ${LFS}/lib64 ;;
esac
chown lfs ${LFS}/{usr{,/*},lib,var,etc,bin,sbin,tools}
chown lfs ${LFS}/lib64
echo "Please set a password for the lfs user account"
echo ""

View File

@ -33,8 +33,27 @@ else
sleep 3
fi
echo "Before executing Master2,"
echo "As root, issue following two commands:"
ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64
ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64/ld-lsb-x86-64.so.3
/bin/bash CH05.04-glibc.sh
if [ $? -ne 0 ]; then
echo "failed CH05.03-linux-api-headers.sh"
exit 1
else
echo "LFS Chapter 5 Glibc 2.40 complete"
sleep 3
fi
/bin/bash CH05.05-libstdc++.sh
if [ $? -ne 0 ]; then
echo "failed CH05.05-libstdc++.sh"
exit 1
else
echo "LFS Chapter 5 Libstdc++ from GCC 14.2.0 complete"
sleep 3
fi
echo "ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64"
echo "ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64/ld-lsb-x86-64.so.3"

View File

@ -1,23 +0,0 @@
#!/bin/bash
/bin/bash CH05.04-glibc.sh
if [ $? -ne 0 ]; then
echo "failed CH05.03-linux-api-headers.sh"
exit 1
else
echo "LFS Chapter 5 Glibc 2.40 complete"
sleep 3
fi
/bin/bash CH05.05-libstdc++.sh
if [ $? -ne 0 ]; then
echo "failed CH05.05-libstdc++.sh"
exit 1
else
echo "LFS Chapter 5 Libstdc++ from GCC 14.2.0 complete"
sleep 3
fi