From 98c04191f1677b434252e931df69c43a1fe76ab0 Mon Sep 17 00:00:00 2001 From: jaromaz Date: Mon, 24 Jan 2022 11:01:19 +0100 Subject: [PATCH 01/11] Logrotate fix and Kernel 5.16.2 --- yosild.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/yosild.sh b/yosild.sh index 25aa748..632cee0 100755 --- a/yosild.sh +++ b/yosild.sh @@ -1,7 +1,8 @@ #!/bin/sh +# logrotate fix # --------------------------------------- -# Yosild 3.1.5 - Your simple Linux distro +# Yosild 3.1.6 - Your simple Linux distro # (c) Jaromaz https://jm.iq.pl # Yosild is licensed under # GNU General Public License v3.0 @@ -11,10 +12,10 @@ device="sdc" distro_name="Yosild" distro_desc="Your simple Linux distro" -distro_version="3.1.5" +distro_version="3.1.6" distro_codename="chinchilla" telnetd="true" -kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.1.tar.xz" +kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.2.tar.xz" busybox="https://busybox.net/downloads/busybox-1.34.1.tar.bz2" # --------------------------------------- @@ -172,9 +173,11 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin export PS1="\\e[0;32m\\u@\\h:\\w\\\$ \\e[m" [ \$(id -u) -eq 0 ] && export PS1="\\u@\\h:\\w# " alias vim=vi -alias su="su -l" -alias exit="clear;exit" -alias logout="clear;logout" +alias l.='ls -d .*' +alias ll='ls -Al' +alias su='su -l' +alias exit='clear;exit' +alias logout='clear;logout' alias locate=which alias whereis=which alias logout=exit @@ -316,11 +319,11 @@ cat << EOF > var/spool/cron/crontabs/root EOF # logrotate -cat << EOF > etc/cron/daily/logrotate +cat << EOF > usr/sbin/logrotate #!/bin/sh maxsize=512 dir=/var/log -for log in messages lastlog; do +for log in \$(ls -1 \${dir} | grep -Ev '\.gz$'); do size=\$(du "\$dir/\$log" | tr -s '\t' ' ' | cut -d' ' -f1) if [ "\$size" -gt "\$maxsize" ] ; then tsp=\$(date +%s) @@ -330,6 +333,7 @@ for log in messages lastlog; do fi done EOF +ln usr/sbin/logrotate etc/cron/daily/logrotate # init scripts installer cat << EOF > usr/bin/add-rc.d @@ -437,4 +441,3 @@ rm -r rootfs umount /mnt printf "\n** all done **\n\n" - From 8a58f26b62ab352ac10ae5897b863bc0f53c2dd1 Mon Sep 17 00:00:00 2001 From: jaromaz Date: Mon, 24 Jan 2022 11:02:33 +0100 Subject: [PATCH 02/11] Kernel 5.16.2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71d1388..2b4684a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Yosild - Your simple Linux distro Yosild is a single shell script that builds a full, minimal Linux distribution, -based on BusyBox. It compiles the **latest stable kernel** (5.16.1) and the +based on BusyBox. It compiles the **latest stable kernel** (5.16.2) and the **latest stable version of the BusyBox** (1.34.1). This script can prepare minimalistic Linux system for devices with little hardware resources. Yosild Linux needs just **64 MB RAM** and **36 MB storage size**. *yosild.sh* requires From 89c103ba70e51126625e1be3278d6940485ff698 Mon Sep 17 00:00:00 2001 From: jaromaz Date: Mon, 24 Jan 2022 12:04:06 +0100 Subject: [PATCH 03/11] Logrotate fix --- yosild.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/yosild.sh b/yosild.sh index 632cee0..b908b7a 100755 --- a/yosild.sh +++ b/yosild.sh @@ -1,6 +1,4 @@ #!/bin/sh -# logrotate fix - # --------------------------------------- # Yosild 3.1.6 - Your simple Linux distro # (c) Jaromaz https://jm.iq.pl @@ -176,11 +174,11 @@ alias vim=vi alias l.='ls -d .*' alias ll='ls -Al' alias su='su -l' +alias logout='clear;exit' alias exit='clear;exit' -alias logout='clear;logout' alias locate=which alias whereis=which -alias logout=exit +alias useradd=adduser EOF # banner @@ -333,7 +331,7 @@ for log in \$(ls -1 \${dir} | grep -Ev '\.gz$'); do fi done EOF -ln usr/sbin/logrotate etc/cron/daily/logrotate +ln -s ../../../usr/sbin/logrotate etc/cron/daily/logrotate # init scripts installer cat << EOF > usr/bin/add-rc.d @@ -428,7 +426,7 @@ chmod 664 var/log/lastlog var/log/wtmp chmod 4755 bin/busybox chmod 600 var/spool/cron/crontabs/root chmod 755 usr/sbin/nologin sbin/disban init sbin/man etc/init.d/rcS\ - etc/cron/daily/logrotate usr/bin/add-rc.d sbin/halt\ + usr/sbin/logrotate usr/bin/add-rc.d sbin/halt\ usr/share/udhcpc/default.script chmod 644 etc/passwd etc/group etc/hostname etc/shells etc/hosts etc/fstab\ etc/issue etc/motd etc/network/interfaces etc/profile From 06623f99dae7e9e45661fd80e7d37004dfa077d0 Mon Sep 17 00:00:00 2001 From: jaromaz Date: Sat, 12 Mar 2022 01:46:25 -0500 Subject: [PATCH 04/11] Hyper-V support --- README.md | 12 ++++++------ yosild.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 2b4684a..74cae6f 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ # Yosild - Your simple Linux distro Yosild is a single shell script that builds a full, minimal Linux distribution, -based on BusyBox. It compiles the **latest stable kernel** (5.16.2) and the +based on BusyBox. It compiles the **latest stable kernel** (5.16.14) and the **latest stable version of the BusyBox** (1.34.1). This script can prepare minimalistic Linux system for devices with little hardware resources. Yosild Linux -needs just **64 MB RAM** and **36 MB storage size**. *yosild.sh* requires +needs just **70 MB RAM** and **40 MB storage size**. *yosild.sh* requires [minimal][1] *Debian* or *Ubuntu* distro to run with the architecture compatible with the target device. -The script works with VirtualBox or KVM/QEMU (all drive types except VirtIO) - you -can create an additional virtual hard drive and install Yosild Linux on it, and -then connect this virtual disk to a new virtual machine - just like in my -[YouTube video][3]: +The script works with VirtualBox, KVM/QEMU (all drive types except VirtIO) and +Hyper-V - you can create an additional virtual hard drive and install Yosild Linux +on it, and then connect this virtual disk to a new virtual machine - just like in +my [YouTube video][3]:

