Tinux 

Tinux - short for Clementinux - is a Linux From Scratch distribution.

One repo with one Devuan Linux ISO - afterwards no more downloads, no binaries, zero configs.

It's source code all the way down...

Tinux is a Linux distribution based on the Linux From Scratch book. During the installation, all the packages from the book get compiled and installed automatically, including the kernel and grub boot loader. The result is a working Qemu Virtual Machine image disk. As the stable base for the installation process an official Devuan install ISO disk image is used.

Another distribution's install disk image is used, so that Tinux does not depend on itself. The Devuan binary image is signed by the official Devuan maintainer. The rest of Tinux are all the official source project packages curated by the Linux From Scratch project (which unfortunately provides only with md5 hashes from the LFS 10.1 project). Everything else of Tinux is 100.0 percent source code!

So all you need basically to get your own Linux operating system build entirely from source code is any standard Linux system with a Qemu/KVM virtual machine and let's say 50 GB disk space.

If you want to move the installation to the bare metal hardware, a simple free partition on your host and copy via rsync on the host from the running VM is sufficient. Just add the partition to your existing /boot/grub/grub.cfg configuration file on the host and edit the /mnt/e.g.lfs/etc/fstab file with input from blkid before reboot. Network configuration of /etc/sysconfig/ifconfig.eth0 after reboot might be a good idea too:).

 

Table of Contents

  1. Download
  2. Requirements
  3. Installation
  4. Documentation
  5. FAQ
  6. License
  7. Version History
  8. Contact

Download

Once you downloaded the Clementinux repository with git to your local disk, everything compiles offline, assuming you have all requirements (see below). But be warned, the Tinux git repository is 11 GB huge and contains the original Devuan Beowulf 3.1.1 desktop installation ISO disk image and lots of LFS/BLFS packages. This is to provide a stable, reproducable, and sufficiant base in one single download that contains everything thereafter.

So take a cup of coffee and hit:

git clone http://techinvest.li/git/tinux.git

Afterwards you can use my public PGP key listed under contact to verify the git hashes in doc/git.log and the binary files in SHA256SUMS with: gpg --verify SHA256SUMS.asc

If you want just a pre peak at how this all looks without downloading 6+ Gigs of stuff you might already have, here is a 1.6MB tar file of everything except the binaries and history:

tinux.tar.gz

 
Thanks and gratitude go to the LFS authors, malina, the mrustc project, bryanpedini, the #lfs crew, the Devuan project, and wallpaperflare.com.
 

Requirements

  • A Linux System with:
    • 100 GB disk space
    • /bin/bash
    • make
    • X.Org
    • Qemu (I used 4.1)
    • openssh
    • expect
    And recommended:
    • git
    • sha256sum
    • gpg
    • md5sum

 

Installation

./configure
make
make blfs   # If you want X11 and a web browser (Falkon, chromium based).
make run

Notice the password '123123' that is given to each user (root and and in the Devuan VM also the tinux user). After all is done, you might want to change the root password in the final Tinux VM manually with the 'passwd' command after login.

If you rerun everything, 'make clean' will delete all the images created inbetween, but also the used ports for the local ssh connection in your ~/.ssh/known_hosts file. After the final Tinux image is create and started in server mode, you can continue to create some base tools from the Beyond Linux From Scratch book like emacs and a handy tool like tmux with: 'make blfs'

Outside of the Qemu VM window, you can connect to the Virtual Machine with: 'ssh -p 2231 root@localhost'

And the very first things before the installation you can do, are:
 
gpg --verify ftp/iso/devuan/SHA256SUMS.asc
gpg --verify SHA256SUMS.asc

And have a look at those SHA256 hashes;-).

 

Documentation

The steps to create the Devuan virtual machine image are here.

Tinux comes with the original LFS and BLFS documentation. The best documentation about the nitty gritty details of all related to Linux in generell.

As Tinux uses package specifications from different LFS versions, all currently used LFS or BLFS versions are included here.

Original Software/Sources/Packages

