everest-web/install.html
lw-everestlinux 4797ec5acc 11/2/22
2022-11-02 11:11:06 -04:00

130 lines
7.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Everest Linux - Installation Handbook</title>
<link type="text/css" rel="stylesheet" href="css/everest.css"/>
</head>
<body>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="install.html">Handbook</a></li>
<li><a href="https://git.everestlinux.org/EverestLinux/glacier-pkgs">Packages</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="https://git.everestlinux.org">Git</a></li>
</ul>
<img src="img/banner-hb.jpg" alt="banner-hb"/>
<h1>Installation Handbook</h1>
<p>This guide will go into depth on how to install Everest Linux.</p>
<p>If you nedd assistance, feel free to reach out on IRC (#everestlinux), or Discord.</p>
<h2>Prerequisites</h2>
<p>The following steps will be used to complete the installation:</p>
<p> - Set up the environment by creating proper mountpoints, users, and partitions</p>
<p> - Download the Everest Linux rootfs image</p>
<p> - Unpack the rootfs image onto the previously set up mountpoint</p>
<p> - Chroot into the new system</p>
<p> - Set up Glacier</p>
<p> - Install system software</p>
<p> - Install the Linux kernel</p>
<p> - Set up init scripts/services</p>
<p> - Reboot the system</p>
<p><i>Note: Everest is highly flexible, and every aspect of the system can be changed.</i></p>
<p><i>If you are changing anything, it is assumed you know exactly what you're doing.</i></p>
<p>Commands prefixed with <code><mark>(user)$</mark></code> should be run as an unprivileged user.</p>
<p>Commands prefixed with <code><mark>(root)#</mark></code> should be run as the root user.</p>
<p>Commands prefixed with <code><mark>(chroot)#</mark></code> should be run as the root user inside the chroot environment.</p>
<h2>Set up the environment</h2>
<p>Our environment needs to be set up correctly before any other steps can proceed.</p>
<p>Create the system mountpoint:</p>
<p><code><mark>(root)# mkdir -v /mnt/everest</mark></code></p>
<p>Assign the system mounpoint a variable for ease of use:</p>
<p><code><mark>(root)# export EVEREST=/mnt/everest</mark></code></p>
<p>Create any necessary partitions:</p>
<p>/boot - 256MB</p>
<p>(optional) swap - RAM * 2</p>
<p>/ - rest of the drive</p>
<p>Mount the root partition to the system mountpoint:</p>
<p><code><mark>(root)# mount /dev/sdX /mnt/everest</mark></code></p>
<p>Create the boot directory:</p>
<p><code><mark>(root)# mkdir -pv /mnt/everest/boot</mark></code></p>
<p>Mount the boot partition:</p>
<p><code><mark>(root)# mount /dev/sdX /mnt/everest/boot</mark></code></p>
<p>Our system is now set up for the installation.</p>
<h2>Downloading the Everest image</h2>
<p>An Everest Image is an uncomplete root filesystem image which provides a strong base to build off of.</p>
<p>Each image has slight differences to others, some differences may include:</p>
<p> - The init system</p>
<p> - The standard C library</p>
<p> - The architecture</p>
<p>Images are designated in the following ways:</p>
<p>everestlinux-X.X.X-INIT-ARCH(if not x86)-img.tar.xz</p>
<p>For instance, an image targeting x86_64, with the busybox init system would be called:</p>
<p>everestlinux-1.0.0-busybox-img.tar.xz</p>
<p>An image targeting arm64, with systemd would be called:</p>
<p>everestlinux-1.0.0-systemd-aarch64-img.tar.xz</p>
<p>Other designations may be used, such as:</p>
<p> - no_multilib</p>
<p>Ensure you download the correct image for your system. For most users, images targeting</p>
<p><strong>x86_64</strong> with the <strong>busybox</strong> init system are what you should use.</p>
<p>To get the image to our destination as easily as possible, use wget</p>
<p><code><mark>(user)$ wget https://git.everestlinux.org/EverestLinux/everest/raw/branch/main/releases/everestlinux-X.X.X-INIT-img.tar.xz</mark></code></p>
<p>With the image downloaded, the system can now be installed.</p>
<h2>Unpacking the Image</h2>
<p>The image can now be unpacked into the system mountpoint.</p>
<p>Ensure the image is located in <p><code><mark>/mnt/everest</mark></code></p>, then run the following command to unpack it:</p>
<p><code><mark>(root)# tar -xpvf everestlinux-img.tar.xz --xattrs-include='*.*' --numeric-owner</mark></code></p>
<p>The following 2 options are very important. Without them, some binaries may refuse to run due to incorrect file ownership.</p>
<h2>Chrooting into the new installation</h2>
<p>Our system is now in a partially working state.</p>
<p>If we were to simply call it a day and try to boot into the system now, it would not be possible.</p>
<p>Many parts of the system are missing, including a bootloader and kernel.</p>
<p>Chrooting allows us to access the system and modify it, without actually booting into it.</p>
<p>Before chrooting, we must mount some partitions.</p>
<p>Chroot into the system:</p>
<p><code><mark>(root)# everest-chroot /mnt/everest</mark></code></p>
<p>This program will check the following:</p>
<p> - /mnt/everest exists</p>
<p> - /bin/sh exists</p>
<p>Once in the chroot environment, run the following commands:</p>
<p><code><mark>(chroot)# export PS1="(chroot) ${PS1}" && source /etc/profile</mark></code></p>
<p>We are now fully set up for the rest of the installation.</p>
<h2>Set up Glacier</h2>
<p>Glacier is the package manager for Everest. It must be installed into the new system.</p>
<p>Download the Glacier release tarball:</p>
<p><code><mark>(chroot)# wget RELEASE_TARBALL</mark></code></p>
<p>Unpack the tarball and run the installation:</p>
<p><code><mark>(chroot)# tar xpvf glacier-release-X.X.X.tar.xz && glacierX.X.X/INSTALL.sh</mark></code></p>
<p>Edit <p><code><mark>/etc/make.conf</mark></code></p> and change any settings you wish.</p>
<h2>Install the Linux kernel</h2>
<p>The kernel can now be installed.</p>
<p>Install the linux-firmware package, which provides firmware for some devices:</p>
<p><code><mark>(chroot)# glacier -f linux-firmware</mark></code></p>
<p>Use Glacier to download the source tree:</p>
<p><code><mark>(chroot)# glacier -f linux</mark></code></p>
<p>Find the kernel source tree in <p><code><mark>/usr/src/linux</mark></code></p>
<p><i>Note: Alternatively, you can download a new kernel from kernel.org</i></p>
<p>Clean the kernel source tree:</p>
<p><code><mark>(chroot)# make mrproper</mark></code></p>
<p>Configure the kernel:</p>
<p><code><mark>(chroot)# make menuconfig</mark></code></p>
<p><i>Note: Recommended options for configuration are not provided. It is up to the user to decide what they want to enable.</i></p>
<p>Compile the kernel:</p>
<p><code><mark>(chroot)# make && make modules_install</mark></code></p>
<p>Copy the kernel image to /boot:</p>
<p><code><mark>(chroot)# make install</mark></code></p>
<p>(Optional) Build an initramfs</p>
<p>On some systems, an initramfs (initial ram filesystem) is required to boot properly.</p>
<p>Do some research and decide whether you need - or want - an initramfs.</p>
<p>Install dracut:</p>
<p><code><mark>(chroot)# glacier -f dracut</mark></code></p>
<p>Build an initramfs:</p>
<p><code><mark>(chroot)# dracut</mark></code></p>
<h2>Configure the system</h2>
<p>Some components of the system must be configured before we can boot.</p>
<p>Create an fstab file.</p>
<p>An example of a properly formatted fstab is below:</p>
<p>/dev/sda1 /boot vfat defaults,noatime 0 2</p>
<p>/dev/sda2 none swap sw 0 0</p>
<p>/dev/sda3 / ext4 noatime 0 1</p>
<p>