Yosild creates probably the simplest, complete version of Linux, which makes it diff --git a/yosild.sh b/yosild.sh index b908b7a..903b975 100755 --- a/yosild.sh +++ b/yosild.sh @@ -1,19 +1,20 @@ #!/bin/sh # --------------------------------------- -# Yosild 3.1.6 - Your simple Linux distro +# Yosild - Your simple Linux distro + version="3.2.1" # (c) Jaromaz https://jm.iq.pl # Yosild is licensed under # GNU General Public License v3.0 # --------------------------------------- # ----- Config -------------------------- -device="sdc" +device="sda" distro_name="Yosild" distro_desc="Your simple Linux distro" -distro_version="3.1.6" distro_codename="chinchilla" -telnetd="true" -kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.2.tar.xz" +telnetd_enabled="true" +hyperv_support="true" +kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.14.tar.xz" busybox="https://busybox.net/downloads/busybox-1.34.1.tar.bz2" # --------------------------------------- @@ -97,12 +98,31 @@ if [ $answer != "y" ] ; then rm linux-*.tar.xz mv linux* linux cd linux - make defconfig - # Linux Kernel configuration ----- - sed "s/Debian/$distro_name/" -i .config - # -------------------------------- +# Linux Kernel configuration ------------------------------- +if [ "$hyperv_support" == "true" ]; then +cat <> arch/x86/configs/x86_64_defconfig +CONFIG_HYPERVISOR_GUEST=y +CONFIG_PARAVIRT=y +CONFIG_PARAVIRT_SPINLOCKS=y +CONFIG_CONNECTOR=y +CONFIG_SCSI_FC_ATTRS=y +CONFIG_HYPERV=y +CONFIG_HYPERV_UTILS=y +CONFIG_HYPERV_BALLOON=y +CONFIG_HYPERV_STORAGE=y +CONFIG_HYPERV_NET=y +#CONFIG_HYPERV_KEYBOARD=y +#CONFIG_FB_HYPERV=y +#CONFIG_HID_HYPERV_MOUSE=y +#CONFIG_PCI_HYPERV=y +#CONFIG_VSOCKETS=y +#CONFIG_HYPERV_VSOCKETS=y +EOF +fi +# ---------------------------------------------------------- + make defconfig make cd ../../ fi @@ -157,7 +177,7 @@ cat << EOF > var/www/html/index.html $distro_name httpd default page: It works