kernelhttps://www.kernel.org/
GCChttps://gcc.gnu.org/
Glibchttps://sourceware.org/glibc/wiki/Glibc%20Timeline
binutilshttps://www.gnu.org/software/binutils/
util-linuxhttps://mirrors.edge.kernel.org/pub/linux/utils/util-linux/
OpenSSLhttps://www.openssl.org/source/
Rubyhttps://cache.ruby-lang.org/pub/ruby/2.6/
Xorghttps://lists.x.org/archives/xorg-announce/
githttps://github.com/git/git
Openboxhttp://openbox.org/
gtkhttps://gitlab.gnome.org/GNOME/gtk
nsshttps://hg.mozilla.org/projects/nss
node.jshttps://nodejs.org/en/
Rusthttps://github.com/rust-lang/rust/blob/master/RELEASES.md
LibreOfficehttps://www.libreoffice.org/
D-Bushttps://dbus.freedesktop.org/releases/dbus/
expathttps://github.com/libexpat/libexpat/releases/
 

FAQ

The Tinux Qemu VM starts up with a screen resolution of 1024x768. However, I have a bigger screen. How can I use the full screen resolution?

It takes a little bit of hand work, like on Arch. And you will have to do it again once you restart your VM. Candidate to automate it therefore. Here is how it goes with 1280x1024 as an example from the command line:

xrandr
cvt 1280 1024
# E.g. having used the output of xrandr and cvt in the following commands..
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode Virtual-1 "1280x1024_60.00"
xrandr --output Virtual-1 --mode "1280x1024_60.00"

How can I change my wallpaper from the command line?

ls -la /usr/share/wallpapers
# Choose a file that covers, at lest, your screen size.
feh --bg-center <choosen.jpg>
vi ~/.config/openbox/autostart
# Edit the feh line accordingly, so you enjoy your new wallpaper in the next session as well.

Changed the screen resolution, and now my xclock is out of location. How can I setup a new location?

Kill the running xclock process and edit ~/.config/openbox/autostart. For 1280x1024 this line works for me:

xclock -geometry 141x28+1137-1002 -digital -strftime "%Y-%m-%d %H:%M" &

Copy paste the same line into an xterm to make it work for your current session.

Love my wallpaper so much, but my screen is fully covered with application windows. How can I have a look at it?

In ~/.config/openbox/rc.xml is ToggleShowDesktop defined with a key binding of W-d. W might stand for the Windows key, AltGr, the right Alt key, or what have you. If you can't figure it out, you can rebind it also to something that works for you (and reload the X config - or restart X). Using it will show the wallpaper/desktop. Use it again to get all your windows back, including the xclock.

All the windows also don't allow me to use the right mouse click on the background to open the applications menu. How to get to this menu without seeing the desktop background?

In ~/.config/openbox/rc.xml is also the W-m keybinding defined. Same remarks as to the question above apply here.

Great having a whole build of a running Linux From Scratch system with a bunch of Beyond Linux From Scratch applications (notably X Org) already in place. Still, there is not all there yet that I wish.. How can I continue playing with BLFS and installing more applications to my desire?

Open an xterm terminal and switch to the 'lfs' user and proceed with something like the following:

