User:Torxed
archinstall is a tool for aiding in installing Arch Linux. The tool is primarily aimed towards new users wanting to try out Arch Linux by going through a guided installation process.
The goal of this tool is to install a lightweight reference installation of Arch Linux and follow the core value of Keeping It Simple. For a more feature rich installation, please follow the official Installation guide.
Prerequisites
Acquire an installation image
Visit the Download page and, depending on how you want to boot, acquire the ISO file or a netboot image, and the respective GnuPG signature.
Verify signature
It is recommended to verify the image signature before use, especially when downloading from an HTTP mirror, where downloads are generally prone to be intercepted to serve malicious images.
On a system with GnuPG installed, do this by downloading the PGP signature (under Checksums in the Download page) to the ISO directory, and verifying it with:
$ gpg --keyserver-options auto-key-retrieve --verify archlinux-version-x86_64.iso.sig
Alternatively, from an existing Arch Linux installation run:
$ pacman-key -v archlinux-version-x86_64.iso.sig
- The signature itself could be manipulated if it is downloaded from a mirror site, instead of from archlinux.org as above. In this case, ensure that the public key, which is used to decode the signature, is signed by another, trustworthy key. The
gpg
command will output the fingerprint of the public key. - Another method to verify the authenticity of the signature is to ensure that the public key's fingerprint is identical to the key fingerprint of the Arch Linux developer who signed the ISO-file. See Wikipedia:Public-key cryptography for more information on the public-key process to authenticate keys.
Prepare an installation medium
The installation image can be supplied to the target machine via a USB flash drive, an optical disc or a network with PXE: follow the appropriate article to prepare yourself an installation medium from the chosen image.
Boot the live environment
- Point the current boot device to the one which has the Arch Linux installation medium. Typically it is achieved by pressing a key during the POST phase, as indicated on the splash screen. Refer to your motherboard's manual for details.
- When the installation medium's boot loader menu appears, select Arch Linux install medium and press
Enter
to enter the installation environment.Tip: The installation image uses systemd-boot for booting in UEFI mode and syslinux for booting in BIOS mode. See README.bootparams for a list of boot parameters. - You will be logged in on the first virtual console as the root user, and presented with a Zsh shell prompt.
To switch to a different console—for example, to view this guide with Lynx alongside the installation—use the Alt+arrow
shortcut. To edit configuration files, mcedit(1), nano and vim are available. See packages.x86_64 for a list of the packages included in the installation medium.
Verify the boot mode
To verify the boot mode, list the efivars directory:
# ls /sys/firmware/efi/efivars
If the command shows the directory without error, then the system is booted in UEFI mode. If the directory does not exist, the system may be booted in BIOS (or CSM) mode. If the system did not boot in the mode you desired, refer to your motherboard's manual.
Connect to the internet
To set up a network connection in the live environment, go through the following steps:
- Ensure your network interface is listed and enabled, for example with ip-link(8):
# ip link
- For wireless, make sure the wireless card is not blocked with rfkill.
- Connect to the network:
- Ethernet—plug in the cable.
- Wi-Fi—authenticate to the wireless network using iwctl.
- Configure your network connection:
- DHCP: dynamic IP address and DNS server assignment (provided by systemd-networkd and systemd-resolved) should work out of the box for wired and wireless network interfaces.
- Static IP address: follow Network configuration#Static IP address.
- The connection may be verified with ping:
# ping archlinux.org
Running the installer
During the guided installation, you will be prompted several questions. These questions or steps will be described in detail here. The examples below will install Arch Linux on one of two hard-drives. Running the installer in a safe and guided manner can be done by running the following command:
# archinstall
Selecting keyboard layout
The first step of the guided installation is to select a keyboard layout. This keyboard layout will be set both in the live medium as well as the installed system.
Select one of the above keyboard languages (by number or full name): us
?
and hitting enter. The search menu will appear for additional layouts.Selecting which mirror region to use
This step allows you to specify which country's mirrors to use. Archinstall will fetch any active HTTPS mirror from the specified region and place only those mirrors in the mirrorlist for the live medium as well as the installed system.
Select one of the above regions to download packages from (by number or full name): New Zealand
Selecting a drive
In this step you will be presented with a list of block devices. Select the drive you want to install Arch Linux 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): /dev/sda
Only if the selected drive contains existing partitions will you be warned about it and further actions is required. If this happens, you will need to select what to do with the drive and it's partitions and will be described in the next coming section. The three options will be presented as shown here:
BlockDevice(path=/dev/sda) contains the following partitions: Partition(path=/dev/sda1, fs=vfat) Partition(path=/dev/sda2, fs=ntfs) (Filesystem not supported) Partition(path=/dev/sda3, real_device=/dev/sda, fs=crypto_LUKS) 0: Abort the installation. 1: Format entire drive and setup a basic partition scheme. 2: Keep existing partition layout and select which ones to use where. Found partitions on selected drive, (select by number) what you want to do: 2
Abort the installation
This option simply aborts the installation and abandoned any queued changes.
Format entire drive
In this sub-option, you allow archinstall to use the entire drive and no other partitions will be spared. When this option is selected, the following sub-menu will appear where you will select the root partition file system format:
Select which filesystem your main partition should use (by number or name):
Keep existing partition layout
/boot
partition will be left untouched if it contains data for multi-boot purposes.This option unlocked another sub-menu where you will be prompted to select which partitions to use. Any partitions selected will be formatted, and those not selected or modified will be left untouched. This enables a some what flexible way of allowing you to [Partition the disks] in your own way before running the installer, and then cherry pick which partitions to use in this installer. The options you will be presented with are:
** You will now select which partitions to use by selecting mount points (inside the installation). ** ** The root would be a simple / and the boot partition /boot (as all paths are relative inside the installation). ** 0: Partition(path=/dev/sda1, fs=vfat) 1: Partition(path=/dev/sda3, real_device=/dev/sda, fs=crypto_LUKS) Select a partition by number that you want to set a mount-point for (leave blank when done): 0
When entering a partition, you will need to supply two things. First you will need to supply a mount-point for the partition and then which file-system to use.
Enter a mount-pint for Partition(path=/dev/sda1, fs=vfat): /boot Enter a valid filesystem for Partition(path=/dev/sda1, fs=vfat) (leave blank for vfat):
In this example we mounted the first partition to /boot
. And we will leave the default vfat
file-system for the boot partition.
Encrypted partitions have a required third hidden step. And that is to assign a inner file-system, inside the encrypted partition.
If the partition file-system is left blank, the installer will try to auto-detect the inner file-system by mounting the encrypted drive with the disk encryption password specified. If not password is specified the installer will ask for one.
If the auto-detection fails, you will be required to enter a supported file-system such as btrfs
for the inner file-system.
Disk encryption
Next step is optional but recommended, and will allow you to select (or skip) a password for the luks2 root partition encryption.
Enter disk encryption password (leave blank for no encryption):
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. If any of these default options are not sane, please report so to the upstream Github repository.
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. 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 and leaving root disabled.
Enter root password (Recommended: leave blank to leave root disabled):
Creating a Super-user
root
was left disabled.In this sub-menu you are required to create a super user which is based on sudo. This step is here as an assurance that you are not left locked out of your machine post installation.
Create a required super-user with sudo privileges:
Additional users to install
In this step, you can optionally create more users on the machine. When creating a user, you will get the opportunity to supply both a password and to set the user as a super-user or a regular user.
Enter a username to create a additional user (leave blank to skip & continue): test Password for user test: And one more time for verification: Should this user be a sudo (super) user (y/N): N
Choosing a profile to install
Machines can have many use cases. archinstall ships a number of pre-configured profiles that you can choose from. These profiles are intended to give a quick start to a working environment, but they will never be fully featured or considered advanced. Some examples of profiles include:
- desktop
A new-user friendly desktop environment. It will ask which desktop environment to use from the list below. - 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.
Enter a pre-programmed profile name if you want to install one: awesome
There might be additional questions after selecting a profile. But only if the profile requires more user input. For any questions or documentation regarding the profiles sub-menus, please discuss those at the official archinstall Discord Server.
Additional packages
In this step, you can supply a list of (space separated) 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.
Write additional packages to install (space separated, leave blank to skip):
Network configuration
The installer comes with a rudimentary network configuration step. It can copy the existing network configuration from the live installation medium or configure one specific interface.
0: Copy ISO network configuration to installation 1: enp0s2 2: eth0 Select one network interface to configure (leave blank to skip):
Copy ISO network configuration
This option will copy any existing network configuration, if for instance you configured WiFi prior to running the installer as an example, then the WiFi configuration will be copied over.
NIC specifc configuration
If you selected a interface to configure, then this sub-menu will be presented allowing you to choose between configuring DHCP
for the interface or a static IP configuration.
0: DHCP (auto detect) 1: IP (static) Select which mode to configure for enp0s2
If DHCP was selected, this step is done and Systemd-networkd will take care of the interface once the machine is rebooted.
But selecting IP (static)
forces you to enter a IP and subnet notation for the interface, as well as a gateway and DNS servers.
Enter the IP and subnet for interface (example: 192.168.0.5/24): Enter your gateway (router) IP address or leave blank for none: Enter your DNS servers (space separated, blank for none):
Timezone selection
The last step is optional but lets you select a time-zone. To get a list of supported time-zones, run the command timedatectl list-timezones
.
Enter a valid timezone (Example: Europe/Stockholm): America/Chicago
Verifying configuration
In the last and final step, you will be presented with the chosen configuration. Verify that everything looks correct, and once you're ready, press Enter to continue.
This is your chosen configuration: { "!encryption-password": "******", "!root-password": "******", "filesystem": "btrfs", "harddrive": { "model": "QEMU_HARDDISK", "path": "/dev/sda", "size": "15G" }, "hostname": "", "mirror-region": { "Sweden": { "https://archlinux.dynamict.se/$repo/os/$arch": true, "https://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch": true } }, "nic": { "dhcp": false, "dns": [ "8.8.8.8" ], "gateway": null, "ip": "192.168.0.5/24", "nic": "enp0s2" }, "packages": [], "profile": null, "superusers": { "anton": { "!password": "******", } }, "users": {} }
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.
The main limitations of the guided archinstall installer are:
- Relies on Systemd-boot as it's bootloader and not legacy-supporting alternatives like grub (yet, there's a ticket and WIP to support this).
- Disk encryption parameters are not configurable outside of setting the password.
- Lack certain accessibility features (color blindness for instance).
- Current and new profiles are constantly under development.
Bugs and Issues
Any bugs and/or issues should be reported at the official upstream repository archinstall on Github. There's also a Discord Server for quicker communication and community support.
/var/log/archinstall
should be appended to any support ticket. Verify that no sensitive information exists in the logs before posting!