This guide will go into depth on how to install Everest Linux.
If you nedd assistance, feel free to reach out on IRC (#everestlinux), or Discord.
The following steps will be used to complete the installation:
- Set up the environment by creating proper mountpoints, users, and partitions
- Download the Everest Linux rootfs image
- Unpack the rootfs image onto the previously set up mountpoint
- Chroot into the new system
- Set up Glacier
- Install system software
- Install the Linux kernel
- Set up init scripts/services
- Reboot the system
Note: Everest is highly flexible, and every aspect of the system can be changed.
If you are changing anything, it is assumed you know exactly what you're doing.
Commands prefixed with (user)$
should be run as an unprivileged user.
Commands prefixed with (root)#
should be run as the root user.
Commands prefixed with (chroot)#
should be run as the root user inside the chroot environment.
Our environment needs to be set up correctly before any other steps can proceed.
Create the system mountpoint:
(root)# mkdir -v /mnt/everest
Assign the system mounpoint a variable for ease of use:
(root)# export EVEREST=/mnt/everest
Create any necessary partitions:
/boot - 256MB
(optional) swap - RAM * 2
/ - rest of the drive
Mount the root partition to the system mountpoint:
(root)# mount /dev/sdX /mnt/everest
Create the boot directory:
(root)# mkdir -pv /mnt/everest/boot
Mount the boot partition:
(root)# mount /dev/sdX /mnt/everest/boot
Our system is now set up for the installation.
An Everest Image is an uncomplete root filesystem image which provides a strong base to build off of.
Each image has slight differences to others, some differences may include:
- The init system
- The standard C library
- The architecture
Images are designated in the following ways:
everestlinux-X.X.X-INIT-ARCH(if not x86)-img.tar.xz
For instance, an image targeting x86_64, with the busybox init system would be called:
everestlinux-1.0.0-busybox-img.tar.xz
An image targeting arm64, with systemd would be called:
everestlinux-1.0.0-systemd-aarch64-img.tar.xz
Other designations may be used, such as:
- no_multilib
Ensure you download the correct image for your system. For most users, images targeting
x86_64 with the busybox init system are what you should use.
To get the image to our destination as easily as possible, use wget
(user)$ wget https://git.everestlinux.org/EverestLinux/everest/raw/branch/main/releases/everestlinux-X.X.X-INIT-img.tar.xz
With the image downloaded, the system can now be installed.
The image can now be unpacked into the system mountpoint.
Ensure the image is located in
/mnt/everest
then run the following command to unpack it:
(root)# tar -xpvf everestlinux-img.tar.xz --xattrs-include='*.*' --numeric-owner
The following 2 options are very important. Without them, some binaries may refuse to run due to incorrect file ownership.
Our system is now in a partially working state.
If we were to simply call it a day and try to boot into the system now, it would not be possible.
Many parts of the system are missing, including a bootloader and kernel.
Chrooting allows us to access the system and modify it, without actually booting into it.
Before chrooting, we must mount some partitions.
Chroot into the system:
(root)# everest-chroot /mnt/everest
This program will check the following:
- /mnt/everest exists
- /bin/sh exists
Once in the chroot environment, run the following commands:
(chroot)# export PS1="(chroot) ${PS1}" && source /etc/profile
We are now fully set up for the rest of the installation.
Glacier is the package manager for Everest. It must be installed into the new system.
Download the Glacier release tarball:
(chroot)# wget RELEASE_TARBALL
Unpack the tarball and run the installation:
(chroot)# tar xpvf glacier-release-X.X.X.tar.xz && glacierX.X.X/INSTALL.sh
This script will check for the following, and make corrections if necessary:
- The C library is installed
- The C library headers are installed
- The C compiler is installed
- GNU Binutils are installed
- GNU Make is installed
- Python is installed
Edit
/etc/make.conf
and change any settings you wish.
The kernel can now be installed.
Install the linux-firmware package, which provides firmware for some devices:
(chroot)# glacier -f linux-firmware
Use Glacier to download the source tree:
(chroot)# glacier -f linux
Find the kernel source tree in
/usr/src/linux
Note: Alternatively, you can download a new kernel from kernel.org
Clean the kernel source tree:
(chroot)# make mrproper
Configure the kernel:
(chroot)# make menuconfig
Note: Recommended options for configuration are not provided. It is up to the user to decide what they want to enable.
Compile the kernel:
(chroot)# make && make modules_install
Copy the kernel image to /boot:
(chroot)# make install
(Optional) Build an initramfs
On some systems, an initramfs (initial ram filesystem) is required to boot properly.
Do some research and decide whether you need - or want - an initramfs.
Install dracut:
(chroot)# glacier -f dracut
Build an initramfs:
(chroot)# dracut
Some components of the system must be configured before we can boot.
Create an fstab file.
An example of a properly formatted fstab is below:
/dev/sda1 /boot vfat defaults,noatime 0 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext4 noatime 0 1
Enable system services, such as a cron daemon, logger, etc:
(chroot)# esv start cronie chronyd sysklogd # for busybox init
(chroot)# systemctl enable --now cronie chronyd sysklogd # for systemd
Other things you might want to configure are:
- /etc/doas.conf
- /etc/inittab
Our system needs one more component before it can be booted into: the bootloader
For busybox init users, GRUB is the recommended bootloader.
For systemd users, systemd-boot is the recommended bootloader.
GRUB
Install the GRUB package:
Note: GRUB is split into 2 packages, grub-bios and grub-uefi.
Ensure you install the correct package.
(chroot)# glacier -f grub-{bios,uefi}
Install GRUB:
(chroot)# grub-install /dev/sdX # for BIOS
(chroot)# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub # for UEFI
Create a GRUB configuration file:
(chroot)# grub-mkconfig -o /boot/grub/grub.cfg
systemd-boot
Note: systemd-boot only supports UEFI.
Use GRUB if your system is incompatible with UEFI.
Systemd-boot is included with systemd.
Install systemd-boot:
(chroot)# bootctl install
Edit /boot/loader/loader.conf and create a boot entry at /boot/loader/entries/everest.conf
Every component of the system has been configured, and we can now boot into it.
Exit the chroot environment:
(chroot)# exit
Unmount all partitions from /mnt/everest:
(root)# umount -R /mnt/everest
Power off the system:
(root)# poweroff
Ensure you remove the installation media or you will not boot into the new system.
A base Everest system is pretty minimal. Most users will need to configure extra components,
such as a window manager, sound, or networking.
See page: General Recommendations