su - lfs
cd /sources
find . -type d
ls -la /usr/share/doc/tinux/
lynx /usr/share/doc/tinux/BLFS-BOOK-10.1-nochunks.html
wget https://ftp.gnu.org/gnu/screen/screen-4.8.0.tar.gz
md5sum screen-4.8.0.tar.gz | grep d276213d3acd10339cd37848b8c4ab1e
echo $?
wget http://www.linuxfromscratch.org/patches/blfs/10.1/screen-4.8.0-upstream_fixes-1.patch
less screen-4.8.0-upstream_fixes-1.patch
tar xf screen-4.8.0.tar.gz
cd screen-4.8.0
patch -Np1 -i ../screen-4.8.0-upstream_fixes-1.patch
./configure --prefix=/usr \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--with-socket-dir=/run/screen \
--with-pty-group=5 \
--with-sys-screenrc=/etc/screenrc
sed -i -e "s%/usr/local/etc/screenrc%/etc/screenrc%" {etc,doc}/*
make
sudo make install
sudo install -m 644 etc/etcscreenrc /etc/screenrc
cd ..
sudo rm -rf screen-4.8.0
which screen

Then put this into a bash script and send it to me:).

How to build rustc from source without using a pre-existing binary rustc version?

./configure
time { make lfs_9.0 && make blfs_9.0 && make rustc; }

The resulting rustc and cargo binaries (1.52.0) are stored on the host in the build directory (./build/rustc-1.52.0/bin). The bootstrap process starts with mrustc, which uses GCC to build itself. Afterwards mrustc is used to build rustc 1.40 which is then used recursively all the way up till version 1.52.
The build process takes an additional 100 GB of disk space (so a total of 200GB is needed!).
The resulting 1.52 binaries can then be copied and used in Tinux/LFS 11.0, e.g. to build Firefox. The detour via Tinux/LFS 9.0 has been taken, as mrustc does not yet support the latest GCC 11.2.0 version.
Oh, and on my setup with an AMD 2700X and 32GB of ram, the whole build process takes over 21 hours. Especially with less RAM, expect another 10 hours.

In case you don't use Tinux but LFS/BLFS directly, here is an HowTo for building Rustc from source with LFS/BLFS 11.0 (hint, you have to install GCC 9.2.0 first). Actually, this HowTo works also on Tinux 11.0 :).

How to replace the xterm icon?

Who got the idea to mix the colors red and blue for an icon?! So this is how our slight variation looks:

To build xterm with this icon, add the following two files into the icons directory inside the untarred xterm-368 folder, when building xterm according to the BLFS 11.0 guide.

cd xterm-368/icons
mv mini.xterm_32x32.xpm mini.xterm_32x32.xpm.orig
mv mini.xterm_48x48.xpm mini.xterm_48x48.xpm.orig
wget http://techinvest.li/tinux/images/mini.xterm_32x32.xpm
wget http://techinvest.li/tinux/images/mini.xterm_48x48.xpm
cd ..
# Continue with the BLFS build instructions (see link above)..

 

License

The LFS/BLFS books are licensed under the MIT License, and therefore everything that represents Tinux, scripts and documentation, is also licensed under the MIT Licence. The binary Devuan install image and all the source based packages/projects in archive files, which Tinux bundles together, are of course licensed each under their respective licenses, e.g. the Linux kernel under the GPL version 2.0 etc. Except the Devuan installation image, all the included packages are distributed with full source code (and only source code) and contain their full license information each. For Devuan see here: https://www.devuan.org/os/source-code

 

Version History

2022-03-05 13:08:29 - Use official realease of LFS 11.1 for Tinux now. OpenSSL still uses 1.1.1m instead of 3.0.1 for better bootstrapping of rustc-1.58.1.

2022-02-16 11:34:19 - Upgrade to LFS 11.1 and some BLFS 11.1.

2021-11-21 10:23:56 - Build rustc-1.52.0 via mrustc using GCC.

2021-11-17 19:10:48 - Fix BLFS build bug in the older version based on version 9.0. Signing of the 11.0 tar files.

2021-11-12 15:25:18 - Use most of the memory available.

2021-09-28 10:34:02 - Finally based on LFS/BLFS version 11.0. BLFS contains two browsers, Falkon and Epiphany, and Abiword and Gnumeric. Total build time with LFS on 7 threads is 16.4 hours.

2021-08-22 22:59:30 - More openbox window manager polishing via menu.

2021-08-08 17:35:00 - FAQ added.

2021-08-07 07:55:49 - Reboot and power off scripts added to the Openbox menu, as well as early basic java tools added.

2021-08-05 09:32:28 - AbiWord and a wallpaper added as well as a polished Openbox user menu plus an introductory message before login.

2021-08-01 12:34:57 - Added youtube-dl version 2021.06.06, which is not part of BLFS, but extremely useful.

2021-07-18 13:55:22 - Gnumeric from BLFS 8.1 added (because it doesn't need Rust).

2021-07-13 15:02:03 - X.Org and Falkon web browser are now a part of make blfs.

2021-06-28 09:04:08 - Tested installation on the bare metal via rsync.

2021-06-19 07:28:58 - First mini steps of BLFS are included, so the user can continue to enjoy Tinux with OpenSSH available to connect from and to the host environment.

2021-06-18 10:48:43 - Start kernel with net.ifnames=0 to get eth0 interface back. Whole LFS build works now in one go as well as resulting VM startup in GUI mode added to the makefile.

2021-06-17 14:53:13 - Finished all of LFS-10.1 (kernel and grub installation), but minimum missing to be useful is OpenSSH from BLFS. Those packages as well as the BLFS-10.1 documentation have been added, but are not used yet.

2021-06-17 12:04:10 - Inside the virtual machine use all the cores/threads, instead of a fixed number.

2021-06-17 11:45:20 - First version that runs through the whole book compilation in one go, except the final kernel and grub setup.

2021-06-16 14:16:34 - PGP signing of binary and git hashes.

 

Contact

For contact join the IRC channel #tinux on the Libera network (irc.libera.chat) or send email to: clemens.lahme@techinvest.li

My PGP public key you can find at: http://techinvest.li/clemens_lahme_at_techinvest_dot_li.pgp