everest-web/install.html

196 lines
13 KiB
HTML
Raw Normal View History

2022-06-21 13:49:11 -04:00
<!DOCTYPE html>
<html>
<head>
2022-06-28 18:44:37 -04:00
<title>Everest Linux - Installation Handbook</title>
2022-06-21 13:49:11 -04:00
<link type="text/css" rel="stylesheet" href="css/everest.css"/>
</head>
<body>
2022-06-28 18:44:37 -04:00
<ul>
<li><a href="main.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>
</ul>
<img src="img/banner-hb.jpg" alt="banner-hb"/>
2022-06-21 13:49:11 -04:00
<h1>Installation Handbook</h1>
<p>This guide goes into detail on how to install Everest.</p>
<h2>Prerequisites</h2>
<p>There are 2 officially supported ways of installing Everest, systemd/glibc/GNU or sysv/musl/busybox. This guide covers the musl/busybox installation as it recieves the most support and is the intended way. For the GNU installation, it may be a good idea to read the Linux from Scratch wiki.</p>
<p></p>
<p>For highly customized installations (such as a custom init), it is recommended to know exactly what you're doing.</p>
<p></p>
<p>Everest may be installed through 2 methods:</p>
<p> - ISO: can be flashed to a usb and booted</p>
<p> - rootfs tarball (RECOMMENDED): unpacked to a directory (usually /mnt) and instaled through an existing distribution.</p>
<p></p>
<p> Note that no matter what option you choose, you will need the rootfs tarball.</p>
<p></p>
2022-06-28 18:44:37 -04:00
<p>If you wish to install Everest Hike instead of Everest Summit, you can run <code><mark>setup-everest</mark></code>.</p>
<p>Commands prefixed with <code><mark>$</mark></code> should be run as the normal user.</p>
<p>Commands prefixed with <code><mark>#</mark></code> should be run as the root user.</p>
<p>Commands prefixed with <code><mark>(chroot)$</mark></code> should be run as the normal user inside the chroot environment.</p>
<p>Commands prefixed with <code><mark>(chroot)#</mark></code> should be run as the root user inside the chroot environment.</p>
2022-06-21 13:49:11 -04:00
<p></p>
<h2>First Steps</h2>
<p>Create a disk partition for your root filesystem, a boot partition, and any other partitions you may want to make.</p>
<p></p>
<p>Create valid filesystems on the partitions (FAT32 for boot, and Ext4/Btrfs/XFS/ZFS on root).</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># mkfs.vfat -F32 /dev/boot</mark></code></p>
<p><code><mark># mkfs.ext4 /dev/root</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Mount the newly created root partition to /mnt/everest.</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># mkdir /mnt/everest</mark></code></p>
<p><code><mark># mount /dev/root /mnt/everest</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Create the "EV" variable, which will save some typing down the road.</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># export EV=/mnt/everest</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Ensure the variable was created correctly. It will be <strong>very</strong> important to check this multiple times during installation.</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># echo $EV</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<h2>Unpacking Tarball</h2>
<p>To install Everest, you will need the rootfs tarball containing the necessary toolchain.</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># wget https://github.com/everest-linux/everest/releases/download/vX.X.X-systemd-rc/everestlinux-summit-X.X.X-systemd-rc.tar.xz</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p>To unpack the tarball:</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># tar xpvf everestlinux-summit-X.X.X-systemd.tar.xz --xattrs-include='*.*' --numeric-owner</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Enter the chroot environment. This will allow you to install system packages.</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># chroot "$EV" /usr/bin/env -i \</mark></code></p>
<p><code><mark> HOME=/root \</mark></code></p>
<p><code><mark> TERM="$TERM" \</mark></code></p>
<p><code><mark> PS1='[everest-chroot] \u:\w \$ ' \</mark></code></p>
<p><code><mark> PATH=/usr/bin:/usr/sbin \</mark></code></p>
<p><code><mark> /bin/bash --login</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<h2>Installing System Packages</h2>
<p>Now that we are inside the chroot environment, we can install packages to the system.</p>
<p>Before we start, creating <code>/etc/make.conf</code> is recommended. This is so you can specify extra makeflags, most notably, the <code>-jX</code> flag will allow <code>make</code> to utilize more than 1 core.</p>
<p><code># /etc/make.conf</code></p>
<p>
<p><code>MAKEFLAGS=-jX</code></p>
<p></p>
<p>The following symbols will be used to describe packages</p>
<p> -(!) Vital system package, <strong>do not omit.</strong></p>
<p> -(S) Source package</p>
<p> -(B) Binary package</p>
<p> -(L) Long installation time</p>
<p></p>
<p><strong>(!) (B) Glacier</strong></p>
<p>This package contains the Glacier package manager, which manages installed packages on the system. It uses wget and tar as its backens, both of which are included in the tarball.</p>
2022-06-28 18:44:37 -04:00
<p><strong>To install Glacier:</strong><code><mark>(chroot)# rm -rf /tmp/glacier && cd /tmp && git clone https://github.com/everest-linux/glacier &&
cd glacier/install && chmod +x INSTALL-GLACIER.sh && sudo ./INSTALL-GLACIER.sh || doas ./INSTALL-GLACIER.sh</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p>Note that Glacier cannot manage itself, so you will need to update every month or so.</p>
<p></p>
<p><strong>(S) Man-pages</strong></p>
<p>This package contains 2,000+ manpages for the system.</p>
<p><strong>To install man-pages:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -f</mark></code></p>
<p><code><mark>[ ? ] man-pages</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p><strong>(!) (B) Iana-Etc</strong></p>
<p>This package contains vital networking protocols.</p>
<p><strong>To install Iana-Etc:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -f</mark></code></p>
<p><code><mark>[ ? ] iana-etc</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p><strong>(!) (S) libgcc</strong></p>
<p>This package contains libraries for GCC.</p>
<p><strong>To install libgcc:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -f</mark></code></p>
<p><code><mark>[ ? ] libgcc</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p><strong>(!) (S) (L) musl</strong></p>
<p>This package contains the musl standard C library.</p>
<p><strong>To install musl:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -f</mark></code></p>
<p><code><mark>[ ? ] musl</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p><strong>(!) (S) busybox</strong></p>
<p>This package contains common UNIX utilities in a single binary.</p>
<p><strong>To install busybox:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -</mark>f</code></p>
<p><code><mark>[ ? ] busybox<mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p><strong>(!) (S) (L) vim</strong></p>
<p>This package contains the Vim text editor.</p>
<p><strong>To install vim:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -f</mark></code></p>
<p><code><mark>[ ? ] vim</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<p><strong>(!) (S) (L) Linux</strong></p>
<p>This package contains the Linux kernel</p>
<p><i>You will need to cache this package if you wish to build a custom kernel. Prebuilt kernels are available under the names 'linux', 'linux-zen', 'linux-lts', etc. For a custom configuration, the package is called 'linux-custom'.</i></p>
<p><strong>To install a prebuilt kernel:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -f</mark></code></p>
<p><code><mark>[ ? ] linux-{zen,lts,hardened,rt}</mark></code></p>
2022-06-21 13:49:11 -04:00
<p><strong>To install and configure a custom kernel:</strong></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# glacier -c</mark></code></p>
<p><code><mark>[ ? ] linux-custom</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Change directory into the Glacier cache and move the package to /tmp</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# cd /var/cache/glacier && mv linux-custom.tar.gz /tmp</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Unpack the package</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# tar xpvf linux-custom.tar.gz</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Ensure the kernel's source tree is clean</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# make mrproper</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Make desired configurations to the kernel</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# make menuconfig<mark></code></p>
2022-06-21 13:49:11 -04:00
<p><i>If using systemd as the init system, 'The IPv6 protocol [CONFIG_IPV6] is highly recommended.</i></p>
<p><code>Networking support ---></code></p>
<p><code>&nbsp&nbsp&nbsp&nbsp Networking options ---></code></p>
<p><code>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <*> The IPv6 protocol [CONFIG_IPV6]</code></p>
<p><a href="https://linuxfromscratch.org/lfs/view/stable-systemd/chapter10/kernel.html">See this page from Linux From Scratch on other recommended kernel customizations.</a></p>
<p>Compile the kernel</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# make</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>If you enabled support for modules, compile them</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# make modules_install</mark></code></p>
2022-06-21 13:49:11 -04:00
<p><i>If you intend on dual booting and are using an external boot partition, run the following command from <strong>OUTSIDE THE CHROOT ENVIRONMENT</strong></i></p>
2022-06-28 18:44:37 -04:00
<p><code><mark># mount --bind /boot /mnt/ev/boot</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Change the kernel image</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# cp -iv arch/x86/boot/bzImage /boot/vmlinuz-X.XX.X</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Install the system map file</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# cp -iv System.map /boot/System.map-X.XX.X</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Save your kernel's configuration</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# cp -iv .config/boot/config-X.XX.X</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Install kernel documentation</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# install -d /usr/share/doc/linux-X.XX.X</mark></code></p>
<p><code><mark>(chroot)# cp -r Documentation/* /usr/share/doc/linux-X.XX.X</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>If you wish to retain the kernel's source tree</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>(chroot)# chown -R 0:0 /path/to/linux-X.XX.X</mark></code></p>
2022-06-21 13:49:11 -04:00
<p><i>Warning: Some documentation for the kernel recommends symlinking /usr/src/linux to the kernel source tree, however this is specific to 2.6 series kernels and <strong>MUST NOT BE CREATED</strong> as it can cause conflics with Glacier.</i></p>
<p><i>Warning: The headers in /usr/include should <strong>ALWAYS</strong> be the ones against which your standard C library was compiled. They should <strong>NEVER</strong> be replaced by either the raw kernel headers or the sanitized headers of any other kernel.</i></p>
<p>Create /etc/modprobe.d/usb.conf, which will ensure USB modules are started in the correct order</p>
2022-06-28 18:44:37 -04:00
<p><code><mark>install -v -m755 -d /etc/modprobe.d</mark></code></p>
<p><code><mark>cat > /etc/modprobe.d/usb.conf</mark></code></p>
<p><code><mark># Begin /etc/modprobe.d/usb.conf << "EOF"</mark></code></p>
2022-06-21 13:49:11 -04:00
<p><code>&nbsp</code></p>
2022-06-28 18:44:37 -04:00
<p><code><mark>install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true</mark></code></p>
<p><code><mark>install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true</mark></code></p>
2022-06-21 13:49:11 -04:00
<p><code>&nbsp</code></p>
2022-06-28 18:44:37 -04:00
<p><code><mark># End /etc/modprobe.d/usb.conf</mark></code></p>
<p><code><mark>EOF</mark></code></p>
2022-06-21 13:49:11 -04:00
<p></p>
<h2>Configuring the System</h2>
<p>Now we must configure the system so it will boot correctly</p>
2022-06-28 18:44:37 -04:00
<p>As a recommendation for easy access to the root account, installing <code><mark>sudo</mark></code> or <code><mark>doas</mark></code> is highly recommended, as it will remove the need to log in as root with <code><mark>su</mark></code> and will only require invoking <code><mark>sudo</mark></code> or <code><mark>doas</mark></code>.
<p>In the case of <code><mark>sudo</mark></code>, the following line will need to be uncommented from <code><mark>/etc/sudoers</mark></code></p>
<p><code><mark>%wheel ALL=(ALL) ALL</mark></code></p>
<p>In the case of <code><mark>doas</mark></code>, <code><mark>/etc/doas.conf</mark></code> will need to be created, containing the following:</p>
<p><code><mark>permit :wheel</mark></code></p>
<p>Create <code><mark>/etc/hostname</mark></code> and enter the desired hostname for the system</p>
<p>Create <code><mark>/etc/hosts</mark></code> and enter the following</p>
<p><code><mark>127.0.0.1 localhost</mark></code></p>
<p><code><mark>::1 localhost</mark></code></p>
<p><code><mark>127.0.1.1 localdomain hostname</mark></code></p>
<p>Install a bootloader capable of loading a Linux system (such as <code><mark>grub</mark></code>)</p>
<p>In the case of <code><mark>grub</mark></code>, install <code><mark>os-prober</mark></code> and <code><mark>efibootmgr</mark></code> (for UEFI systems), then install either <code><mark>grub-bios</mark><code>, <code><mark>grub-uefi</mark></code>, <code><mark>lib32-grub-bios</mark></code>, or <code><mark>lib32-grub-uefi</mark></code>, then run the following commands to install: </p>
<p><i>Warning: Highly customized configurations may cause the bootloader to break. It is recommended to edit </i><code><mark>/etc/make.conf</mark></code><i> before building this package.</i></p>
<p><code><mark># grub-install /dev/sdX (BIOS/MBR)</mark></code></p>
<p><code><mark># grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub (UEFI)</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Create the GRUB configuration file</p>
2022-06-28 18:44:37 -04:00
<p><code><mark># grub-mkconfig -o /boot/grub/grub.cfg</mark></code></p>
2022-06-21 13:49:11 -04:00
<p>Once the bootloader has been installed, power off the system.</p>
<p></p>
<h2>The End</h2>
2022-06-28 18:44:37 -04:00
<p>Power on the system. If all went well, the GRUB boot screen should appear, followed by a shell prompt.</p>
<p>Congratgulations! Everest has successfully been installed.</p>
<p>Most users will want to configure sound, a graphical environment, or multiple users. See post installation recommendations for details.</p>