Linux From Scratch (LFS) --- Step by Step with VirtualBox

(REV056b--27-Oct-2022)
Linux From Scratch (LFS) --- Step by Step with VirtualBox. This site is managed by VauLSMorg (vlsm.org) since 2020.
May the fork() be with you!

View on GitHub

HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT


LFS: Chapter 8 part 18 - 25

Virtual Box Guest LFS-08-18



Enter CHROOT

cd /sources/


Binutils-2.36.1

tar xfv binutils-2.36.1.tar.xz
cd binutils-2.36.1/

expect -c "spawn ls"

sed -i '/@\tincremental_copy/d' gold/testsuite/Makefile.in

mkdir -v build
cd       build

../configure --prefix=/usr       \
             --enable-gold       \
             --enable-ld=default \
             --enable-plugins    \
             --enable-shared     \
             --disable-werror    \
             --enable-64-bit-bfd \
             --with-system-zlib

make tooldir=/usr

make -k check

make tooldir=/usr install -j1

rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a

cd ../../
rm -rfv binutils-2.36.1/


GMP-6.2.1

tar vfx gmp-6.2.1.tar.xz
cd gmp-6.2.1/

./configure --prefix=/usr    \
            --enable-cxx     \
            --disable-static \
            --docdir=/usr/share/doc/gmp-6.2.1

make
make html

make check 2>&1 | tee gmp-check-log

awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log

make install
make install-html

cd ../
rm -rfv gmp-6.2.1/


MPFR-4.1.0

tar xvf mpfr-4.1.0.tar.xz
cd mpfr-4.1.0/

./configure --prefix=/usr        \
            --disable-static     \
            --enable-thread-safe \
            --docdir=/usr/share/doc/mpfr-4.1.0

make
make html

make check

make install
make install-html

cd ../
rm -rfv mpfr-4.1.0/


MPC-1.2.1

tar xvf mpc-1.2.1.tar.gz
cd mpc-1.2.1/

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/mpc-1.2.1

time make
time make html

make check

make install
make install-html

cd ../
rm -rfv mpc-1.2.1/


Attr-2.4.48

tar xfv attr-2.4.48.tar.gz
cd attr-2.4.48/

./configure --prefix=/usr     \
            --bindir=/bin     \
            --disable-static  \
            --sysconfdir=/etc \
            --docdir=/usr/share/doc/attr-2.4.48

time make

make check

make install

mv -v /usr/lib/libattr.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so

cd ../
rm -rfv attr-2.4.48/


Acl-2.2.53

tar xfv acl-2.2.53.tar.gz
cd acl-2.2.53/

./configure --prefix=/usr         \
            --bindir=/bin         \
            --disable-static      \
            --libexecdir=/usr/lib \
            --docdir=/usr/share/doc/acl-2.2.53

time make

make install

mv -v /usr/lib/libacl.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so

cd ../
rm -rfv acl-2.2.53/


Libcap-2.48

tar xfv libcap-2.48.tar.xz
cd libcap-2.48/

sed -i '/install -m.*STA/d' libcap/Makefile

make prefix=/usr lib=lib

make test

make prefix=/usr lib=lib install
for libname in cap psx; do
    mv -v /usr/lib/lib${libname}.so.* /lib
    ln -sfv ../../lib/lib${libname}.so.2 /usr/lib/lib${libname}.so
    chmod -v 755 /lib/lib${libname}.so.2.48
done

cd ../
rm -rfv libcap-2.48/


Shadow-4.8.1

tar xvf shadow-4.8.1.tar.xz
cd shadow-4.8.1/

sed -i 's/groups$(EXEEXT) //' src/Makefile.in
find man -name Makefile.in -exec sed -i 's/groups\.1 / /'   {} \;
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;

sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
    -e 's:/var/spool/mail:/var/mail:'                 \
    -i etc/login.defs

cat etc/useradd
sed -i 's/1000/999/' etc/useradd
cat etc/useradd

touch /usr/bin/passwd
./configure --sysconfdir=/etc \
            --with-group-name-max-length=32

time make

make install

pwconv

grpconv

sed -i 's/yes/no/' /etc/default/useradd

passwd root

cd ../
rm -rfv shadow-4.8.1/


Exit CHROOT

exit


Done

poweroff


ENDOFPAGE

HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT