💾 Archived View for tilde.team › ~kiedtl › k1ss › install.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-11-07)
-=-=-=-=-=-=-
Welcome to the installation guide for KISS Linux.
The installation utilizes a tarball which is unpacked to '/'. This same tarball is also directly usable as a chroot from any Linux distribution.
A live-CD from a another distribution is required to bootstrap KISS. It does not matter which distribution is used so long as it includes 'tar' and other basic utilities.
From this point on, the guide assumes you have booted a live-CD, are logged in as root, have your disks, partitions and filesystems setup and have an internet connection.
NOTE: Disks should be setup and fully mounted to /mnt.
Start by declaring a variable.
$ url=https://github.com/kisslinux/repo/releases/download/2020.9-2
$ wget "$url/kiss-chroot-2020.9-2.tar.xz"
This step verifies that the release matches the checksums generated upon its creation and also ensures that the download completed successfully.
$ wget "$url/kiss-chroot-2020.9-2.tar.xz.sha256" $ sha256sum -c < kiss-chroot-2020.9-2.tar.xz.sha256
This step verifies that the release was signed by its creator, Dylan Araps. If the live OS of your choice does not include GPG, this step can also be done on another machine (with the same tarball).
Download the armored ASCII file:
$ wget "$url/kiss-chroot-2020.9-2.tar.xz.asc"
Import my public key (if this fails, try another keyserver):
$ gpg --keyserver keys.gnupg.net --recv-key 46D62DD9F1DE636E
Verify the signature:
$ gpg --verify "kiss-chroot-2020.9-2.tar.xz.asc"
This step effectively installs KISS to /mnt. The tarball contains a full system minus the bootloader, kernel and optional utilities.
$ cd /mnt $ tar xvf /path/to/kiss-chroot-2020.9-2.tar.xz
This is a simple script to chroot into /mnt and set up the environment for the rest of the installation. The script handles mounting pseudo filesystems (/proc, /dev, /sys), enabling network inside the chroot, etc.
On execution of this step you will be running KISS! The next steps involve the kernel, software compilation and system setup.
$ /mnt/bin/kiss-chroot /mnt
The repository system is quite different to that of other distributions. The system is controlled via an environment variable called KISS_PATH. This variable is analogous to PATH, a colon separated list of absolute paths.
A repository is merely a directory (repo) containing directories (packages) and can be located anywhere on the file-system. The full path to the directory is the value to KISS_PATH.
The chroot/installation tarball does not come with any repositories by default, nor does the package manager expect or /assume/ that any exist in a given location. This is entirely up to the user.
The variable can be set system-wide, per-user, per-session, per-command, and even programmatically. This guide will cover setting it for the current user with an example repository layout.
Take this layout:
~/repos/ | +- repo/ | - .git/ | - core/ | - extra/ | - xorg/ | +- community/ | - .git/ | - community/ | +- personal/ | - games/ | - web |
This user's KISS_PATH could look like this:
1 export KISS_PATH='' 2 KISS_PATH=$KISS_PATH:$HOME/repos/personal/games 3 KISS_PATH=$KISS_PATH:$HOME/repos/personal/web 4 KISS_PATH=$KISS_PATH:$HOME/repos/repo/core 5 KISS_PATH=$KISS_PATH:$HOME/repos/repo/extra 6 KISS_PATH=$KISS_PATH:$HOME/repos/repo/xorg 7 KISS_PATH=$KISS_PATH:$HOME/repos/community/community
Tips:
The official repositories contain everything from the base system to a working web browser (Firefox) and media player (mpv). This includes Xorg, rust, nodejs and a lot of other useful software.
Clone the repository to the directory of your choosing.
$ git clone https://github.com/kisslinux/repo
This will be cloned to a directory called 'repo'. This directory contains multiple KISS repositories (core, extra, testing and xorg). Core and Extra must be enabled as this guide requires their use. Xorg is optional.
The community repository contains packages submitted and maintained by users of the distribution. It is twice the size of the official repositories and contains a lot of useful software.
Clone the repository to the directory of your choosing.
$ git clone https://github.com/kisslinux/community
This will be cloned to a directory called 'community'. This directory contains a single KISS repository bearing the same name.
There are many more repositories in existence, each providing a unique set of software. These are all independently created and managed by users. This has been called the "KISS Universe".
NOTE: It may be desirable to save this step for post-installation.
Repositories should now be setup and in functioning order. Run 'kiss search \*' (notice the escaping) to print all repository packages in the search order of the package manager.
This step is optional and can also be done after the installation. Repository signing ensures that all updates have been signed by (Dylan Araps) and further prevents any unsigned updates from reaching your system.
The install guide (and all documentation) is available via 'kiss help'.
$ kiss help install
Welcome to the KISS package manager! These two commands are how individual packages are built and installed on a KISS system.
$ kiss build gnupg1 $ kiss install gnupg1
If the GNU keyserver fails on your network, try an alternative mirror.
Import my public key:
$ gpg --keyserver keys.gnupg.net --recv-key 46D62DD9F1DE636E
Trust my public key.
$ echo trusted-key 0x46d62dd9f1de636e >>/root/.gnupg/gpg.conf
Repository signature verification uses a feature built into git itself (merge.verifySignatures)! This can be disabled at any time using the inverse of the below git command.
The same steps can also be followed with 3rd-party repositories if the owner chooses to sign their commits.
$ cd /var/db/kiss/repo $ git config merge.verifySignatures true |
This step is entirely optional and can also be done post-installation.
These options have been tested and work with every package in the repositories. If you'd like to play it safe, use -O2 or -Os instead of -O3.
If your system has a low amount of memory, omit -pipe. This option speeds up compilation but may use more memory.
If you intend to transfer packages between machines, omit -march=native. This option tells the compiler to use optimizations unique to your processor's architecture.
The `-jX` option should match the number of CPU threads available. You can omit this, however builds will then be limited to a single thread.
# NOTE: The 'O' in '-O3' is the letter O and NOT 0 (ZERO). $ export CFLAGS="-O3 -pipe -march=native" $ export CXXFLAGS="$CFLAGS"
# NOTE: 4 should be changed to match the number of threads. $ export MAKEFLAGS="-j4"
This is how updates are performed on a KISS system. This command uses git to pull down changes from all enabled repositories and will then optionally handle the build/install process.
$ kiss update
We simply cd to the installed packages database and use a glob to grab the name of every installed package. This glob is then passed to the package manager as a list of packages to build.
$ cd /var/db/kiss/installed && kiss build *
Each kiss action (build, install, etc) has a shorthand alias. From now on, 'kiss b' and 'kiss i' will be used in place of 'kiss build' and 'kiss install'.
The software below is required unless stated otherwise.
NOTE: Open an issue for additional filesystem support.
$ kiss b e2fsprogs $ kiss i e2fsprogs
$ kiss b dosfstools $ kiss i dosfstools
$ kiss b xfsprogs $ kiss i xfsprogs
NOTE: If you choose to not install eudev, mdev will automatically be used in its place. Eudev is recommended as a lot of software requires it. See the following wiki page for more information:
$ kiss b util-linux $ kiss i util-linux
$ kiss b eudev $ kiss i eudev
$ kiss b wpa_supplicant $ kiss i wpa_supplicant
$ kiss b dhcpcd $ kiss i dhcpcd
Create the /etc/hostname file:
$ echo HOSTNAME > /etc/hostname
Update the /etc/hosts file:
127.0.0.1 HOSTNAME.localdomain HOSTNAME ::1 HOSTNAME.localdomain HOSTNAME ip6-localhost
NOTE: This step must be done every time the hostname is changed.
This step involves configuring and building your own Linux kernel. If you have not done this before, below are a few guides to get you started.
https://wiki.gentoo.org/wiki/Kernel/Gentoo_Kernel_Configuration_Guide
https://wiki.gentoo.org/wiki/Kernel/Configuration
https://kernelnewbies.org/KernelBuild
The Linux kernel is not managed by the package manager. The kernel is managed manually by the user (see the FAQ for more information).
KISS does not support booting using an initramfs (see the FAQ). When configuring your kernel ensure that all required file-system, disk controller and USB drivers are built with [*] (=y) and not [m] (=m).
A patch may be required for some kernels when built with GCC 10.1.0. Please read the link (and the patch itself for more information).
TIP: The Wiki contains a basic kernel configuration page:
libelf (required in most if not all cases):
$ kiss b libelf $ kiss i libelf
ncurses (required only for 'make menuconfig'):
$ kiss b ncurses $ kiss i ncurses
perl (required in nearly all cases):
$ kiss b perl $ kiss i perl
NOTE: A patch can be applied to remove the perl requirement:
/usr/share/doc/wiki/kernel/patches/kernel-no-perl.patch
Kernel releases:
A larger list of kernels can be found here:
https://wiki.archlinux.org/index.php/Kernel
Download the kernel sources:
$ wget KERNEL_SOURCE
Extract the kernel sources:
$ tar xvf KERNEL_SOURCE $ cd linux-*
To keep the KISS repositories entirely FOSS, the proprietary kernel firmware is omitted. This also makes sense as the kernel itself is manually managed by the user. This step is only required if your hardware utilizes makes use of this firmware.
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
Download and extract the firmware:
$ wget FIRMWARE_SOURCE.tar.gz $ tar xvf linux-firmware-20191022.tar.gz
Copy the required drivers to '/usr/lib/firmware':
$ mkdir -p /usr/lib/firmware $ cp -R ./path/to/driver /usr/lib/firmware
You can determine which drivers you need by searching the web for your hardware and the Linux kernel.
If you require firmware blobs, the drivers you enable must be enabled as [m] (modules). You can also optionally include the firmware in the kernel itself.
Generate a default config with most drivers built into the kernel:
$ make defconfig
Open an interactive menu to edit the generated .config and enable anything extra you may need:
$ make menuconfig
Store the generated config for reuse later:
$ cp .config /path/to/somewhere
TIP: The kernel can backup its own .config file:
This may take a while to complete. The compilation time depends on your hardware and kernel configuration. The 'nproc' command outputs the total number of threads which we pass to make for a multi-threaded build.
$ make -j "$(nproc)"
Install the built modules (to /usr/lib):
$ make INSTALL_MOD_STRIP=1 modules_install
Install the built kernel (to /boot) (Ignore the LILO error):
$ make install
Rename the kernel/system.map (vmlinuz -> vmlinuz-VERSION):
$ mv /boot/vmlinuz /boot/vmlinuz-VERSION $ mv /boot/System.map /boot/System.map-VERSION
The default bootloader is grub (though nothing prevents the use of another bootloader). This default was chosen as most people are familiar with it, both BIOS and UEFI are supported and vast amounts of documentation for it exists.
It is recommended to have an /etc/fstab file ready.
$ kiss b grub $ kiss i grub
Required for UEFI:
$ kiss b efibootmgr $ kiss i efibootmgr
BIOS:
$ grub-install /dev/sdX $ grub-mkconfig -o /boot/grub/grub.cfg
UEFI (replace 'esp' with the EFI mount point):
$ grub-install --target=x86_64-efi \ --efi-directory=esp \ --bootloader-id=kiss $ grub-mkconfig -o /boot/grub/grub.cfg
The default init is busybox init (though nothing ties you to it). The below commands install the bootup and shutdown scripts as well as the default inittab config.
Source code:
https://github.com/kisslinux/init
$ kiss b baseinit $ kiss i baseinit
$ passwd root
$ adduser USERNAME
To install Xorg, the input drivers and a basic default set of fonts, run the following commands.
See:
$ kiss b xorg-server xinit xf86-input-libinput
Installing a base font is recommended (as nothing will work without fonts):
$ kiss b liberation-fonts $ kiss i liberation-fonts
This groups based permissions model may not be suitable if KISS will be used as a multi-seat system. Further configuration can be done at your own discretion.
Replace 'USERNAME' with the name of the user created earlier:
$ addgroup USERNAME video $ addgroup USERNAME audio
You should now be able to reboot into your KISS installation. Typical configuration should follow (creation of users, service configuration, installing a window manager, terminal etc).
The KISS Wiki is a good place to look for post-installation information.
The Wiki is available offline via 'kiss help wiki':
$ kiss help wiki $ kiss help wiki/xorg $ kiss help wiki/xorg/xinit $ kiss help wiki/xorg/xinit $ kiss help wiki/software $ kiss help wiki/software/man-page
If you encountered any issues, don't hesitate to open an issue on one of our GitHub repositories, post on https://reddit.com/r/kisslinux or join the IRC server.
See: