From 0acba146c608b5c6d5a7f54d2f680dad494e006e Mon Sep 17 00:00:00 2001 From: kevadesu Date: Wed, 29 Jan 2025 18:06:13 +0100 Subject: [PATCH] FINISHED IT ALL FINALLY --- Einrichter-CLI.sh | 21 +++++----- Einrichter-in-chroot.sh | 63 +++++++++++++++++++++++++++-- md5sums | 90 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+), 13 deletions(-) create mode 100644 md5sums diff --git a/Einrichter-CLI.sh b/Einrichter-CLI.sh index af998ce..03b6978 100755 --- a/Einrichter-CLI.sh +++ b/Einrichter-CLI.sh @@ -116,15 +116,14 @@ function einrichter.installer.pkgs() { echo -e "${BPurple}[1/6] Downloading package list..." wget https://www.linuxfromscratch.org/lfs/view/stable-systemd/wget-list-systemd --continue --directory-prefix=$LFS/sources echo -e "[2/6] Downloading checksum of packages" - wget https://www.linuxfromscratch.org/lfs/view/stable-systemd/md5sums --continue --directory-prefix=$LFS/sources + wget $SCRIPT_DIR/md5sums --continue --directory-prefix=$LFS/sources echo -e "[3/6] Download packages..." - wget --input-file=wget-list-systemd --continue --directory-prefix=$LFS/sources + wget --input-file=$SCRIPT_DIR/wget-list-systemd --continue --directory-prefix=$LFS/sources echo -e "[4/6] Verifying packages..." pushd $LFS/sources function einrichter.installer.pkgs.verify() { - md5sum -c $LFS/sources/md5sums || FAILURE_CODE=ec12737 + md5sum -c $LFS/sources/md5sums || einrichter.error PKG_VER_ERR } - einrichter.installer.pkgs.verify || einrichter.installer.fail popd echo -e "[5/6] Downloading patches..." mkdir $LFS/sources/patches @@ -271,14 +270,18 @@ function einrichter.installer.bg() { echo "E" } -function einrichter.installer.fail() { - case "$FAILURE_CODE" in - "ec12737") +function einrichter.error() { + echo -e "${BBlue}[i] ${Blue}The installer has encountered a critical error and needs to quit.${Color_Off}" + case "$@" in + "PKG_VER_ERR") echo -e "${BRed}[!] ${Red}The verification of the packages has failed. This could be an issue on either your side of the Installer's. Please report this error to the github.com/kevadesu/TylkoLinux repository.${Color_Off}" - ;; + ;; + "PKG_DWD_FAIL") + echo -e "${BRed}[!] ${Red}Downloading packages, patches and/or the package list . This could be an issue on either your side of the Installer's. Please report this error to the github.com/kevadesu/TylkoLinux repository.${Color_Off}" + ;; *) echo -e "${BRed}[!] ${Red}The installation failed due to an unknown error.${Color_Off}" - ;; + ;; esac } diff --git a/Einrichter-in-chroot.sh b/Einrichter-in-chroot.sh index 1ccc0d7..5c7433b 100755 --- a/Einrichter-in-chroot.sh +++ b/Einrichter-in-chroot.sh @@ -52,6 +52,7 @@ eic.config.create.inputrc - creates the simple but necessary /etc/inputrc file eic.config.create.shells - creates the simple but necessary /etc/shells file eic.config.systemd.disableScreenClearing - decide whether systemd should clear the screen at the end of the boot sequence or not eic.config.systemd.limitCoreDumpSize <(Number)(G/M/K/B) - limits core dump size to value specified as argument +eic.linux.install - the final boss: install the Linux kernel to the system. can take 0.4-32 SBUs (typically 2.5), MIGHT also be heavy eic.help - show this message " } @@ -146,7 +147,7 @@ EOF } function eic.essentials.install() { - pushd /sources/ + pushd /sources/ || eic.error D404_SRC tar -xvf gettext*xz mv gettext-0.22.5 gettext pushd gettext/ @@ -1752,7 +1753,7 @@ function eic.config.time.set() { } function eic.config.time.tz() { - timedatectl set-timezone $@ + timedatectl set-timezone "$@" } function eic.config.time.nts() { @@ -1777,7 +1778,7 @@ function eic.config.console.preset() { } function eic.config.console.keymap() { - echo "KEYMAP=$@" >> /etc/vconsole.conf + echo "KEYMAP=$*" >> /etc/vconsole.conf } function eic.config.locale.set() { @@ -1891,7 +1892,61 @@ function eic.config.systemd.limitCoreDumpSize() { mkdir -pv /etc/systemd/coredump.conf.d || echo "[i] Great, the directory already exists!" echo -e " [Coredump] -MaxUse=${@}" > /etc/systemd/coredump.conf.d/maxuse.conf +MaxUse=$*" > /etc/systemd/coredump.conf.d/maxuse.conf +} + +function eic.linux.install() { + pushd /sources/linux/ + read -p "[i] In this section, it is recommended to have the TylkoLinux build/installation guide open and ready. [ENTER]" + make mrproper + make menuconfig + make + make modules_install + mount /boot + cp -iv arch/x86/boot/bzImage /boot/vmlinuz-6.10.5-lfs-12.2-systemd + cp -iv System.map /boot/System.map-6.10.5 + cp -iv .config /boot/config-6.10.5 + cp -r Documentation -T /usr/share/doc/linux-6.10.5 + install -v -m755 -d /etc/modprobe.d + cat > /etc/modprobe.d/usb.conf << "EOF" +# Begin /etc/modprobe.d/usb.conf + +install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true +install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true + +# End /etc/modprobe.d/usb.conf +EOF + popd +} + +function eic.signoff() { + echo 12.2-systemd-tylux > /etc/lfs-release + cat > /etc/lsb-release << "EOF" +DISTRIB_ID="TylkoLinux" +DISTRIB_RELEASE="25.01" +DISTRIB_CODENAME="snyx" +DISTRIB_DESCRIPTION="TylkoLinux Snyx" +EOF + cat > /etc/os-release << "EOF" +NAME="TylkoLinux" +VERSION="25.01" +ID=tylux +PRETTY_NAME="TylkoLinux 25.01 Snyx (LFS 12.2-systemd)" +VERSION_CODENAME="snyx" +HOME_URL="https://github.com/kevadesu/TylkoLinux" +EOF +} + +function eic.error() { + echo "[i] The installer has encountered a critical error and needs to quit." + case "$@" in + D404_SRC) + echo "[!] Directory /sources/ does NOT exist!" + ;; + *) + echo "[!] We were unable to determine the error." + ;; + esac } main diff --git a/md5sums b/md5sums new file mode 100644 index 0000000..505b979 --- /dev/null +++ b/md5sums @@ -0,0 +1,90 @@ +590765dee95907dbc3c856f7255bd669 acl-2.3.2.tar.xz +227043ec2f6ca03c0948df5517f9c927 attr-2.5.2.tar.gz +1be79f7106ab6767f18391c5e22be701 autoconf-2.72.tar.xz +7ab3a02318fee6f5bd42adfc369abf10 automake-1.17.tar.xz +f204835b2e06c06e37b5ad776ff907f4 bash-5.2.32.tar.gz +a47aa5e4e7395fbcd159a9228613b97b bc-6.7.6.tar.xz +9202d02925c30969d1917e4bad5a2320 binutils-2.43.1.tar.xz +c28f119f405a2304ff0a7ccdcc629713 bison-3.8.2.tar.xz +67e051268d0c475ea773822f7500d0e5 bzip2-1.0.8.tar.gz +50fcafcecde5a380415b12e9c574e0b2 check-0.15.2.tar.gz +e99adfa059a63db3503cc71f3d151e31 coreutils-9.5.tar.xz +46070a3487817ff690981f8cd2ba9376 dbus-1.14.10.tar.xz +68c5208c58236eba447d7d6d1326b821 dejagnu-1.6.3.tar.gz +2745c50f6f4e395e7b7d52f902d075bf diffutils-3.10.tar.xz +75e6d1353cbe6d5728a98fb0267206cb e2fsprogs-1.47.1.tar.gz +636547248fb3fae58ec48030298d3ef7 elfutils-0.191.tar.bz2 +0cb75c8feb842c0794ba89666b762a2d expat-2.6.2.tar.xz +00fce8de158422f5ccd2666512329bd2 expect5.45.4.tar.gz +26b2a96d4e3a8938827a1e572afd527a file-5.45.tar.gz +870cfd71c07d37ebe56f9f4aaf4ad872 findutils-4.10.0.tar.xz +2882e3179748cc9f9c23ec593d6adc8d flex-2.6.4.tar.gz +3bc52f1952b9a78361114147da63c35b flit_core-3.9.0.tar.gz +97c5a7d83f91a7e1b2035ebbe6ac7abd gawk-5.3.0.tar.xz +2268420ba02dc01821960e274711bde0 gcc-14.2.0.tar.xz +c780815649e52317be48331c1773e987 gdbm-1.24.tar.gz +3ae5580599d84be93e6213930facb2db gettext-0.22.5.tar.xz +b390feef233022114950317f10c4fa97 glibc-2.40.tar.xz +956dc04e864001a9c22429f761f2c283 gmp-6.3.0.tar.xz +9e251c0a618ad0824b51117d5d9db87e gperf-3.1.tar.gz +7c9bbd74492131245f7cdb291fa142c0 grep-3.11.tar.xz +5e4f40315a22bb8a158748e7d5094c7d groff-1.23.0.tar.gz +60c564b1bdc39d8e43b3aab4bc0fb140 grub-2.12.tar.xz +d5c9fc9441288817a4a0be2da0249e29 gzip-1.13.tar.xz +ea3c37c00d22f1159fc3b7d988de8476 iana-etc-20240806.tar.gz +9e5a6dfd2d794dc056a770e8ad4a9263 inetutils-2.5.tar.xz +12e517cac2b57a0121cda351570f1e63 intltool-0.51.0.tar.gz +6282e47de9c5b230e83537fba7181c9c iproute2-6.10.0.tar.xz +02ca9a6364c92e83d14b037bef4732bc jinja2-3.1.4.tar.gz +e2fd7adccf6b1e98eb1ae8d5a1ce5762 kbd-2.6.4.tar.xz +c451c4aa61521adbe8af147f498046f8 kmod-33.tar.xz +44f54b6313c5d71fa1ac224d8d84766a less-661.tar.gz +df0e20c6eeca849347b87d5d6a8870c0 libcap-2.70.tar.xz +b9cac6c5997dca2b3787a59ede34e0eb libffi-3.4.6.tar.gz +1a48b5771b9f6c790fb4efdb1ac71342 libpipeline-1.5.7.tar.gz +2fc0b6ddcd66a89ed6e45db28fa44232 libtool-2.4.7.tar.xz +b84cd4104e08c975063ec6c4d0372446 libxcrypt-4.4.36.tar.xz +276ef1f11ed3713ec5d6f506ff55ac12 linux-6.10.5.tar.xz +dead9f5f1966d9ae56e1e32761e4e675 lz4-1.10.0.tar.gz +0d90823e1426f1da2fd872df0311298d m4-1.4.19.tar.xz +c8469a3713cbbe04d955d4ae4be23eeb make-4.4.1.tar.gz +7b044e5020aab89db41ac7ee59d6d84a man-db-2.12.1.tar.xz +4d56775b6cce4edf1e496249e7c01c1a man-pages-6.9.1.tar.xz +8fe7227653f2fb9b1ffe7f9f2058998a MarkupSafe-2.1.5.tar.gz +c4f2b3e5ea632685f61ba1b833c4905c meson-1.5.1.tar.gz +5c9bc658c9fd0f940e8e3e0f09530c62 mpc-1.3.1.tar.gz +523c50c6318dde6f9dc523bc0244690a mpfr-4.2.1.tar.xz +ac2d2629296f04c8537ca706b6977687 ncurses-6.5.tar.gz +6288992b05e593a391599692e2f7e490 ninja-1.12.1.tar.gz +8a4342b399c18f870ca6186299195984 openssl-3.3.1.tar.gz +78ad9937e4caadcba1526ef1853730d5 patch-2.7.6.tar.xz +cfe14ef0709b9687f9c514042e8e1e82 perl-5.40.0.tar.xz +833363e77b5bed0131c7bc4cc6f7747b pkgconf-2.3.0.tar.xz +2f747fc7df8ccf402d03e375c565cf96 procps-ng-4.0.4.tar.xz +53eae841735189a896d614cba440eb10 psmisc-23.7.tar.xz +02c7d269e077f4034963bba6befdc715 Python-3.12.5.tar.xz +52274d813236ca4a972fb6988480dc56 python-3.12.5-docs-html.tar.bz2 +05080bf3801e6874bb115cd6700b708f readline-8.2.13.tar.gz +6aac9b2dbafcd5b7a67a8a9bcb8036c3 sed-4.9.tar.xz +2e0ffd0f6fc632a11442b79d9b1c68bd setuptools-72.2.0.tar.gz +eb70bad3316d08f0d3bb3d4bbeccb3b4 shadow-4.16.0.tar.xz +03bd1ff158ec0bc55428c77a8f8495bd systemd-256.4.tar.gz +8dbcf0ff0d8e5e9d3565f9d2fc153310 systemd-man-pages-256.4.tar.xz +a2d8042658cfd8ea939e6d911eaf4152 tar-1.35.tar.xz +c30b57c6051be28fa928d09aca82841e tcl8.6.14-src.tar.gz +5467198f8d57c54835bf80b98ffb0170 tcl8.6.14-html.tar.gz +edd9928b4a3f82674bcc3551616eef3b texinfo-7.1.tar.xz +2349edd8335245525cc082f2755d5bf4 tzdata2024a.tar.gz +88faefc8fefced097e58142077a3d14e util-linux-2.40.2.tar.xz +c512a99b3704f193be1a181cc644b2b2 vim-9.1.0660.tar.gz +440ff4fe51579b7ed16f02af8f8d9494 wheel-0.44.0.tar.gz +89a8e82cfd2ad948b349c0a69c494463 XML-Parser-2.47.tar.gz +bbf73fb28425cebb854328599f85c4cf xz-5.6.2.tar.xz +9855b6d802d7fe5b7bd5b196a2271655 zlib-1.3.1.tar.gz +5a473726b3445d0e5d6296afd1ab6854 zstd-1.5.6.tar.gz +6a5ac7e89b791aae556de0f745916f7f bzip2-1.0.8-install_docs-1.patch +58961caf5bbdb02462591fa506c73b6d coreutils-9.5-i18n-2.patch +0b8b5ac411d011263ad40b0664c669f0 expect-5.45.4-gcc14-1.patch +9a5997c3452909b1769918c759eff8a2 glibc-2.40-fhs-1.patch +f75cca16a38da6caa7d52151f7136895 kbd-2.6.4-backspace-1.patch +9eb581845590ad70ba89c04509c7a386 nano-8.1.tar.xz