In this example, Ext4 will be used.
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 arduous, time consuming, and requires rebuilding a lot of packages.
An Everest system image provides an incomplete root filesystem which users can build a system off of. This includes system programs, libraries, Glacier, among others. Users should be careful of which image they choose, as switching in the future is arduous, 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:
-
Make sure you're happy with the system image you choose. While migrating in the future is possible, it requires rebuilding the majority of the system.
+
NOTE:
+
+
Make sure you're happy with the system image you choose. While migrating in the future is possible, it requires rebuilding the majority of the system, takes a substantial amount of time, and may present other issues.
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:
@@ -151,30 +141,32 @@
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.
+
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, as the proper permissions are not carried over. 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.
-
In case permissions were changed, you can use the 'prep' command from everest-build-tools.
+
In case permissions were changed, you can use the prep command from everest-build-tools.
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.
+
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's build process without booting into it.
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
+
(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.
WIKI: Introduction to Glacier
+
Glacier may not function correctly if the package database has not been downloaded. If gpkg outputs the following error: [x] Local package database does not exist., run:
+
(chroot)# glacier-update-pkgdb
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
+
(chroot)# gpkg -f 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.
+
Compiling a custom kernel is the recommended option for most users, as it allows the most control over what exactly is installed on your system.
Download the kernel's source tree:
-
(chroot)# gpkg -f world/linux
+
(chroot)# gpkg -f 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
@@ -183,8 +175,8 @@
KERNEL: Enbable support for IPv6
Networking support --->
-
      Networking options --->
-
            <*> The IPv6 protocol [CONFIG_IPV6]
+
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:
@@ -222,9 +214,9 @@
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
+
/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:
@@ -241,8 +233,8 @@
Or, on systemd:
(chroot)# hostnamectl hostname hostname
A network connection is very important, and there are multiple ways to set one up.
-
WARNING:
-
+
CAUTION:
+
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:
@@ -272,9 +264,9 @@
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
+
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.
@@ -295,12 +287,45 @@
Configure the bootloader
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
+
The GRUB package for certain system profiles compiles BIOS AND UEFI support. If you wish to remove UEFI support, you will have to manually patch the package file.
+
Unless you are using some obscure system profile, or simply want to make your system as small as possible, you definitely will not have to worry about this.
+
WIKI: Introduction to Glacier
+
Merge grub:
+
(chroot)# gpkg -f grub
Install GRUB for BIOS:
(chroot)# grub-install /dev/sda
+
If configuring GRUB to boot with UEFI, a few extra things need to be configured.
+
The following kernel options need to be configured in order to support UEFI:
+
KERNEL: Enable UEFI support
+
+
Processor type and features --->
+
[*] EFI runtime service support
+
+
-*- Enable the block layer --->
+
Partition Types --->
+
[ /*] Advanced partition selection
+
[*] EFI GUID Partition support
+
+
Device Drivers --->
+
Firmware Drivers --->
+
[*] Mark VGA/VBE/EFI FB as generic system framebuffer
+
Graphics Support --->
+
<*> Direct Rendering Manager (Xfree86 4.1.0 and higher DRI support) --->
+
[*] Enable legacy fbdev support for your modsetting driver
+
<*> Simple framebuffer driver
+
Frame buffer Devices --->
+
<*> Support for frame buffer devices --->
+
Console display driver support --->
+
-*- Framebuffer Console support
+
File systems --->
+
DOS/FAT/EXFAT/NT Filesystems --->
+
<*/M> VFAT (Windows-95) fs support
+
Psuedo filesystems --->
+
<*/M> EFI Variable filesystem
+
-*- Native language support --->
+
<*/M> Codepage 437 (United States, Canada)
+
<*/M> NLS ISO 8859-1 (Latin 1; Western European Languages)
+
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:
@@ -314,7 +339,7 @@
(root)# umount -R /mnt/everest
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.
+
Ensure the newly installed bootloader is first to boot, otherwise you will end up in your old system again. If you used a live USB to install Everest, make sure you remove it before rebooting.
Conclusion
If all went well, Everest should boot up with no problems.
Remove the system image from /: