496 lines
18 KiB
Markdown
496 lines
18 KiB
Markdown
+++
|
|
title = "TylkoLinux install guide (Delirium)."
|
|
description = "This article will go over the installation guide for the distro"
|
|
date = 2025-01-30
|
|
trigger = "TylkoLinux is still in experimental stage, and you should only install it if you know what you're doing. We do not take responsibility for any bricked machine as a result of not following the guide."
|
|
disclaimer = """
|
|
Do not follow this article. This page is NOT done yet.
|
|
"""
|
|
[extra]
|
|
toc = true
|
|
+++
|
|
|
|
Requires the branch for `TylkoLinux 25.2 Delirium x86_64`
|
|
|
|
As you may have read in the description, this article serves as a guide to install (build) TylkoLinux on your machine.
|
|
{% alert(important=true) %}
|
|
Prerequisites:
|
|
- x86_64 machine
|
|
- At least 32GB of storage
|
|
- CPU with at least four cores
|
|
- 8GB RAM
|
|
- A linux system running on the host system
|
|
- INTERNET ACCESS!!! (also required for other install scripts in EIC)
|
|
{% end %}
|
|
|
|
# Update as of now: DON'T PROCEED WITH THE GUIDE YET. The script is still in its testing phase, and I'm halfway done successfully testing it :p
|
|
|
|
## S1: Cloning the repository
|
|
The repository is available on GitHub. You can clone into it by running the following (if you have Git installed):
|
|
```bash
|
|
git clone https://github.com/kevadesu/TylkoLinux
|
|
```
|
|
|
|
Proceed to change directory into it.
|
|
|
|
```bash
|
|
cd ./TylkoLinux/
|
|
```
|
|
|
|
And switch branch into the version.
|
|
|
|
```bash
|
|
git checkout delirium
|
|
```
|
|
|
|
## S2: Run the compatibility checker
|
|
Run the compatibility check by running the script that is inside of the repository:
|
|
```bash
|
|
chmod +x ./version-check.sh && ./version-check.sh
|
|
```
|
|
Make sure everything is successful. If not, update your packages.
|
|
|
|
## S3: Partitioning the target device
|
|
Now that we have the installer ready, let's not run it just yet!
|
|
First, we need to __partition the drive we want to install it to.__
|
|
Now, of course, there are a lot of guides on how to do that online and depending on what setup you might want to achieve.
|
|
|
|
What IS clear though, is that you need a boot partition and a root partition, those are the bare minimum.
|
|
|
|
Obviously, I won't be able to write an ENTIRE guide on how to partiton your drive. If you don't know how to do that in the first place, then you shouldn't use TylkoLinux.
|
|
|
|
## S4: Setting the $LFS variable
|
|
Set the $LFS variable to point to /mnt/lfs. Of course, if you desire, you may also make it point to a different destination.
|
|
```bash
|
|
export LFS=/mnt/lfs
|
|
```
|
|
|
|
{% alert(caution=true) %}
|
|
Make sure that the $LFS variable always points to the correct destination.
|
|
It is recommended to always mount the target root partition under /mnt/lfs and set your variable to that.
|
|
Failure to do so may lead you to absolutely fuck up your system.
|
|
{% end %}
|
|
|
|
|
|
{% alert(tip=true) %}
|
|
From the LFS handbook:
|
|
One way to ensure that the LFS variable is always set is to edit the .bash_profile file in both your personal home directory and in /root/.bash_profile and enter the export command above. In addition, the shell specified in the /etc/passwd file for all users that need the LFS variable must be bash to ensure that the /root/.bash_profile file is incorporated as a part of the login process.
|
|
|
|
Another consideration is the method that is used to log into the host system. If logging in through a graphical display manager, the user's .bash_profile is not normally used when a virtual terminal is started. In this case, add the export command to the .bashrc file for the user and root. In addition, some distributions use an "if" test, and do not run the remaining .bashrc instructions for a non-interactive bash invocation. Be sure to place the export command ahead of the test for non-interactive use.
|
|
{% end %}
|
|
|
|
## S5: Mounting the partitions
|
|
Create the mount point and mount the filesystem using the following commands:
|
|
```bash
|
|
mkdir -pv $LFS
|
|
mount -v -t ext4 /dev/<foo> $LFS
|
|
# Replace <foo> with the partition name.
|
|
```
|
|
|
|
If using multiple partitions for TylkoLinux (for example, one for the root and one for the home partition), mount them as followed:
|
|
```bash
|
|
mkdir -pv $LFS
|
|
mount -v -t ext4 /dev/<xxx> $LFS
|
|
mkdir -v $LFS/home
|
|
mount -v -t ext4 /dev/<yyy> $LFS/home
|
|
# Replace <foo> and <bar> with the appropriate partition names.
|
|
```
|
|
|
|
{% alert(caution=true) %}
|
|
The instructions above assume that you are not rebooting your computer during the build. (imagine)
|
|
To automatically remount the partition on boot, modify /etc/fstab by adding this line:
|
|
```bash
|
|
/dev/<foo> /mnt/lfs ext4 defaults 1 1
|
|
```
|
|
If you use additional (optional) partitions, add them as well.
|
|
{% end %}
|
|
|
|
If also using swap, mount with the swapon command:
|
|
```bash
|
|
/sbin/swapon -v /dev/<owo>
|
|
# Replace <owo> with the name of the swap partition.
|
|
```
|
|
|
|
### S5.1: Move bash.bashrc out of the way
|
|
Several commercial distributions add an undocumented instantiation of /etc/bash.bashrc to the initialization of bash. This file has the potential to modify the lfs user's environment in ways that can affect the building of critical TylkoLinux (LFS) packages. To make sure the lfs user's environment is clean, check for the presence of /etc/bash.bashrc and, if present, move it out of the way. As the root user, run:
|
|
```bash
|
|
[ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE
|
|
```
|
|
|
|
## S6: Start the core installation tool
|
|
To start the installer, make sure you're in the same directory as the git repo we cloned, running as the `root` user, then type the following:
|
|
```bash
|
|
./Einrichter-CLI.sh
|
|
```
|
|
If this command fails, make sure it has the permissions to be executed by running the following:
|
|
```bash
|
|
chmod +x ./*.sh
|
|
```
|
|
|
|
### S6.1: Download packages
|
|
When in the script, you should see the following:
|
|
```bash
|
|
[i] The colour variables have been set.
|
|
Einrichter - TylkoLinux Installer Shell $EINRICHTER_VER
|
|
The script is located at $SCRIPT_DIR
|
|
Run einrichter.help for commands
|
|
einrichter>
|
|
```
|
|
|
|
To download packages and patches to the directory, type in the following function:
|
|
```bash
|
|
einrichter> einrichter.installer.pkgs
|
|
```
|
|
This action will proceed to download the packages and patches to $LFS/sources, and also the checksums.
|
|
Watch out, here's the next step:
|
|
|
|
Extract the packages and rename them to the appropriate directory names
|
|
```bash
|
|
einrichter> einrichter.xr
|
|
```
|
|
|
|
IMPORTANT!! Run this too, to prepare for the installation of Linux, and more.
|
|
```bash
|
|
einrichter> einrichter.add.fs
|
|
```
|
|
|
|
### S6.2: Creating a limited directory layout
|
|
|
|
Run the following command:
|
|
```bash
|
|
einrichter> einrichter.installer.DirLayout
|
|
```
|
|
|
|
## S7: Enter lfs user
|
|
Enter the LFS environment to build the cross toolchain and temporary tools by entering the following:
|
|
```bash
|
|
einrichter> einrichter.installer.SafeUser
|
|
```
|
|
|
|
### S7.1: Going through pending steps
|
|
You are about to build a cross toolchain and temporary tools. You're going to see the following:
|
|
```bash
|
|
Einrichter is designed to work as an install script where you can resume where you left off. Do NOT skip anything if you have not ran the step yet.
|
|
Pending step: Setting up environment. Run, skip or quit?
|
|
```
|
|
Either type R to run, S to skip or Q to quit.
|
|
Do the same for the other remaining quesitons:
|
|
|
|
```bash
|
|
Pending step: Setting up toolchain. Run, skip or quit? R
|
|
Pending step: Installing cross toolchain and packages. Run, skip or quit? R
|
|
```
|
|
And eventually...
|
|
```bash
|
|
Done!
|
|
[i] Completed!
|
|
[i] Finished section installer.SafeUser
|
|
einrichter>
|
|
```
|
|
Before you know it, you're done!
|
|
Now HERE begins the real work (insert lqtroll emoji)
|
|
|
|
|
|
|
|
## S8: Actually building the system itself
|
|
{% alert(tip=true) %}
|
|
Before proceeding with the build,
|
|
One way to ensure that the LFS variable is always set is to edit the .bash_profile file in both your personal home directory and in /root/.bash_profile and enter the export command above. In addition, the shell specified in the /etc/passwd file for all users that need the LFS variable must be bash to ensure that the /root/.bash_profile file is incorporated as a part of the login process.
|
|
|
|
Another consideration is the method that is used to log into the host system. If logging in through a graphical display manager, the user's .bash_profile is not normally used when a virtual terminal is started. In this case, add the export command to the .bashrc file for the user and root. In addition, some distributions use an "if" test, and do not run the remaining .bashrc instructions for a non-interactive bash invocation. Be sure to place the export command ahead of the test for non-interactive use.
|
|
{% end %}
|
|
|
|
Now that you finished that section, enter the chroot environment like this:
|
|
```bash
|
|
einrichter> einrichter.installer.chroot
|
|
```
|
|
|
|
This command changes ownership of the commands under $LFS from the user `lfs` to `root`
|
|
It also mounts the virtual kernel file systems.
|
|
Then, it chroots you into the bash shell. Continue the installer by running the following command inside of the chroot:
|
|
```bash
|
|
$ /Einrichter-in-chroot.sh
|
|
```
|
|
This boots you into the eic shell.
|
|
Run the following commands:
|
|
```bash
|
|
einrichter/eic> eic.dirs.create # Creates necessary directories
|
|
einrichter/eic> eic.essentials.create # Creates necessary tools
|
|
einrichter/eic> eic.essentials.install # Installs the tools
|
|
einrichter/eic> eic.essentials.verify # Verifies that the packages are installed
|
|
einrichter/eic> eic.clean # Clean up the environment
|
|
```
|
|
|
|
If after running eic.essentials.verify, the packages have not been installed, try to troubleshoot the actual package that failed to install and try again.
|
|
|
|
Or...re-extract package and reinstall
|
|
|
|
```bash
|
|
einrichter/eic> eic.bugfix.RrX
|
|
einrichter/eic> eic.essentials.install
|
|
```
|
|
|
|
BEFORE BUILDING THE ACTUAL SYSTEM!!!!
|
|
Run this command. It applies the RrX bugfix that removes and re-extracts affected packages.
|
|
```bash
|
|
einrichter/eic> eic.bugfix.RrX
|
|
```
|
|
Build the system by running the following:
|
|
```bash
|
|
einrichter/eic> eic.system.build
|
|
```
|
|
GCC, due to its nature of taking so long to build, gets its own function:
|
|
```bash
|
|
einrichter/eic> eic.system.build.gcc
|
|
```
|
|
Continue building as if nothing happened
|
|
```bash
|
|
einrichter/eic> eic.system.build.continue
|
|
```
|
|
|
|
### S8.1: Strip system (optional)
|
|
Done after so long? If you don't plan on doing any debugging on the system software/aren't that much of a programmer, you can remove debugging symbols and unnecessary symbol table entries from binaries and libraries.
|
|
This frees up about 2GB(?) on the system.
|
|
To do so, run the following:
|
|
```bash
|
|
einrichter/eic> eic.strip
|
|
```
|
|
|
|
### S8.2: Cleaning up
|
|
Finally, after all of that, clean up extra leftovers and the tester account by running this command:
|
|
```bash
|
|
einrichter/eic> eic.system.build.clean
|
|
```
|
|
|
|
## S9: Setting up the system
|
|
You are now in the stage where you set up your system and actually make an attempt at making your system bootable!
|
|
|
|
### S9.1: Networking
|
|
(This section only applies if a network card is to be configured.)
|
|
#### S9.1.1: Network Device Naming
|
|
{% alert(tip=true) %}
|
|
Modified from the LFS handbook: The interface names depend on the implementation and configuration of the udev daemon running on the system. The udev daemon for TylkoLinux (well, LFS) (systemd-udevd) will not run unless the TylkoLinux/LFS system is booted. So it's unreliable to determine the interface names being used in the TylkoLinux system by running those commands on the host distro, even though you are in the chroot environment.
|
|
{% end %}
|
|
Udev normally assigns network card interface names based on physical system characteristics such as enp2s1. If you are not sure what your interface name is, you can always run `ip link` after you have booted your system.
|
|
For most systems, there is only one network interface for each type of connection. For example, the classic interface name for a wired connection is eth0. A wireless connection will usually have the name wifi0 or wlan0.
|
|
|
|
If you'd like to use classic/customised network names, run the following function and enter the demanded information:
|
|
```bash
|
|
einrichter/eic> eic.config.network.devicenaming
|
|
[i] Enter MAC address of desired device: SN:UG:N0:0K:FR
|
|
[i] Enter the desired name of your interface: nasaethernet1
|
|
# Those are examples, not things you should actually enter!! Replace those with the actual info
|
|
```
|
|
#### S9.1.2: Static IP configuration
|
|
This makes a basic config file for a Static IP setup
|
|
```bash
|
|
einrichter/eic> eic.config.network.staticip
|
|
[i] Enter the name of the configured interface: nasaethernet1 # example
|
|
[?] Add DNS? If no, type N. If yes, type DNS address.
|
|
> Y # example
|
|
[?] Add domain? If no, type N. If yes, type domain name.
|
|
> N # example
|
|
[i] Skipped domain addition. # example
|
|
```
|
|
#### S9.1.3: DHCP configuration
|
|
```bash
|
|
einrichter/eic> eic.config.network.dhcp
|
|
[i] Enter the name of the configured interface: itsthesamethingagain0 # example
|
|
```
|
|
#### S9.1.4: /etc/resolv.conf
|
|
{% alert(tip=true) %}
|
|
From the LFS handbook: If using methods incompatible with systemd-resolved to configure your network interfaces (ex: ppp, etc.), or if using any type of local resolver (ex: bind, dnsmasq, unbound, etc.), or any other software that generates an /etc/resolv.conf (ex: a resolvconf program other than the one provided by systemd), the systemd-resolved service should not be used.
|
|
|
|
To switch settings about whether this should be allowed or not, run the command below ↓
|
|
{% end %}
|
|
```bash
|
|
einrichter/eic> eic.config.network.systemd.resolve <on/off>
|
|
[i] Disabling/Enabling systemd-resolved...
|
|
```
|
|
##### S9.1.4.1: Static resolv.conf
|
|
Want to create a static file? Here:
|
|
```bash
|
|
einrichter/eic> eic.config.network.staticresolver
|
|
[?] Add domain? If no, type N. If yes, type domain name.
|
|
> N # example
|
|
[?] Add primary nameserver? If no, type N. If yes, type nameserver name.
|
|
> N
|
|
[i] Skipped primary nameserver addition.
|
|
[?] Add secondary nameserver? If no, type N. If yes, type nameserver name.
|
|
> 1.2.3.4 # example
|
|
```
|
|
|
|
#### S9.1.5: Hostname
|
|
To configure the hostname, enter the following command:
|
|
```bash
|
|
einrichter/eic> eic.config.network.hostname <hostname>
|
|
# Replace <hostname> with the desired hostname
|
|
```
|
|
|
|
#### S9.1.6: Customising the /etc/hosts file
|
|
~~Remind me to work on this section.~~ Call me lazy (please don't), but to get over this guide a tiny tiny bit faster, I recommend you to google (or otherwise look up) "how to set up etc hosts". Usually it's managed by systemd I think? (obv unless you disabled it)
|
|
|
|
### S9.2: System time
|
|
You can tell the system whether your hardware clock is set to local time or UTC.
|
|
|
|
Either run:
|
|
|
|
// When in chroot,
|
|
```bash
|
|
einrichter/eic> eic.config.time.createAdj
|
|
```
|
|
// When in a booted system,
|
|
```bash
|
|
einrichter/eic> eic.config.time.clarifyUTC
|
|
```
|
|
Either can be set back to nothing by either deleting /etc/adjtime
|
|
```bash
|
|
einrichter/eic> rm /etc/adjtime
|
|
```
|
|
or by using timedatectl
|
|
```bash
|
|
timedatectl set-local-rtc 0
|
|
```
|
|
|
|
|
|
To interactively change the system time (when in a booted system ofc)
|
|
do:
|
|
```bash
|
|
einrichter/eic> eic.config.time.set
|
|
```
|
|
then respond to the questions.
|
|
|
|
To set the timezone on a running system, run the following:
|
|
```bash
|
|
einrichter/eic> eic.config.time.tz <TZ>
|
|
# replace <TZ> with the timezone
|
|
```
|
|
|
|
To get the list of timezones in the first place, do:
|
|
```bash
|
|
timedatectl list-timezones
|
|
```
|
|
|
|
In systemd 216 and up, the network time synchronisation service is enabled by default. **If you want, disable/enable it like this:**
|
|
```bash
|
|
# In shell and EIC
|
|
systemctl disable systemd-timesyncd
|
|
systemctl enable systemd-timesyncd
|
|
# In EIC exclusively
|
|
einrichter/eic> eic.config.time.nts on
|
|
einrichter/eic> eic.config.time.nts off
|
|
```
|
|
|
|
### S9.3: Configuring the Linux console
|
|
Write defaults:
|
|
```bash
|
|
einrichter/eic> eic.config.console.preset
|
|
```
|
|
Set keymap:
|
|
```bash
|
|
einrichter/eic> eic.config.console.keymap <keymap>
|
|
# Replace <keymap> with keymap code, e.g. de-latin1
|
|
```
|
|
|
|
### S9.4: Localisation
|
|
|
|
Run this and answer questions:
|
|
```bash
|
|
einrichter/eic> eic.config.locale.set
|
|
```
|
|
|
|
### S9.5: Creating files under /etc/
|
|
Run these to create the /etc/inputrc and /etc/shells files
|
|
```bash
|
|
einrichter/eic> eic.config.create.inputrc
|
|
einrichter/eic> eic.config.create.shells
|
|
```
|
|
|
|
### S9.6: More config...
|
|
Disable screen clearing:
|
|
```bash
|
|
einrichter/eic> eic.config.systemd.disableScreenClearing <yes/no>
|
|
```
|
|
Limit core dump size to something (in the format of 5M, 5G etc):
|
|
```bash
|
|
einrichter/eic> eic.config.systemd.limitCoreDumpSize <(Size)(G/M/K)>
|
|
```
|
|
To remove the limit:
|
|
```bash
|
|
rm /etc/systemd/coredump.conf.d/maxuse.conf
|
|
```
|
|
## S10: Making it boot
|
|
### S10.1: Making an /etc/fstab
|
|
Make a filesystem table like this:
|
|
```bash
|
|
cat > /etc/fstab << "EOF"
|
|
# Begin /etc/fstab
|
|
|
|
# file system mount-point type options dump fsck
|
|
# order
|
|
|
|
/dev/<foo> / <owo> defaults 1 1
|
|
/dev/<bar> swap swap pri=1 0 0
|
|
|
|
# End /etc/fstab
|
|
EOF
|
|
```
|
|
|
|
Replace <foo> and <bar> with the appropriate values, don't add the swap line if you didn't make a swap partition.
|
|
|
|
Replace <owo> with the filesystem type
|
|
|
|
For any additional configuration, check this page: https://www.linuxfromscratch.org/lfs/view/stable-systemd/chapter10/fstab.html
|
|
|
|
### S10.2: BOOTING LINUX!!!!
|
|
Don't get excited too yet, we need to verify something.
|
|
```bash
|
|
cd /sources/linux/
|
|
ls -a | grep .config
|
|
```
|
|
If you see the .config file, we can continue. If not, don't run this step, exit out of the Einrichter-in-chroot.sh script to go back to the Einrichter-CLI.sh script. After that, run:
|
|
```bash
|
|
einrichter> einrichter.add.linuxConfig
|
|
```
|
|
Alright, we can continue. RUN THE FOLLOWING:
|
|
```bash
|
|
einrichter/eic> eic.linux.install
|
|
```
|
|
Later it will ask you this:
|
|
```bash
|
|
[i] Mount boot partition? <Y/N>:
|
|
```
|
|
Say yes if you want the kernel to be in the boot partition instead of the root one. Otherwise, **no.**
|
|
|
|
### S10.3: Bootloader configuration
|
|
Using UEFI bootloader? Check this:
|
|
https://www.linuxfromscratch.org/blfs/view/stable-systemd/postlfs/grub-setup.html#uefi-kernel
|
|
[This page shows instructions on installing GRUB.](https://www.linuxfromscratch.org/lfs/view/stable-systemd/chapter10/grub.html)
|
|
Not needed of course, if you want to tweak your current GRUB to also detect other OSes, add this to your /etc/default/grub (on the host machine)
|
|
``GRUB_DISABLE_OS_PROBER=false``
|
|
Update the GRUB config with the respective command.
|
|
|
|
### S10.4: Package management
|
|
Need a package manager? Install RPM:
|
|
```bash
|
|
einrichter/eic> eic.rpm.install
|
|
```
|
|
|
|
To install tdnf, vmware's implementation of DNF, do:
|
|
```bash
|
|
einrichter/eic> eic.tdnf.install
|
|
```
|
|
|
|
If you want to add more packages to your system, including NetworkManager, run:
|
|
```bash
|
|
einrichter/eic> eic.plus
|
|
```
|
|
|
|
|
|
## S11: The End:tm:
|
|
Well, you made it! Congrats on installing the basics of TylkoLinux... If you want, you can also mark your installation as a TylkoLinux one by running this:
|
|
```bash
|
|
einrichter/eic> eic.signoff
|
|
```
|
|
|
|
Hope you had as much fun following the guide as I did writing it!
|