Updating to LFS 11.2

This commit is contained in:
Luís Mendes 2022-09-07 12:55:14 -03:00
parent b5c078a5c9
commit 893567d6e5
7 changed files with 364 additions and 385 deletions

View file

@ -1,8 +1,8 @@
#!/bin/bash
# LFS 11.0 Build Script
# LFS 11.2 Build Script
# Final steps to configure the system
# by Luís Mendes :)
# 13/Sep/2021
# 07/Sep/2022
package_name=""
package_ext=""
@ -11,14 +11,14 @@ begin() {
package_name=$1
package_ext=$2
echo "[lfs-scripts] Starting build of $package_name at $(date)"
echo "[lfs-final] Starting build of $package_name at $(date)"
tar xf $package_name.$package_ext
cd $package_name
}
finish() {
echo "[lfs-scripts] Finishing build of $package_name at $(date)"
echo "[lfs-final] Finishing build of $package_name at $(date)"
cd /sources
rm -rf $package_name
@ -26,11 +26,8 @@ finish() {
cd /sources
find /usr/lib /usr/libexec -name \*.la -delete
find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf
# 9.2. LFS-Bootscripts-20210608
begin lfs-bootscripts-20210608 tar.xz
# 9.2. LFS-Bootscripts-20220723
begin lfs-bootscripts-20220723 tar.xz
make install
finish
@ -200,17 +197,17 @@ EOF
cd /sources
# 10.3. Linux-5.13.12
begin linux-5.13.12 tar.xz
# 10.3. Linux-5.19.2
begin linux-5.19.2 tar.xz
make mrproper
make defconfig
make
make modules_install
cp -iv arch/x86/boot/bzImage /boot/vmlinuz-5.13.12-lfs-11.0
cp -iv System.map /boot/System.map-5.13.12
cp -iv .config /boot/config-5.13.12
install -d /usr/share/doc/linux-5.13.12
cp -r Documentation/* /usr/share/doc/linux-5.13.12
cp -iv arch/x86/boot/bzImage /boot/vmlinuz-5.19.2-lfs-11.2
cp -iv System.map /boot/System.map-5.19.2
cp -iv .config /boot/config-5.19.2
install -d /usr/share/doc/linux-5.19.2
cp -r Documentation/* /usr/share/doc/linux-5.19.2
finish
# 10.3.2. Configuring Linux Module Load Order
@ -230,27 +227,29 @@ cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext2
set root=(hd0,1)
menuentry "GNU/Linux, Linux 5.13.12-lfs-11.0" {
linux /boot/vmlinuz-5.13.12-lfs-11.0 root=/dev/sda1 ro
set root=(hd0,2)
menuentry "GNU/Linux, Linux 5.19.2-lfs-11.2" {
linux /boot/vmlinuz-5.19.2-lfs-11.2 root=/dev/sda2 ro
}
EOF
# 11.1. The End
echo 11.0 > /etc/lfs-release
echo 11.2 > /etc/lfs-release
cat > /etc/lsb-release << "EOF"
DISTRIB_ID="Linux From Scratch"
DISTRIB_RELEASE="11.0"
DISTRIB_RELEASE="11.2"
DISTRIB_CODENAME="Linux From Scratch"
DISTRIB_DESCRIPTION="Linux From Scratch"
EOF
cat > /etc/os-release << "EOF"
NAME="Linux From Scratch"
VERSION="11.0"
VERSION="11.2
ID=lfs
PRETTY_NAME="Linux From Scratch 11.0"
PRETTY_NAME="Linux From Scratch 11.2"
VERSION_CODENAME="Linux From Scratch"
EOF
echo "[lfs-scripts] The end"
echo "[lfs-final] The end"