It works!


-

$distro_name httpd default page
ver. $distro_version

+

$distro_name httpd default page
ver. $version

EOF # fstab @@ -182,7 +202,7 @@ alias useradd=adduser EOF # banner -printf "\n\e[96m${*}$distro_name\e[0m${*} Linux \e[97m${*}$distro_version\e[0m${*} - $distro_desc\n\n" | tee -a etc/issue usr/share/infoban >/dev/null +printf "\n\e[96m${*}$distro_name\e[0m${*} Linux \e[97m${*}$version\e[0m${*} - $distro_desc\n\n" | tee -a etc/issue usr/share/infoban >/dev/null cat << EOF >> etc/issue * Default root password: Yosild * Networking: ifupdown @@ -204,8 +224,8 @@ EOF cat << EOF > etc/os-release PRETTY_NAME="$distro_name - $distro_desc ($distro_codename)" NAME="$distro_name" -VERSION_ID="$distro_version" -VERSION="$distro_version" +VERSION_ID="$version" +VERSION="$version" VERSION_CODENAME="$distro_codename" ID="$distro_name" HOME_URL="https://github.com/jaromaz/yosild" @@ -383,7 +403,7 @@ PIDFILE=/var/run/$1.pid init \$@ EOF chmod 744 etc/init.d/$1 -[ $1 = 'telnetd' ] && [ "$telnetd" = false ] && continue; +[ $1 = 'telnetd' ] && [ "$telnetd_enabled" = false ] && continue; [ "$3" ] && ln -s ../init.d/$1 etc/rc.d/$3$1.sh done @@ -439,3 +459,4 @@ rm -r rootfs umount /mnt printf "\n** all done **\n\n" + From 04b8cff4183214dbbc4e4be71ab6f37b5fca8187 Mon Sep 17 00:00:00 2001 From: jaromaz Date: Sat, 12 Mar 2022 13:10:52 +0000 Subject: [PATCH 05/11] Hyper-V support --- README.md | 15 +++++++-------- yosild.sh | 17 +++-------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 74cae6f..4599415 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,18 @@ needs just **70 MB RAM** and **40 MB storage size**. *yosild.sh* requires [minimal][1] *Debian* or *Ubuntu* distro to run with the architecture compatible with the target device. -The script works with VirtualBox, KVM/QEMU (all drive types except VirtIO) and -Hyper-V - you can create an additional virtual hard drive and install Yosild Linux +The script works with VirtualBox, Hyper-V and KVM/QEMU (all drive types except +VirtIO) - you can create an additional virtual hard drive and install Yosild Linux on it, and then connect this virtual disk to a new virtual machine - just like in my [YouTube video][3]:

