diff --git a/css/everest.css b/css/everest.css index 62cc599..176edae 100644 --- a/css/everest.css +++ b/css/everest.css @@ -46,6 +46,7 @@ html { } .file { + font-family: monospace; background-color: #0F0F0F; border-left-style: solid; border-left-color: MediumSeaGreen; @@ -56,6 +57,29 @@ html { color: white; } +.kernel { + font-family: monospace; + background-color: #0F0F0F; + border-left-style: solid; + border-left-color: SlateBlue; + border-width: 4px; + border-radius: 2px; + padding: 4px; + width: 50%; + color: white; +} + +.warning { + background-color: #330000; + border-left-style: solid; + border-left-color: #e60000; + border-width: 4px; + border-radius: 2px; + padding: 4px; + width: 50%; + color: #e60000; +} + fhead { background-color: #0F0F0F; border-left-style: solid; @@ -67,6 +91,28 @@ fhead { color: MediumSeaGreen; } +khead { + background-color: #0F0F0F; + border-left-style: solid; + border-left-color: SlateBlue; + border-width: 4px; + border-radius: 2px; + padding: 6px; + width: 50%; + color: Slateblue; +} + +warnhead { + background-color: #330000; + border-left-style: solid; + border-left-color: #e60000; + border-width: 4px; + border-radius: 2px; + padding: 6px; + width: 50%; + color: #e60000; +} + @media screen and (max-height: 450px) { .sidenav {padding-top: 15px;} .sidenav a{font-size: 18px;} @@ -95,19 +141,19 @@ wiki { border-color: Tomato; } -file { +/* file { border-style: solid; - border-width: 1px; + border-width: 4px; border-radius: 2px; padding: 2px; border-color: black; -} +} */ h2 { border-left-style: solid; border-color: #4a86e8ff; padding-left: 4px; - border-width: 8px; + border-left-width: 6px; border-radius: 5px; color: #e6e6e6; } @@ -128,7 +174,7 @@ hr.dotted { border-top: 3px dotted #bbb; } -p { +/* p { color: #e6e6e6; } diff --git a/install.html b/install.html index d902fdd..e7d0dcd 100644 --- a/install.html +++ b/install.html @@ -19,168 +19,294 @@

Installation Handbook

-

This is the official installation guide for Everest Linux.

-

Using unofficial guides is not recommended as they may be

-

out of date.

-

Simply following this guide blindly is a great way to end up

-

with a broken installation. Ensure you have a rough idea of

-

what each command does.

-

If you need assistance, reach out on IRC (#everestlinux) or Discord.

+

This guide is the official installation handbook for Everest Linux.

+ WARNING: +
+

Using unofficial guides is not recommended, as they may be outdated, or unreliable. The official guide is located at https://www.everestlinux.org/install.

+
+

+ WARNING: +
+

Simply copy and pasting commands from this guide won't cut it, and you'll most likely end up with a broken installation. Ensure you know what each command does.

+
+

+ WARNING: +
+

Everest is not for the faint of heart. If you have never touched Linux in your life, Everest is most certainly not for you. Check out https://linuxmint.com if you want a great Linux experience that works out of the box.

+
+

+ WARNING: +
+

Everest at its current state is highly experimental. Install at your own risk.

+
+

If you need assistance, reach out to us on IRC (libera.chat, #everestlinux) or Discord.

Prerequisites

-

The following steps will be used to complete the installation:

-

- Set up the environment

-

- Download the Everest Linux system image

-

- Unpack the system image

-

- Chroot into the new system

-

- Install desired programs

-

- Install the Linux kernel -

- Set up init scripts/services

-

- Reboot the system

- Note: Everest is highly flexible. - If you are changing anything in this guide, it is assumed - you know exactly what to do. -

Run (user)$ commands as an unprivileged user.

-

Run (root)# commands as the root user.

-

Run (chroot)# commands inside the chroot environment.

+

The following steps are required to complete an installation:

+
    +
  1. Set up the build environment
  2. +
  3. Download a system image
  4. +
  5. Unpack the system image
  6. +
  7. Change root into the new system
  8. +
  9. Install programs
  10. +
  11. Install the Linux kernel
  12. +
  13. Set up init scripts and services
  14. +
  15. Install the bootloader
  16. +
  17. Reboot the system
  18. +
+ Note that Everest is highly flexible. That being said, it is up to you to make modifications yourself. +

Run commands prefixed with (user)$ as an unprivileged user.

+

Run commands prefixed with (root)# as the root user.

+

Run commands prefixed with (chroot)# inside the chroot environment.

Set up the environment

-

Our environment needs to be set up correctly for the installation.

-

Create the system mountpoint:

+

Everest needs a proper environment set up in order to install correctly.

+

A system mountpoint is where the new system's root (/) will be. Where you put this doesn't matter, as the host system used to build the system won't be included

+

in the final installation. In this example, we will use /mnt/everest.

+

Create a system mountpoint:

(root)# mkdir -pv /mnt/everest -

Although it may not be used, assign the system mountpoint a variable:

- (root)# export SYS_MNT=/mnt/everest -

Partition your drive:

+

A variable pointing to the system mountpoint may be useful in the future, as it will save you a bit of typing.

+

Create a variable for the system mountpoint:

+ (root)# SYS_MNT=/mnt/everest +

Partitions must be created on the drive you wish to install Everest to. The typical partition layout on an Everest system may differ from othet distributions.

+

The typical layout is:

+ + + + + + + + + + + + + + + + + + + + + +
Mount pointTypeSuggested size
/mnt/everest/bootEFI system partition (esp)No smaller than 256 MB, no larger than 1 GB
/mnt/everest/usr/usrNo smaller than 25 GB
/mnt/everestRoot filesystemRemainder of the drive
+

Partition the target drive:

(root)# cfdisk /dev/sdX +

A valid filesystem is required on the drive.

+

Most filesystems should work, however ensure the system has the corresponding package for whatever filesystem you choose.

+

For example, if XFS is used, when installing the system:

+ (chroot)# gpkg -f world/xfsprogs +

In this example, Ext4 will be used.

+

Create a filesystem:

+ (root)# mkfs.ext4 /dev/root +

+ (root)# mkfs.ext4 /dev/usr +

The EFI system partition (esp) must be formatted as FAT32.

+ (root)# mkfs.vfat -F32 /dev/boot

Mount the root partition to the system mountpoint:

- (root)# mount /dev/sdX /mnt/everest -

If needed, create the boot directory:

- (root)# mkdir -pv /mnt/everest/boot -

Mount the boot partition:

- (root)# mount /dev/sdX /mnt/everest/boot -

Downloading the Everest system image

-

An Everest system image is an incomplete root filesystem, which

-

provides a strong base to build off of

-

Not all system images are the same. Some differences are:

-

- The init system

-

- The standard C library

-

- The architecture

-

- SELinux support

-

- Multilib support

-

Ensure you download the image you want. Migrating in the future

-

is not officially supported or even recommended.

-

Download an image with wget:

- (user)$ wget SYSTEM_IMAGE_LINK + (root)# mount /dev/root /mnt/everest +

Some additional directories may need to be created.

+

Create extra needed directories:

+ (root)# mkdir /mnt/everest/boot +

+ (root)# mkdir /mnt/everest/usr +

Mount the remaining partitions:

+ (root)# mount /dev/boot /mnt/everest/boot +

+ (root)# mount /dev/usr /mnt/everest/usr +

Create remaining directories on /usr with mkusrskel:

+ (root)# mkusrskel -d /mnt/everest/usr +

Downloading a system image

+

An Everest system image provides an incomplete root filesystem which users can build a system off of. Users should be careful of which

+

image they choose, as switching in the future is trivial, time consuming, and requires rebuilding a lot of packages. It's a lot better

+

to get it right the first time, rather than trying to get it right later.

+

Do some thorough planning to ensure you get the right system image. For instance, ask yourself a few questions, such as:

+
    +
  1. Do I need 32 bit libraries?
  2. +
  3. Will I be using proprietary software that cannot be recompiled?
  4. +
  5. Do I require a specific C library for my hardware setup?
  6. +
  7. Do I want to set up NSA Security Enhanced Linux (SELinux)
  8. +
  9. Do I want an init system other than Busybox's built in init configured out of the box?
  10. +
+

Downloading a system image that is severely out of date is not recommended. Many programs, such as the kernel or SSL library will be vulnerable to attacks.

+

Download a system image with wget:

+ (user)$ wget https://git.everestlinux.org/EverestLinux/everest/raw/branch/main/releases/SYSTEM_IMAGE.tar.xz

Unpacking the system image

-

The system image can now be unpacked.

-

Ensure the system image is located under the system mountpoint.

-

Note that a simple tar -xvf will cause errors with

-

permissions. Therefore, a few extra flags are needed.

+

Now that a system image has been downloaded, we can unpack it.

+

Ensure the system image is inside the system mountpoint, otherwise you may run into trouble.

+

Since a Linux root filesystem is complex, and many different files need to be owned by certain users, or have certain permissions, simply running `tar xf` will

+

result in a broken image. A couple extra flags are needed to preserve these permissions in the unpacked image.

Unpack the system image:

(root)# tar -xpvf SYSTEM_IMAGE --xattrs-include='*.*' --numeric-owner -

This will ensure all file ownership is compliant.

-

Chrooting into the new installation

-

The system is in a partially working state.

-

If we were to call it a day and reboot now, it wouldn't be possible.

-

Many critical parts of the system are missing, including the

-

bootloader and kernel. Chrooting allows us to make modifications

-

to the target system, without actually booting into it.

-

Before chrooting, additional filesystems must be mounted.

-

Mount these filesystems:

- (root)# mount --types proc /proc /mnt/everest/proc -

- (root)# mount --rbind /sys /mnt/everest/sys -

- (root)# mount --make-rslave /mnt/everest/sys -

- (root)# mount --rbind /dev/ /mnt/everest/dev -

- (root)# mount --make-rslave /mnt/everest/dev -

- (root)# mount --bind /run /mnt/everest/run -

- (root)# mount --make-slave /mnt/everest/run -

Chroot into the system:

- (root)# chroot --userspec=0:0 /mnt/everest /bin/sh -

Change the shell prompt to avoid confusion:

- (chroot)# export PS1="(chroot) ${PS1}" && source /etc/profile -

Install programs

-

Any programs you wish to install should be installed now.

-

This is because the Linux kernel takes multiple hours to compile.

-

See General Recommendations for ideas. Note that some

-

programs assume the system is installed, so use caution.

+

If this command was run correctly, you shouldn't need to edit any permissions manually.

+

Chrooting into the system mountpoint

+

Although we have a relatively complete root filesystem at this point, many essential programs are still missing. These include the kernel and bootloader. Without these,

+

the system is unable to boot. At this point, we must chroot into the new system. This will allow us to complete the system without booting.

+

Chroot into the new system:

+ (root)# everest-chroot /mnt/everest +

Change the shell prompt to differentiate the two environments:

+ (chroot)# echo "export PS1='(chroot) ${PS1}'" >> /etc/profile && source /etc/profile +

Install packages

+

Any programs you wish to install, such as display servers, login managers, and desktop environments, should be installed now. The kernel can take multiple

+

hours to compile on some hardware.

+

Glacier manages packages on the system, and it allows users to install, or 'merge' their own. It is recommended to get familiar with this system.

+ See: Introduction to Glacier

Install the Linux kernel

-

The most important part of the system, the kernel, is ready to be installed.

-

Install the linux-firmware package, which provides device firmware:

- (chroot)# glacier -f linux-firmware +

The most important part of the system, the kernel, which allows hardware to communicate with software, is ready to be installed.

+

If needed, merge the linux-firmware package, which provides device firmware:

+ (chroot)# gpkg -f world/linux-firmware +

At this stage, you can decide which kernel you want to install. In Everest's package repository, many prebuilt kernels are available, as well as the

+

source code, should you wish to compile your own.

+

Option 1: Custom kernel

+

Compiling a custom kernel is the recommended option for most users, as it allows the most control.

Download the kernel's source tree:

- (chroot)# glacier -f linux -

Change directory to the kernel's source tree:

- (chroot)# cd /usr/src/linux -

Ensure the kernel source tree is clean:

+ (chroot)# gpkg -f world/linux +

The source tree will be located under /usr/src/linux.

+

Inside /usr/src/linux, ensure the source tree is completely clean by running the following:

(chroot)# make mrproper +

The kernel must be configured before it is compiled.

+

Users installing systemd should enable IPv6 in the kernel configuration:

+ KERNEL: Enbable support for IPv6 +
+

Networking support --->

+

      Networking options --->

+

            <*> The IPv6 protocol [CONFIG_IPV6]

+
+

Recommended options are not provided - it is up to you to configure the kernel for your setup.

Configure the kernel:

- (chroot)# ARCH="your-arch-here" make defconfig && make menuconfig -

Compile the kernel:

- (chroot)# make && make modules_install -

Install the kernel:

- (chroot)# make install -

On some systems, an initial RAM filesystem (initramfs)

-

may be needed to ensure proper booting.

-

If you want an initramfs, install dracut:

- (chroot)# glacier -f dracut + (chroot)# export EVEREST_ARCH="$(echo $MACHTYPE)" +

+ (chroot)# ARCH=$EVEREST_ARCH make defconfig +

+ (chroot)# ARCH=$EVEREST_ARCH make menuconfig +

Once the kernel is configured, compile it:

+ (chroot)# make && make modules install +

Option 2: Distribution kernel

+

For those who do not wish to configure a custom kernel, or likewise do not have the time or system resources to do so, a distribution kernel

+

provides a binary kernel. However, there are a couple of pitfalls to this option:

+
    +
  1. Distribution kernels are not fine tuned to your system, they are generic and bloated
  2. +
  3. Distribution kernels are managed by their respective development teams, who must be relied upon for fixes
  4. +
  5. Distribution kernels deprive the user of the experience gained by configuring and compiling a custom kernel
  6. +
+

Everest offers many distribution kernels, some notable ones include:

+
    +
  1. linux-everest
  2. +
  3. linux-zen
  4. +
  5. linux-hardened
  6. +
+

Install a distribution kernel:

+ (chroot)# gpkg -f world/linux-{everest,zen,hardened} +

Build an initramfs

+

Depending on your system, an initramfs may be required. For example, users of distribution kernels will ALWAYS need to build an initramfs,

+

while those who configured and compiled their own will usually not need one.

+

To build an initramfs, you will need dracut. Install dracut:

+ (chroot)# gpkg -f world/dracut

Build an initramfs:

(chroot)# dracut

Configure the system

-

Some components of the system mus be configured.

-

Create /etc/fstab.

-

Enable system services, such as a cron daemon, logger, etc:

- (chroot)# /etc/init.d/{cronie,chronyd,sysklogd} start -

- (chroot)# systemctl enable --now cronie chronyd sysklogd -

Set the timezone:

- (chroot)# ln -svf /usr/share/zoneinfo/Region/City /etc/localtime -

Configure the locale:

- (chroot)# echo "LANG=en_US.UTF-8" > /etc/locale.conf -

Set the system hostname:

- (chroot)# echo "my_hostname" > /etc/hostname -

Other things you might want to configure are:

-

- /etc/doas.conf or /etc/sudoers

-

- /etc/inittab

+

Now that the kernel is installed, various other parts of the system should be configured.

+

Create /etc/fstab, which provides the system with information about mounted filesystems.

+

For example, on a system with a root, /usr, and boot partition, /etc/fstab will look like this:

+ FILE: /etc/fstab +
+

/dev/sda1      /      ext4      noatime      0 1

+

/dev/sda2      /usr      ext4      noatime      0 1

+

/dev/sda3      /boot      vfat      defaults,noatime      0 2

+
+

System services that some may find helpful, such as a cron daemon or logging daemon, should be set up now.

+

On systems using systemd:

+ (chroot)# systemctl enable cronie chronyd sysklogd +

On systems without a service manager, all services under /etc/init.d will be initialied by rcS.

+

The system's timezone is read from /etc/localtime, which is a symlink.

+

In case timezone information is missing from /usr/share/zoneinfo, install it:

+ (chroot)# gpkg -f world/tzdata +

Create /etc/localtime:

+ (chroot)# ln -sv /usr/share/zoneinfo/Region/City /etc/localtime +

The hostname assigns a name to the system. This can be changed at any time.

+

Set the hostname:

+ (chroot)# echo hostname > /etc/hostname +

Or, on systemd:

+ (chroot)# hostnamectl hostname hostname +

A network connection is very important, and there are multiple ways to set one up.

+ WARNING: +
+

Ensure your network is fully set up before proceeding with any other steps. It's better to get it right the first time, rather than trying to fix it later.

+
+

First, ensure the desired network interface is not blocked by rfkill:

+ (chroot)# rfkill +

If the network interface is blocked:

+ (chroot)# rfkill unblock interface +

The network can now be configured.

+

Option 1: Busybox networking

+

Busybox includes networking tools that can quickly configure the network.

+

On a busybox system, the network can be set up with one simple command:

+ (chroot)# ifup +

rcS will also run this command at boot time.

+

Option 2: dhcpcd and wpa_supplicant

+

On systems without Busybox, dhcpcd can be used. This is another very simple solution.

+

Install dhcpcd:

+ (chroot)# gpkg -f world/dhcpcd +

Install wpa_supplicant:

+ (chroot)# gpkg -f world/wpa_supplicant +

rcS will start dhcpcd at boot time.

+

Option 3: NetworkManager

+

NetworkManager is recommended on systems using systemd as the init system.

+

NetworkManager should be fairly easy and straightforward to set up for most.

+

Install NetworkManager:

+ (chroot)# gpkg -f world/networkmanager +

Enable and start NetworkManager:

+ (chroot)# systemctl enable --now NetworkManager +

The /etc/hosts file is used to resolve IP addresses not resolved by the DHCP server.

+ FILE: /etc/hosts +
+

127.0.0.1      localhost

+

::1      localhost

+

127.0.1.1      localdomain hostname

+
+

The root password is extremely important, as it controls access to the root user, the most powerful user on the system.

+

Ensure your chosen root password is strong enough where it cannot be guessed easily.

+

Set the root password:

+ (chroot)# passwd +

If remote access is desired on the system, install sshd:

+ (chroot)# gpkg -f world/sshd +

Using the root account for daily use is not recommended. Create an unprivileged user:

+ (chroot)# adduser USERNAME +

A privilege elevation program is recommended for most users. The most popular choices are sudo and doas, with doas being recommended for most users.

+

Install doas:

+ (chroot)# gpkg -f world/doas +

Create /etc/doas.conf:

+ FILE: /etc/doas.conf +
+

permit USER as root

+

Configure the bootloader

-

One more critical component is needed: the bootloader

-

While any bootloader can be installed, this guide recommends

-

systemd-boot and grub.

-

For systemd-boot/gummiboot:

-

Install the standalone package for systemd-boot if systemd is not installed:

- (chroot)# glacier -f gummiboot -

Install the bootloader:

- (chroot)# bootctl install -

Edit /boot/loader/loader.conf to your liking.

-

Create a boot entry at /boot/loader/entries/everest.conf.

-

For GRUB:

-

Install the GRUB package that corresponds to your system:

- (chroot)# glacier -f grub-bios -

- (chroot)# glacier -f grub-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-mkconfibg -o /boot/grub/grub.cfg -

Finishing the installation

-

Every component of the system has been configured, and we can now

-

boot into it.

-

Exit the chroot environment:

+

Now that the system is correctly configured and the kernel is installed, the final step can proceed - installing the bootloader. Without a bootloader, the system

+

will be unable to load the Linux kernel upon boot. This guide only mentions GRUB, however note that other bootloaders are supported.

+

Merge GRUB for BIOS:

+ (chroot)# gpkg -f world/grub-bios +

Merge GRUB for UEFI:

+ (chroot)# gpkg -f world/grub-efi +

Install GRUB for BIOS:

+ (chroot)# grub-install /dev/sda +

Install GRUB for UEFI:

+ (chroot)# grub-install --target=x86_64-efi --efi-directory=/boot +

For GRUB to work correctly, a configuration file must be created. Create one now:

+ (chroot# grub-mkconfig -o /boot/grub/grub.cfg +

Exit chroot

+

The system has been finished. If everything is done to your liking, you can now exit the chroot environment.

(chroot)# exit -

Unmount all partitions from the system mountpoint:

+

Unmount all mounted partitions:

+ (root)# umount -l /mnt/everest/dev/{shm,pts} +

(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.

-

Post installation

-

A base Everest system is very minimal.

-

Most users will want to configure extra components, such as a window

-

manager, or sound. See: General Recommendations for more info.

- +

Reboot the system:

+ (root)# reboot +

Ensure the installation medium is removed, or else you will not boot into the new system, rather back into the installation medium.

+

Conclusion

+

If all went well, Everest should boot up with no problems.

+

Remove the system image from /:

+ (root)# rm /everestlinux-*.tar.* +

With the installation out of the way, you now have a minimal Linux environment to play around in, and to build around.

+

Thank you for installing Everest Linux!

diff --git a/install.html.new b/install.html.new deleted file mode 100644 index 50f88b6..0000000 --- a/install.html.new +++ /dev/null @@ -1,202 +0,0 @@ - - - -Everest Linux - Install - - - - -
- Home - About - Install - Packages - Downloads - Wiki - Git -
- - -
-

Installation Handbook

-

This guide is the official installation handbook for Everest Linux.

-

Using unofficial guides is not recommended, as they may be outdated, or unreliable. The official guide is located at https://www.everestlinux.org/install.

-

Simply copy and pasting commands from this guide won't cut it, and you'll most likely end up with a broken installation. Ensure you know what each command does.

-

If you need assistance, reach out to us on IRC (libera.chat, #everestlinux) or Discord.

-

Prerequisites

-

The following steps are required to complete an installation:

-
    -
  1. Set up the build environment
  2. -
  3. Download a system image
  4. -
  5. Unpack the system image
  6. -
  7. Change root into the new system
  8. -
  9. Install programs
  10. -
  11. Install the Linux kernel
  12. -
  13. Set up init scripts and services
  14. -
  15. Install the bootloader
  16. -
  17. Reboot the system
  18. -
- Note that Everest is highly flexible. That being said, it is up to you to make modifications yourself. -

Run commands prefixed with (user)$ as an unprivileged user.

-

Run commands prefixed with (root)# as the root user.

-

Run commands prefixed with (chroot)# inside the chroot environment.

-

Set up the environment

-

Everest needs a proper environment set up in order to install correctly.

-

A system mountpoint is where the new system's root (/) will be. Where you put this doesn't matter, as the host system used to build the system won't be included

-

in the final installation. In this example, we will use /mnt/everest.

-

Create a system mountpoint:

- (root)# mkdir -pv /mnt/everest -

A variable pointing to the system mountpoint may be useful in the future, as it will save you a bit of typing.

-

Create a variable for the system mountpoint:

- (root)# SYS_MNT=/mnt/everest -

Partitions must be created on the drive you wish to install Everest to. The typical partition layout on an Everest system may differ from othet distributions.

-

The typical layout is:

-
- - - - - - - - - - - - - - - - - - - - -
Mount pointTypeSuggested size
/mnt/everest/bootEFI system partition (esp)No smaller than 256 MB, no larger than 1 GB
/mnt/everest/usr/usrNo smaller than 25 GB
/mnt/everestRoot filesystemRemainder of the drive
-

Partition the target drive:

- (root)# cfdisk /dev/sdX -

A valid filesystem is required on the drive.

-

Most filesystems should work, however ensure the system has the corresponding package for whatever filesystem you choose.

-

For example, if XFS is used, when installing the system:

- (chroot)# gpkg -f world/xfsprogs -

In this example, Ext4 will be used.

-

Create a filesystem:

- (root)# mkfs.ext4 /dev/root -

- (root)# mkfs.ext4 /dev/usr -

The EFI system partition (esp) must be formatted as FAT32.

- (root)# mkfs.vfat -F32 /dev/boot -

Mount the root partition to the system mountpoint:

- (root)# mount /dev/root /mnt/everest -

Some additional directories may need to be created.

-

Create extra needed directories:

- (root)# mkdir /mnt/everest/boot -

- (root)# mkdir /mnt/everest/usr -

Mount the remaining partitions:

- (root)# mount /dev/boot /mnt/everest/boot -

- (root)# mount /dev/usr /mnt/everest/usr -

Create remaining directories on /usr with mkusrskel:

- (root)# mkusrskel -d /mnt/everest/usr -

Downloading a system image

-

An Everest system image provides an incomplete root filesystem which users can build a system off of. Users should be careful of which

-

image they choose, as switching in the future is trivial, time consuming, and requires rebuilding a lot of packages. It's a lot better

-

to get it right the first time, rather than trying to get it right later.

-

Do some thorough planning to ensure you get the right system image. For instance, ask yourself a few questions, such as:

-
    -
  1. Do I need 32 bit libraries?
  2. -
  3. Will I be using proprietary software that cannot be recompiled?
  4. -
  5. Do I require a specific C library for my hardware setup?
  6. -
  7. Do I want to set up NSA Security Enhanced Linux (SELinux)
  8. -
  9. Do I want an init system other than Busybox's built in init configured out of the box?
  10. -
-

Downloading a system image that is severely out of date is not recommended. Many programs, such as the kernel or SSL library will be vulnerable to attacks.

-

Download a system image with wget:

- (user)$ wget https://git.everestlinux.org/EverestLinux/everest/raw/branch/main/releases/SYSTEM_IMAGE.tar.xz -

Unpacking the system image

-

Now that a system image has been downloaded, we can unpack it.

-

Ensure the system image is inside the system mountpoint, otherwise you may run into trouble.

-

Since a Linux root filesystem is complex, and many different files need to be owned by certain users, or have certain permissions, simply running `tar xf` will

-

result in a broken image. A couple extra flags are needed to preserve these permissions in the unpacked image.

-

Unpack the system image:

- (root)# tar -xpvf SYSTEM_IMAGE --xattrs-include='*.*' --numeric-owner -

If this command was run correctly, you shouldn't need to edit any permissions manually.

-

Chrooting into the system mountpoint

-

Although we have a relatively complete root filesystem at this point, many essential programs are still missing. These include the kernel and bootloader. Without these,

-

the system is unable to boot. At this point, we must chroot into the new system. This will allow us to complete the system without booting.

-

Chroot into the new system:

- (root)# everest-chroot /mnt/everest -

Change the shell prompt to differentiate the two environments:

- (chroot)# echo "export PS1='(chroot) ${PS1}'" >> /etc/profile && source /etc/profile -

Install packages

-

Any programs you wish to install, such as display servers, login managers, and desktop environments, should be installed now. The kernel can take multiple

-

hours to compile on some hardware.

-

Glacier manages packages on the system, and it allows users to install, or 'merge' their own. It is recommended to get familiar with this system.

- See: Introduction to Glacier -

Install the Linux kernel

-

The most important part of the system, the kernel, which allows hardware to communicate with software, is ready to be installed.

-

If needed, merge the linux-firmware package, which provides device firmware:

- (chroot)# gpkg -f world/linux-firmware -

At this stage, you can decide which kernel you want to install. In Everest's package repository, many prebuilt kernels are available, as well as the

-

source code, should you wish to compile your own.

-

Option 1: Custom kernel

-

Compiling a custom kernel is the recommended option for most users, as it allows the most control.

-

Download the kernel's source tree:

- (chroot)# gpkg -f world/linux -

The source tree will be located under /usr/src/linux.

-

Inside /usr/src/linux, ensure the source tree is completely clean by running the following:

- (chroot)# make mrproper -

The kernel must be configured before it is compiled. Recommended options are not provided - it is up to you to configure the kernel for your setup.

-

Configure the kernel:

- (chroot)# export EVEREST_ARCH="$(echo $MACHTYPE)" -

- (chroot)# ARCH=$EVEREST_ARCH make defconfig -

- (chroot)# ARCH=$EVEREST_ARCH make menuconfig -

Once the kernel is configured, compile it:

- (chroot)# make && make modules install -

Option 2: Distribution kernel

-

For those who do not wish to configure a custom kernel, or likewise do not have the time or system resources to do so, a distribution kernel

-

provides a binary kernel. However, there are a couple of pitfalls to this option:

-
    -
  1. Distribution kernels are not fine tuned to your system, they are generic and bloated
  2. -
  3. Distribution kernels are managed by their respective development teams, who must be relied upon for fixes
  4. -
  5. Distribution kernels deprive the user of the experience gained by configuring and compiling a custom kernel
  6. -
-

Everest offers many distribution kernels, some notable ones include:

-
    -
  1. linux-everest
  2. -
  3. linux-zen
  4. -
  5. linux-hardened
  6. -
-

Install a distribution kernel:

- (chroot)# gpkg -f world/linux-{everest,zen,hardened} -

Build an initramfs

-

Depending on your system, an initramfs may be required. For example, users of distribution kernels will ALWAYS need to build an initramfs,

-

while those who configured and compiled their own will usually not need one.

-

To build an initramfs, you will need dracut. Install dracut:

- (chroot)# gpkg -f world/dracut -

Build an initramfs:

- (chroot)# dracut -

Configure the system

-

Now that the kernel is installed, various other parts of the system should be configured.

-

Create /etc/fstab, which provides the system with information about mounted filesystems.

-

For example, on a system with a root, /usr, and boot partition, /etc/fstab will look like this:

- FILE: /etc/fstab -
-

/dev/sda1 / ext4 noatime 0 1

-

/dev/sda2 /usr ext4 noatime 0 1

-

/dev/sda3 /boot vfat defaults,noatime 0 2 -

-

System services that some may find helpful, such as a cron daemon or logging daemon, should be set up now.

-

On systems using systemd:

- (chroot)# systemctl enable cronie chronyd sysklogd -

On systems without a service manager, all services under /etc/init.d will be initialied by rcS.

-

The system's timezone is read from /etc/localtime, which is a symlink.

-

In case timezone information is missing from /usr/share/zoneinfo, install it:

- (chroot)# gpkg -f world/tzdata -

Create /etc/localtime:

- (chroot)# ln -sv /usr/share/zoneinfo/Region/City /etc/localtime - - diff --git a/install.html.old b/install.html.old new file mode 100644 index 0000000..d902fdd --- /dev/null +++ b/install.html.old @@ -0,0 +1,186 @@ + + + +Everest Linux - Install + + + + +
+ Home + About + Install + Packages + Downloads + Wiki + Git +
+ + +
+

Installation Handbook

+

This is the official installation guide for Everest Linux.

+

Using unofficial guides is not recommended as they may be

+

out of date.

+

Simply following this guide blindly is a great way to end up

+

with a broken installation. Ensure you have a rough idea of

+

what each command does.

+

If you need assistance, reach out on IRC (#everestlinux) or Discord.

+

Prerequisites

+

The following steps will be used to complete the installation:

+

- Set up the environment

+

- Download the Everest Linux system image

+

- Unpack the system image

+

- Chroot into the new system

+

- Install desired programs

+

- Install the Linux kernel +

- Set up init scripts/services

+

- Reboot the system

+ Note: Everest is highly flexible. + If you are changing anything in this guide, it is assumed + you know exactly what to do. +

Run (user)$ commands as an unprivileged user.

+

Run (root)# commands as the root user.

+

Run (chroot)# commands inside the chroot environment.

+

Set up the environment

+

Our environment needs to be set up correctly for the installation.

+

Create the system mountpoint:

+ (root)# mkdir -pv /mnt/everest +

Although it may not be used, assign the system mountpoint a variable:

+ (root)# export SYS_MNT=/mnt/everest +

Partition your drive:

+ (root)# cfdisk /dev/sdX +

Mount the root partition to the system mountpoint:

+ (root)# mount /dev/sdX /mnt/everest +

If needed, create the boot directory:

+ (root)# mkdir -pv /mnt/everest/boot +

Mount the boot partition:

+ (root)# mount /dev/sdX /mnt/everest/boot +

Downloading the Everest system image

+

An Everest system image is an incomplete root filesystem, which

+

provides a strong base to build off of

+

Not all system images are the same. Some differences are:

+

- The init system

+

- The standard C library

+

- The architecture

+

- SELinux support

+

- Multilib support

+

Ensure you download the image you want. Migrating in the future

+

is not officially supported or even recommended.

+

Download an image with wget:

+ (user)$ wget SYSTEM_IMAGE_LINK +

Unpacking the system image

+

The system image can now be unpacked.

+

Ensure the system image is located under the system mountpoint.

+

Note that a simple tar -xvf will cause errors with

+

permissions. Therefore, a few extra flags are needed.

+

Unpack the system image:

+ (root)# tar -xpvf SYSTEM_IMAGE --xattrs-include='*.*' --numeric-owner +

This will ensure all file ownership is compliant.

+

Chrooting into the new installation

+

The system is in a partially working state.

+

If we were to call it a day and reboot now, it wouldn't be possible.

+

Many critical parts of the system are missing, including the

+

bootloader and kernel. Chrooting allows us to make modifications

+

to the target system, without actually booting into it.

+

Before chrooting, additional filesystems must be mounted.

+

Mount these filesystems:

+ (root)# mount --types proc /proc /mnt/everest/proc +

+ (root)# mount --rbind /sys /mnt/everest/sys +

+ (root)# mount --make-rslave /mnt/everest/sys +

+ (root)# mount --rbind /dev/ /mnt/everest/dev +

+ (root)# mount --make-rslave /mnt/everest/dev +

+ (root)# mount --bind /run /mnt/everest/run +

+ (root)# mount --make-slave /mnt/everest/run +

Chroot into the system:

+ (root)# chroot --userspec=0:0 /mnt/everest /bin/sh +

Change the shell prompt to avoid confusion:

+ (chroot)# export PS1="(chroot) ${PS1}" && source /etc/profile +

Install programs

+

Any programs you wish to install should be installed now.

+

This is because the Linux kernel takes multiple hours to compile.

+

See General Recommendations for ideas. Note that some

+

programs assume the system is installed, so use caution.

+

Install the Linux kernel

+

The most important part of the system, the kernel, is ready to be installed.

+

Install the linux-firmware package, which provides device firmware:

+ (chroot)# glacier -f linux-firmware +

Download the kernel's source tree:

+ (chroot)# glacier -f linux +

Change directory to the kernel's source tree:

+ (chroot)# cd /usr/src/linux +

Ensure the kernel source tree is clean:

+ (chroot)# make mrproper +

Configure the kernel:

+ (chroot)# ARCH="your-arch-here" make defconfig && make menuconfig +

Compile the kernel:

+ (chroot)# make && make modules_install +

Install the kernel:

+ (chroot)# make install +

On some systems, an initial RAM filesystem (initramfs)

+

may be needed to ensure proper booting.

+

If you want an initramfs, install dracut:

+ (chroot)# glacier -f dracut +

Build an initramfs:

+ (chroot)# dracut +

Configure the system

+

Some components of the system mus be configured.

+

Create /etc/fstab.

+

Enable system services, such as a cron daemon, logger, etc:

+ (chroot)# /etc/init.d/{cronie,chronyd,sysklogd} start +

+ (chroot)# systemctl enable --now cronie chronyd sysklogd +

Set the timezone:

+ (chroot)# ln -svf /usr/share/zoneinfo/Region/City /etc/localtime +

Configure the locale:

+ (chroot)# echo "LANG=en_US.UTF-8" > /etc/locale.conf +

Set the system hostname:

+ (chroot)# echo "my_hostname" > /etc/hostname +

Other things you might want to configure are:

+

- /etc/doas.conf or /etc/sudoers

+

- /etc/inittab

+

Configure the bootloader

+

One more critical component is needed: the bootloader

+

While any bootloader can be installed, this guide recommends

+

systemd-boot and grub.

+

For systemd-boot/gummiboot:

+

Install the standalone package for systemd-boot if systemd is not installed:

+ (chroot)# glacier -f gummiboot +

Install the bootloader:

+ (chroot)# bootctl install +

Edit /boot/loader/loader.conf to your liking.

+

Create a boot entry at /boot/loader/entries/everest.conf.

+

For GRUB:

+

Install the GRUB package that corresponds to your system:

+ (chroot)# glacier -f grub-bios +

+ (chroot)# glacier -f grub-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-mkconfibg -o /boot/grub/grub.cfg +

Finishing the installation

+

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 the system mountpoint:

+ (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.

+

Post installation

+

A base Everest system is very minimal.

+

Most users will want to configure extra components, such as a window

+

manager, or sound. See: General Recommendations for more info.

+ +