Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/docs/installing/guided.rst
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2022-01-05 23:42:06 +0100
committerGitHub <noreply@github.com>2022-01-05 23:42:06 +0100
commitddb0810af0d0bb3fd9aa955d5fee18526b1fd043 (patch)
treebc103ae92c0b97a88d62905ab6e3397a5f6b8180 /docs/installing/guided.rst
parenta68a23d10a08052091df9550d119810db94a2fdf (diff)
Improve documentation v2.3.1 (#843)
* Updated documentation Mostly I've moved things around, cleaned up some dead paths and added more clarity. * Cleaned up !superusers section * Mentioning of accessibility
Diffstat (limited to 'docs/installing/guided.rst')
-rw-r--r--docs/installing/guided.rst388
1 files changed, 173 insertions, 215 deletions
diff --git a/docs/installing/guided.rst b/docs/installing/guided.rst
index 19720a3f..f08a9955 100644
--- a/docs/installing/guided.rst
+++ b/docs/installing/guided.rst
@@ -1,53 +1,52 @@
-.. _guided_installation:
-.. autofunction:: guided_installation
+.. _guided:
Guided installation
===================
-This is the default scripted installation you'll encounter on the official Arch Linux Archinstall package as well as the unofficial ISO found on `https://archlinux.life <https://archlinux.life>`_. It will guide you through a very basic installation of Arch Linux.
-
-The installer has two pre-requisites:
-
- * A Physical or Virtual machine to install on
- * An active internet connection prior to running archinstall
-
-.. warning::
- A basic understanding of machines, ISO-files and command lines are needed.
- Please read the official Arch Linux Wiki (`https://wiki.archlinux.org/ <https://wiki.archlinux.org/>`_) to learn more
+| This is the default script the Arch Linux `Archinstall package <https://archlinux.org/packages/extra/any/archinstall/>`_.
+| It will guide you through a very basic installation of Arch Linux.
.. note::
- There are some limitations with the installer, such as that it will not configure WiFi during the installation procedure. And it will not perform a post-installation network configuration either. So you need to read up on `Arch Linux networking <https://wiki.archlinux.org/index.php/Network_configuration>`_ to get that to work.
+ There are other scripts and they can be invoked by executing `archinstall <script>` *(without .py)*. To see a complete list of scripts, see the source code directory `examples/ <https://github.com/archlinux/archinstall/tree/master/examples>`_
-Running the guided installation
--------------------------------
+The installer has three pre-requisites:
+ * The latest version of `Arch Linux ISO <https://archlinux.org/download/>`_
+ * A physical or virtual machine to install on
+ * A `working internet connection <https://wiki.archlinux.org/title/installation_guide#Connect_to_the_internet>`_ prior to running archinstall
.. note::
- Due to the package being quite new, it might be required to update the local package list before installing or continuing. Partial upgrades can cause issues, but the lack of dependencies should make this perfectly safe:
-
- .. code::bash
- # pacman -Syy
+ A basic understanding of machines, ISO-files and command line arguments are needed.
+ Please read the official `Arch Linux Wiki <https://wiki.archlinux.org/>`_ to learn more about your future operating system.
-To install archinstall and subsequently the guided installer, simply do the following:
-
-.. code-block:: sh
+.. warning::
+ The installer will not configure WiFi before the installation begins. You need to read up on `Arch Linux networking <https://wiki.archlinux.org/index.php/Network_configuration>`_ before you continue.
- pacman -S python-archinstall
+Running the guided installation
+-------------------------------
-And to run it, execute archinstall as a Python module:
+To start the installer, run the following in the latest Arch Linux ISO:
.. code-block:: sh
- python -m archinstall --script guided
+ archinstall --script guided
| The ``--script guided`` argument is optional as it's the default behavior.
-| But this will start the process of guiding you through an installation of a quite minimal Arch Linux experience.
+| But this will use our most guided installation and if you skip all the option steps it will install a minimal Arch Linux experience.
Installing directly from a configuration file
---------------------------------------
+---------------------------------------------
+
+| The guided installation also supports installing with pre-configured answers to all the guided steps.
+| This can be a quick and convenient way to re-run one or several installations.
+
+There are three different configuration files, all of which are optional.
+ * ``--config`` that deals with the general configuration of language and which profiles to use.
+ * ``--creds`` which takes any ``superuser``, ``user`` or ``root`` account data.
+ * ``--disk_layouts`` for defining the desired partition strategy on the selected ``"harddrives"`` in ``--config``.
.. note::
- Edit the following json according to your needs,
- save this as a json file, and provide the local or remote path (URL)
+ You can always get the latest options with ``archinstall --dry-run``, but edit the following json according to your needs.
+ Save the configuration as a ``.json`` file. Archinstall can source it via a local or remote path (URL)
.. code-block:: json
@@ -59,12 +58,12 @@ Installing directly from a configuration file
"chown -R devel:devel /home/devel/paru",
"usermod -aG docker devel"
],
- "!encryption-password": "supersecret",
"filesystem": "btrfs",
"gfx_driver": "VMware / VirtualBox (open-source)",
- "harddrive": {
- "path": "/dev/nvme0n1"
- },
+ "harddrives": [
+ "/dev/nvme0n1"
+ ],
+ "swap": true,
"hostname": "development-box",
"kernels": [
"linux"
@@ -72,217 +71,176 @@ Installing directly from a configuration file
"keyboard-language": "us",
"mirror-region": "Worldwide",
"nic": {
- "NetworkManager": true
+ "NetworkManager": true,
+ "nic": "Use NetworkManager (necessary to configure internet graphically in GNOME and KDE)"
},
"ntp": true,
"packages": ["docker", "git", "wget", "zsh"],
"profile": "gnome",
"services": ["docker"],
- "superusers": {
- "devel": {
- "!password": "devel"
- }
- },
"sys-encoding": "utf-8",
"sys-language": "en_US",
"timezone": "US/Eastern",
- "users": {}
}
-To run it, execute archinstall as a Python module:
+To use it, assuming you put it on ``https://domain.lan/config.json``:
.. code-block:: sh
- python -m archinstall --config <local path or remote URL>
+ archinstall --config https://domain.lan/config.json
+
+Options for ``--config``
+------------------------
+
+*(To see which keys are required, scroll to the right in the above table.)*
+
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| Key | Values | Description | Required |
+| | | | |
++======================+========================================================+=============================================================================================+===============================================+
+| audio | pipewire/pulseaudio | Audioserver to be installed | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| bootloader | systemd-bootctl/grub-install | Bootloader to be installed *(grub being mandatory on BIOS machines)* | Yes |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| custom-commands | [ <command1>, <command2>, ...] | Custom commands to be run post install | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| gfx_driver | - "VMware / VirtualBox (open-source)" | Graphics Drivers to install | No |
+| | - "Nvidia" | | |
+| | - "Intel (open-source)" | | |
+| | - "AMD / ATI (open-source)" | | |
+| | - "All open-source (default)" | | |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| harddrives | [ <path of device>, <path of second device>, ... } | Multiple paths to block devices to be formatted | No[1] |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| hostname | any | Hostname of machine after installation. Default will be ``archinstall`` | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| kernels | [ "kernel1", "kernel2"] | List of kernels to install eg: linux, linux-lts, linux-zen etc | Atleast 1 |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| keyboard-language | Any valid layout given by ``localectl list-keymaps`` | eg: ``us``, ``de`` or ``de-latin1`` etc. Defaults to ``us`` | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| mirror-region | | {"<Region Name>": { "Mirror URL": True/False}, ..} | | Defaults to automatic selection. | No |
+| | | "Worldwide" or "Sweden" | | Either takes a dictionary structure of region and a given set of mirrors. | |
+| | | | Or just a region and archinstall will source any mirrors for that region automatically | |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| nic | | { NetworkManager: <boolean> } | | Takes three different kind of options. Copy, NetworkManager or a nic name. | No |
+| | | { "eth0": {"address": "<ip>", "subnet": "255.0.0.0"}}| | Copy will copy the network configuration used in the live ISO. NetworkManager will | |
+| | | "Copy ISO network configuration to installation" | | install and configure `NetworkManager <https://wiki.archlinux.org/title/NetworkManager>`_ | |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| ntp | <boolean> | Set to true to set-up ntp post install | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| packages | [ "package1", "package2", ..] | List of packages to install post-installation | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| profile | Name of the profile to install | Profiles are present in | No |
+| | | `profiles/ <https://github.com/archlinux/archinstall/tree/master/profiles>`_, | |
+| | | use the name of a profile to install it without the ``.py`` extension. | |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| services | [ "service1", "service2", ..] | Services to enable post-installation | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| sys-encoding | "utf-8" | Set to change system encoding post-install, ignored if --advanced flag is not passed | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| sys-language | "en_US" | Set to change system language post-install, ignored if --advanced flag is not passed | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+| timezone | Timezone to configure in installation | Timezone eg: UTC, Asia/Kolkata etc. Defaults to UTC | No |
++----------------------+--------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------+
+
+.. note::
+ [1] If no entires are found in ``harddrives``, archinstall guided installation will use whatever is mounted currently under ``/mnt/archinstall``.
+
+Options for ``--creds``
+-----------------------
+
+| Creds is a separate configuration file to separate normal options from more sensitive data like passwords.
+| Below is an example of how to set the root password and below that are description of other values that can be set.
+
+.. code-block:: json
+
+ {
+ "!root-password" : "SecretSanta2022"
+ }
+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| Key | Values/Description | Description | Required |
+| Key | Values | Description | Required |
| | | | |
+======================+=====================================================+======================================================================================+===============================================+
-| audio | pipewire/pulseaudio | Audioserver to be installed | No |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| bootloader | systemd-bootctl/grub-install | Bootloader to be installed | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| custom-commands | [ <command1>, <command2>, ...] | Custom commands to be run post install | No |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
| !encryption-password | any | Password to encrypt disk, not encrypted if password not provided | No |
+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| filesystem | ext4 / btrfs / fat32 etc. | Filesystem for root and home partitions | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| gfx_driver | - "VMware / VirtualBox (open-source)" | Graphics Drivers to install | No |
-| | - "Nvidia" | | |
-| | - "Intel (open-source)" | | |
-| | - "AMD / ATI (open-source)" | | |
-| | - "All open-source (default)" | | |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| harddrive | { "path": <path of device> } | Path of device to be used | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| hostname | any | Hostname of machine after installation | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| kernels | [ "kernel1", "kernel2"] | List of kernels to install eg: linux, linux-lts, linux-zen etc | Atleast 1 |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| keyboard-language | 2 letter code for your keyboard language | eg: us, de etc | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| mirror-region | {"<Region Name>": { "Mirror Name": True/False}, ..} | List of regions and mirrors to use | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| nic | { NetworkManager: <boolean>, nic: <nic name> } | | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| ntp | <boolean> | Set to true to set-up ntp post install | No |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| packages | [ "package1", "package2", ..] | List of packages to install post-installation | No |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| profile | Name of the profile to install | Profiles are present in profiles/, use the name of a profile to install it | No |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
| !root-password | any | The root account password | No |
+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| services | [ "service1", "service2", ..] | Services to enable post-installation | No |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| sys-encoding | "utf-8" | Set to change system encoding post-install, ignored if --advanced flag is not passed | No |
+| !superusers | { "<username>": { "!password": "<password>"}, ..} | List of superuser credentials, see configuration for reference | Yes[1] |
+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| sys-language | "en_US" | Set to change system language post-install, ignored if --advanced flag is not passed | No |
+| !users | { "<username>": { "!password": "<password>"}, ..} | List of regular user credentials, see configuration for reference | No |
+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| superusers | { "<username>": { "!password": "<password>"}, ..} | List of superuser credentials, see configuration for reference | Yes, if root account password is not provided |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| timezone | Timezone to configure in installation | Timezone eg: UTC, Asia/Kolkata etc. | Yes |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-| users | { "<username>": { "!password": "<password>"}, ..} | List of regular user credentials, see configuration for reference | Yes, can be {} |
-+----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
-
-(To see which keys are required, scroll to the right in the above table.)
-
-Description individual steps
-============================
-
-Below is a description of each individual step in order.
-
-keyboard languages
-------------------
-
-Default is :code:`us`.
-
-| A short list of the most common layouts are presented.
-| Entering :code:`?` and pressing enter enables a search mode where additional keyboard layouts can be found.
-
-In search mode, you'll find things like:
-
- * :code:`sv-latin1` for swedish layouts
-
-Mirror region selection
------------------------
-
-Default is :code:`auto detect best mirror`
-
-| Leaving this blank should enable the most appropriate mirror for you.
-| But if you want to override and use only one selected region, you can enter one in this step.
-
-As an example:
-
- * :code:`Sweden` *(with a capital* :code:`S`) will only use mirrors from Sweden.
-
-Selection of drive
-------------------
-
-There is no default for this step and it's a required step.
-
-.. warning::
- | The selected device will be wiped completely!
- |
- | Make sure you select a drive that will be used only by Arch Linux.
- | *(Future versions of archinstall will support multiboot on the same drive and more complex partition setups)*
-
-Select the appropriate drive by selecting it by number or full path.
-
-Disk encryption
----------------
-
-Selecting a disk encryption password enables disk encryption for the OS partition.
.. note::
- This step is highly recommended for most users, skipping this step comes with some risk and you are obligated to read up on why you would want to skip encryption before deciding to opt-out.
-
-.. warning::
- This step does require at least 1GB of free RAM during boot in order to boot at all. Keep this in mind when creating virtual machines. It also only encrypts the OS partition - not the boot partition *(it's not full disk encryption)*.
-
-Hostname
---------
+ [1] ``!superusers`` is optional only if ``!root-password`` was set. ``!superusers`` will be enforced otherwise and the minimum amount of superusers required will be set to 1.
-Default is :code:`Archinstall`
-
-The hostname in which the machine will identify itself on the local network.
-This step is optional, but a default hostname of `Archinstall` will be set if none is selected.
-
-.. _root_password:
-
-Root password
--------------
-
-.. warning::
- | Setting a root password disables sudo permissions for additional users.
- | It's there for **recommended to skip this step**!
-
-This gives you the option to re-enable the :code:`root` account on the machine. By default, the :code:`root` account on Arch Linux is disabled and does not contain a password.
-
-You are instead recommended to skip to the next step without any input.
-
-Super User (sudo)
------------------
-
-.. warning::
- This step only applies if you correctly skipped :ref:`the previous step <root_password>` which also makes this step mandatory.
-
-If the previous step was skipped, and only if it is skipped.
-This step enables you to create a :code:`sudo` enabled user with a password.
+Options for ``--disk_layouts``
+------------------------------
.. note::
- The sudo permission grants :code:`root`-like privileges to the account but is less prone to for instance guessing admin account attacks. You are also less likely to mess up system critical things by operating in normal user-mode and calling `sudo` to gain temporary administrative privileges.
-
-Pre-programmed profiles
------------------------
-
-You can optionally choose to install a pre-programmed profile. These profiles might make it easier for new users or beginners to achieve a traditional desktop environment as an example.
+ | The layout of ``--disk_layouts`` is a bit complicated.
+ | It's highly recommended that you generate it using ``--dry-run`` which will simulate an installation, without performing any damaging actions on your machine. *(no formatting is done)*
-There is a list of profiles to choose from. If you are unsure of what any of these are, research the names that show up to understand what they are before you choose one.
-
-.. note::
- | Some profiles might have sub-dependencies that will ask you to select additional profiles.
- | For instance the :code:`desktop` profile will create a secondary menu to select a graphical driver. That graphical driver might have additional dependencies if there are multiple driver vendors.
- |
- | Simply follow the instructions on the screen to navigate through them.
-
-Additional packages
--------------------
-
-Some additional packages can be installed if need be. This step allows you to list *(space separated)* officially supported packages from the package database at `https://archlinux.org/packages/ <https://archlinux.org/packages/>`_.
-
-
-Network configuration
----------------------
-
-| This step is optional and allows for some basic configuration of your network.
-| There are two main options and two sub-options, the two main ones are:
-
- * Copy existing network configuration from the ISO you're working on
- * Select **one** network interface to configure
-
-| If copying the existing configuration is chosen, no further configuration is needed.
-| The installer will copy any wireless *(based on* :code:`iwd`) configurations and :code:`systemd-networkd` configuration set up by the user or the default system configuration.
-
-| If an interface was selected instead, a secondary option will be presented, allowing you to choose between two options:
-
- * Automatic DHCP configuration of IP, DNS and Gateway
- * Static IP configuration that will ask some further mandatory questions
-
-Configuration verification
---------------------------
-
-| Before the installer continues, and this is only valid for the **guided installation**, the chosen configuration will be printed on the screen and you have the option to verify it.
-
-After which you can press :code:`Enter` in order to start the formatting and installation process.
+.. code-block:: json
-.. warning::
- After a 5 second countdown, the selected drive will be permanently erased and all data will be lost.
+ {
+ "/dev/loop0": {
+ "partitions": [
+ {
+ "boot": true,
+ "encrypted": false,
+ "filesystem": {
+ "format": "fat32"
+ },
+ "format": true,
+ "mountpoint": "/boot",
+ "size": "513MB",
+ "start": "5MB",
+ "type": "primary"
+ },
+ {
+ "btrfs": {
+ "subvolumes": {
+ "@.snapshots": "/.snapshots",
+ "@home": "/home",
+ "@log": "/var/log",
+ "@pkgs": "/var/cache/pacman/pkg"
+ }
+ },
+ "encrypted": true,
+ "filesystem": {
+ "format": "btrfs"
+ },
+ "format": true,
+ "mountpoint": "/",
+ "size": "100%",
+ "start": "518MB",
+ "type": "primary"
+ }
+ ],
+ "wipe": true
+ }
+ }
-Post installation
------------------
+| The overall structure is that of ``{ "blockdevice-path" : ...}`` followed by options for that blockdevice.
+| Each partition has it's own settings, and the formatting is executed in order *(top to bottom in the above example)*.
+| Mountpoints is later mounted in order of path traversal, ``/`` before ``/home`` etc.
-Once the installation is complete, green text should appear saying that it's safe to `reboot`, which is also the command you use to reboot. \ No newline at end of file
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
+| Key | Values | Description | Required |
+| | | | |
++======================+=====================================================+======================================================================================+===============================================+
+| filesystem | { "format": "ext4 / btrfs / fat32 etc." } | Filesystem for root and other partitions | Yes |
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
+| boot | <bool> | Marks the partition as bootable | No |
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
+| encrypted | <bool> | Mark the partition for encryption | No |
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
+| mountpoint | /path | Relative to the inside of the installation, where should the partition be mounted | Yes |
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
+| start | <size><B, MiB, GiB, %, etc> | The start position of the partition | Yes |
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
+| type | primary | Only used if MBR and BIOS is used. Marks what kind of partition it is. | No |
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+
+| btrfs | { "subvolumes": {"subvolume": "mountpoint"}} | Support for btrfs subvolumes for a given partition | No |
++----------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------+ \ No newline at end of file