Yosild creates probably the simplest, complete version of Linux, which makes it -easier to understand, how to build the system from scratch. It is much easier to -build than other, previously available solutions: Aboriginal, mkroot, Buildroot or -Linux From Scratch - just specify the target drive (virtual or flash drive) inside -the *yosild.sh* script and simply run the script. You can also rename the system -to make it your distribution. - +easier to understand, how to build the system from scratch and how to use it. +Yosild is much easier to build than other, previously available solutions: +Aboriginal, mkroot, Buildroot or Linux From Scratch. Just specify the target +drive (virtual or flash drive) inside the *yosild.sh* script and simply run the +script. You can also rename the system to make it your distribution. **Yosild**: diff --git a/yosild.sh b/yosild.sh index 903b975..8628404 100755 --- a/yosild.sh +++ b/yosild.sh @@ -1,7 +1,7 @@ #!/bin/sh # --------------------------------------- # Yosild - Your simple Linux distro - version="3.2.1" + version="3.2.1.B2" # (c) Jaromaz https://jm.iq.pl # Yosild is licensed under # GNU General Public License v3.0 @@ -99,25 +99,14 @@ if [ $answer != "y" ] ; then mv linux* linux cd linux -# Linux Kernel configuration ------------------------------- -if [ "$hyperv_support" == "true" ]; then +# Linux Kernel config -------------------------------------- +if [ "$hyperv_support" = "true" ]; then cat <> arch/x86/configs/x86_64_defconfig CONFIG_HYPERVISOR_GUEST=y CONFIG_PARAVIRT=y -CONFIG_PARAVIRT_SPINLOCKS=y CONFIG_CONNECTOR=y -CONFIG_SCSI_FC_ATTRS=y CONFIG_HYPERV=y -CONFIG_HYPERV_UTILS=y -CONFIG_HYPERV_BALLOON=y -CONFIG_HYPERV_STORAGE=y CONFIG_HYPERV_NET=y -#CONFIG_HYPERV_KEYBOARD=y -#CONFIG_FB_HYPERV=y -#CONFIG_HID_HYPERV_MOUSE=y -#CONFIG_PCI_HYPERV=y -#CONFIG_VSOCKETS=y -#CONFIG_HYPERV_VSOCKETS=y EOF fi # ---------------------------------------------------------- From 6a5d3f0e49f99dcb1e211a46e6d7fe06fe1e2161 Mon Sep 17 00:00:00 2001 From: jaromaz Date: Sat, 12 Mar 2022 19:55:37 +0000 Subject: [PATCH 06/11] Hyper-V support --- yosild.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/yosild.sh b/yosild.sh index 8628404..5147092 100755 --- a/yosild.sh +++ b/yosild.sh @@ -1,19 +1,19 @@ #!/bin/sh # --------------------------------------- # Yosild - Your simple Linux distro - version="3.2.1.B2" + version="3.2.1" # (c) Jaromaz https://jm.iq.pl # Yosild is licensed under # GNU General Public License v3.0 # --------------------------------------- # ----- Config -------------------------- -device="sda" +device="sdc" distro_name="Yosild" distro_desc="Your simple Linux distro" distro_codename="chinchilla" telnetd_enabled="true" -hyperv_support="true" +hyperv_support="false" kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.14.tar.xz" busybox="https://busybox.net/downloads/busybox-1.34.1.tar.bz2" # --------------------------------------- @@ -56,11 +56,11 @@ if [ $answer != "y" ] ; then cd busybox make defconfig - # BusyBox configuration ------ + # BusyBox configuration -------------------------------- sed 's/^.*CONFIG_STATIC.*$/CONFIG_STATIC=y/' -i .config sed 's/^CONFIG_MAN=y/CONFIG_MAN=n/' -i .config echo "CONFIG_STATIC_LIBGCC=y" >> .config - + # ------------------------------------------------------ make cd ../../ fi @@ -99,6 +99,7 @@ if [ $answer != "y" ] ; then mv linux* linux cd linux + # Linux Kernel config -------------------------------------- if [ "$hyperv_support" = "true" ]; then cat <> arch/x86/configs/x86_64_defconfig From 46697e261761e5a34c8f86b787e2c227323617fa Mon Sep 17 00:00:00 2001 From: jaromaz Date: Tue, 12 Apr 2022 19:45:39 +0000 Subject: [PATCH 07/11] Kernel 5.16.19 --- README.md | 2 +- yosild.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4599415..add8747 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Yosild - Your simple Linux distro Yosild is a single shell script that builds a full, minimal Linux distribution, -based on BusyBox. It compiles the **latest stable kernel** (5.16.14) and the +based on BusyBox. It compiles the **latest stable kernel** (5.16.19) and the **latest stable version of the BusyBox** (1.34.1). This script can prepare minimalistic Linux system for devices with little hardware resources. Yosild Linux needs just **70 MB RAM** and **40 MB storage size**. *yosild.sh* requires diff --git a/yosild.sh b/yosild.sh index 5147092..402c1b2 100755 --- a/yosild.sh +++ b/yosild.sh @@ -8,13 +8,13 @@ # --------------------------------------- # ----- Config -------------------------- -device="sdc" +device="sda" distro_name="Yosild" distro_desc="Your simple Linux distro" distro_codename="chinchilla" telnetd_enabled="true" -hyperv_support="false" -kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.14.tar.xz" +hyperv_support="true" +kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.19.tar.xz" busybox="https://busybox.net/downloads/busybox-1.34.1.tar.bz2" # --------------------------------------- From 00d0ecdf79e2c52007230888ba37ae9f40623945 Mon Sep 17 00:00:00 2001 From: jaromaz Date: Tue, 12 Apr 2022 19:46:39 +0000 Subject: [PATCH 08/11] Hyper-V support --- yosild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yosild.sh b/yosild.sh index 402c1b2..bea4572 100755 --- a/yosild.sh +++ b/yosild.sh @@ -8,12 +8,12 @@ # --------------------------------------- # ----- Config -------------------------- -device="sda" +device="sdc" distro_name="Yosild" distro_desc="Your simple Linux distro" distro_codename="chinchilla" telnetd_enabled="true" -hyperv_support="true" +hyperv_support="false" kernel="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.19.tar.xz" busybox="https://busybox.net/downloads/busybox-1.34.1.tar.bz2" # --------------------------------------- From b990ccb907595ff1135c43bb3e9c548af5ce8c0d Mon Sep 17 00:00:00 2001 From: jaromaz Date: Sat, 9 Jul 2022 04:32:26 +0200 Subject: [PATCH 09/11] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index add8747..fa77aa9 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ httpd, ftpd, syslogd and prepared boot script for telnetd. After installation on a flash drive, the distribution can be run on any computer compatible with the architecture on which the kernel was compiled. +### Support + +You can transfer any funds you wish to my +*[PayPal account](https://www.paypal.com/paypalme/jaromaz)* if you want to +support this project. + Yosild is licensed under GNU General Public License v3.0. For more information please visit my website: [https://jm.iq.pl/yosild][2] From adf49d312f4c97b3a30faf8f42f081930fa5335f Mon Sep 17 00:00:00 2001 From: jaromaz Date: Sat, 9 Jul 2022 04:33:25 +0200 Subject: [PATCH 10/11] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fa77aa9..7f59ea8 100644 --- a/README.md +++ b/README.md @@ -41,15 +41,16 @@ httpd, ftpd, syslogd and prepared boot script for telnetd. After installation on a flash drive, the distribution can be run on any computer compatible with the architecture on which the kernel was compiled. +Yosild is licensed under GNU General Public License v3.0. + +For more information please visit my website: [https://jm.iq.pl/yosild][2] + ### Support You can transfer any funds you wish to my *[PayPal account](https://www.paypal.com/paypalme/jaromaz)* if you want to support this project. -Yosild is licensed under GNU General Public License v3.0. - -For more information please visit my website: [https://jm.iq.pl/yosild][2] [1]: https://www.debian.org/CD/netinst/ [2]: https://jm.iq.pl/yosild From da9152a3f111e72efe07dc53838de0ffabe70cc4 Mon Sep 17 00:00:00 2001 From: Jaromaz Date: Tue, 9 Aug 2022 03:06:46 +0200 Subject: [PATCH 11/11] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f59ea8..0d59d3e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Yosild - Your simple Linux distro Yosild is a single shell script that builds a full, minimal Linux distribution, -based on BusyBox. It compiles the **latest stable kernel** (5.16.19) and the -**latest stable version of the BusyBox** (1.34.1). This script can prepare +based on BusyBox. It compiles the **stable kernel** 5.16.19 and the +**latest stable version of the BusyBox** 1.34.1. This script can prepare minimalistic Linux system for devices with little hardware resources. Yosild Linux needs just **70 MB RAM** and **40 MB storage size**. *yosild.sh* requires [minimal][1] *Debian* or *Ubuntu* distro to run with the architecture compatible