User:Torxed

From ArchWiki
Jump to navigation Jump to search

Tango-emblem-important.pngThis article is not officially supported.Tango-emblem-important.png

The Arch Linux community does not offer support for the information contained in this page; for installation procedures, the Installation guide is the only officially supported document. The content below is mainly maintained by User:Torxed, who last reviewed it on 21 August 2020‎, and it may be out of date or inaccurate.

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: This documentation is in preparation of possibly adding archinstall to the official Arch Linux ISO as an optional addition. (Discuss in User talk:Torxed#)

This document will explain the guided installation steps for for installing Arch Linux. The guided installation is a script for guiding you through the Installation guide using the archinstall[1] library. For alternative means of installation, see Category:Installation process.

Note: As the installation process needs to retrieve packages from a remote repository, this guide assumes a working internet connection is available.
Warning: There are some limitations of the guided installation. Two main ones are that Systemd-boot is used over alternatives and thus doesn't support non-EFI systems, and the guided installation can only use up an entire drive space (custom partitioning is not available yet). For a more flexible installation experience, please follow the Installation guide for manual steps.

Prerequisites

This document assumes that you are using an official installation image. For other means of execution, see build instructions below.

Installation steps

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Change the github-link to the GitLab once all the features are ported and synced over. (Discuss in User talk:Torxed#)
Note: You are strongly encouraged to follow the manual Installation guide. It will teach you more than any scripted installation ever will. This guided installation is given as an option to new users who would like to try out Arch Linux but lower the barrier to entry. Issues and questions should be asked on the official repository at github

During the guided installation, you will be prompted several questions. These questions or steps will be described in detail here. The examples below assumes you have two disk devices on your system, /dev/sda and /dev/sdb. In reality it does not matter to much, but it will keep the examples below simpler to explain.

Selecting a drive

The first step of the guided installation will ask you to select a drive to install to. It will look something similar to

0: /dev/loop0 (('570.3M', '/run/archiso/bootmnt/arch/x86_64/airootfs.sfs', None))
1: /dev/sda (('250G', '/dev/sda', None))
2: /dev/sdb (('512G', '/dev/sdb', None))
Select one of the above disks (by number or full path):

Here, some limited information about the drives are given, such as size and physical location. You can select the drive with a number (1 would select /dev/sda) or with the full path by writing /dev/sda which would select /dev/sda naturally.

Warning: The guided installer will use up all disk space on the selected drive (/dev/sda in this example)

Disk encryption

Next step is optional and will allow you to select (or skip) a password for the disk encryption. We strongly recommend you enable it by specifying a password. But if you know the risks of not using disk encryption, you could leave the password blank which will skip encrypting the drive all together.

Enter disk encryption password (leave blank for no encryption):
And one more time for verification:
Note: The password is promptless, so you will not see any input while writing

The disk encryption uses luks2 with argon2. The default options for luks2 are a key-size of 512, the default hash algorithm used is sha512 and the iter-time option is 10000 by default.

Desired hostname

This step is optional, but might help identify your machine on the network later on. Setting a hostname will modify /etc/hostname on the installed machine.

Desired hostname for the installation:

The default will be Archinstall if left empty.

Root password

This next step is optional with a caveat. By default the Arch Linux root account is disabled by the /etc/shadow entry for root being defined as root:*:. You are encouraged to not set a password and thus leaving this step empty.

Warning: Skipping this step will force the next user in User:Torxed#Additional_users_to_install to become mandatory and give the first user sudo permissions.
Enter root password (leave blank to leave root disabled):
And one more time for verification:

Additional users to install

This step is optional only if a root password was set in the previous step. Otherwise this step becomes mandatory followed by sudo privileges being given to the first user created.

Any additional users to install (leave blank for no users):
Password for user <username>:
Enter password again for verification:
Note: This step will repeat until a blank entry is given to the first question

AUR Support

Warning: This step is fully optional but use AUR at your own risk as these packages are not officially supported and therefore can contain bugs, malicious code and/or break your system.

Arch_User_Repository can give you additional features that are outside of the officially supported package database. For new users this can be tricky to use intially. So in an attempt to ease the barrier to entry here as well, yayAUR can be optionally enabled by writing yes, but the default is to skip this step. yay share common syntax with pacman and can install packages from the AUR Package Database.

Would you like AUR support? (leave blank for no):
 - AUR support provided by yay (https//aur.archlinux.org/packages/yay/)

Choosing a profile to install

Machines can have many use cases. archinstall ships a number of pre-configured profiles that you can choose from. Some examples of profiles include:

  • desktop
    A new-user friendly desktop environment based on gnome, most similar to other distributions.
  • kde
    A minimal graphical environment based on the kde desktop environment (Will not install kde-applications).
  • gnome
    A minimal graphical environment based on the gnome desktop environment (Will not install gnome-extra).
  • webserver
    A basic web-server based on nginx.
  • docker
    A minimal Arch Linux machine with docker pre-installed.
  • database
    A minimal Arch Linux machine with postgresql installed and pre-configured.
Note: This step is fully optional, but might help new users get familiar with Arch Linux by using a traditional desktop experience.
Any particular profile you want to install:

Additional packages

Optionally you can supply a list (space separated) of packages to install after the base-installation is complete. These packages will be queued and installed as soon as the base operating system is installed.

Additional packages aside from base (space separated):
Note: AUR packages can not be supplied here. This step is intended for packages only.
Warning: After selecting or opting out of additional packages, the installation will begin. You will have 5 seconds to abort if a step was miss-configured

Limitations

This installer is by no means a complete installation experience. The only way you will ever achieve a fully desirable installation experience is by manually installing all your needs. This installer is only meant to ease the barrier-to-entry for new users or quickly help set up machines for experienced users who can troubleshoot on their own.

Note: There's a difference between the guided installation and the library archinstall (github). The library does contain more features than shipped in the guided installer. Keep this in mind.

The main limitations of the guided archinstall installer are:

  • Guided installation does not support custom formatting layouts of drives (It will use the entire selected disk by default. The library does support it, but the guided installation does not).
  • Relies on Systemd-boot as it's bootloader and not legacy-supporting alternatives like grub.
  • Disk encryption parameters are not configurable outside of setting the password.
  • Lack certain accessibility features (For among other things: color blindness, hearing impairment etc).
  • Current and new profiles are constantly under development. Certain profiles might break unexpectedly as they are prioritized down if other bugs/features are escalated.

Building ISO

The build process for the official ISO containing archinstall uses the binary archinstall package. There are other packages such as python-archinstall that installs the source library, but it has python as a dependency. The difference is that archinstall is a pre-compiled stand-alone binary of the python-archinstall library and thus doesn't require the entire Python runtime compiler to execute. On the other hand that limits the creativity and flexibility of creating a custom ISO image.

So odds are for your project, you'll need the python-archinstall package or call pip install archinstall at some point during the ISO build process.

Setup a archiso template

First step is to choose and copy a base template, you can follow the official documentation for archiso. But serving as a basic example would be to copy the releng configuration:

$ mkdir -p ~/archiso
$ cp -r /usr/share/archiso/configs/releng/* ~/archiso/
Note: The rest of these instructions will be based on the releng configuration. Other templates might vary greatly.

Adding a custom mirror

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: This step will be removed once packages are uploaded to AUR or Packages (Discuss in User talk:Torxed#)

This step is also covered in the Custom Local Repository, but for development versions of archinstall, adding the https://archlinux.life mirror will enable the latest untested features. For this example, we will use a custom mirror.

Adding a custom remote mirror can be done by updating the build environments ~/archiso/pacman.conf.

~/archiso/pacman.conf
[archlife]
Server = https://archlinux.life/$repo/os/$arch
SigLevel = Optional TrustAll

Adding required packages

As mentioned in the introduction to this section, the official ISO contains the archinstall binary package. But for this example, we will choose python-archinstall.

~/archiso/packages.x86_64
python-archinstall

Setting up auto-launch

We can create a airootfs/etc/skel/.zprofile in the ~/archiso build environment to setup automatic command execution as long as the default shell is zsh. The function of airootfs is described in Archiso#Adding_files_to_image.

~/archiso/airootfs/etc/skel/.zprofile
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && sh -c "python -m archinstall guided"

This will automatically launch python in modular mode, loading the module archinstall on the virtual terminal 1 during the boot of the ISO. In this mode, it will start a guided installation of archinstall.