initial commit
This commit is contained in:
20
examples/archinstall/docs/Makefile
Normal file
20
examples/archinstall/docs/Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
17
examples/archinstall/docs/README.md
Normal file
17
examples/archinstall/docs/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
## Dependencies
|
||||
|
||||
In order to build the docs locally, you need to have the following installed:
|
||||
|
||||
- [sphinx-doc](https://www.sphinx-doc.org/en/master/usage/installation.html)
|
||||
- [sphinx-rdt-theme](https://pypi.org/project/sphinx-rtd-theme/)
|
||||
|
||||
For example, you may install these dependencies using pip:
|
||||
```
|
||||
pip install -U sphinx sphinx-rtd-theme
|
||||
```
|
||||
|
||||
For other installation methods refer to the docs of the dependencies.
|
||||
|
||||
## Build
|
||||
|
||||
In `archinstall/docs`, run `make html` (or specify another target) to build locally. The build files will be in `archinstall/docs/_build`. Open `_build/html/index.html` with your browser to see your changes in action.
|
||||
BIN
examples/archinstall/docs/_static/logo.png
vendored
Normal file
BIN
examples/archinstall/docs/_static/logo.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
examples/archinstall/docs/_static/logo.pride.png
vendored
Normal file
BIN
examples/archinstall/docs/_static/logo.pride.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
BIN
examples/archinstall/docs/_static/logo.pride.psd
vendored
Normal file
BIN
examples/archinstall/docs/_static/logo.pride.psd
vendored
Normal file
Binary file not shown.
BIN
examples/archinstall/docs/_static/logo.psd
vendored
Normal file
BIN
examples/archinstall/docs/_static/logo.psd
vendored
Normal file
Binary file not shown.
3
examples/archinstall/docs/_static/style.css
vendored
Normal file
3
examples/archinstall/docs/_static/style.css
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.wy-nav-content {
|
||||
max-width: none;
|
||||
}
|
||||
4
examples/archinstall/docs/_templates/layout.html
vendored
Normal file
4
examples/archinstall/docs/_templates/layout.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{% extends "!layout.html" %}
|
||||
{% block extrahead %}
|
||||
<link href="{{ pathto("_static/style.css", True) }}" rel="stylesheet" type="text/css">
|
||||
{% endblock %}
|
||||
11
examples/archinstall/docs/archinstall/Installer.rst
Normal file
11
examples/archinstall/docs/archinstall/Installer.rst
Normal file
@@ -0,0 +1,11 @@
|
||||
.. _archinstall.Installer:
|
||||
|
||||
archinstall.Installer
|
||||
=====================
|
||||
|
||||
The installer is the main class for accessing an installation-instance.
|
||||
You can look at this class as the installation you have or will perform.
|
||||
|
||||
Anything related to **inside** the installation, will be found in this class.
|
||||
|
||||
.. autofunction:: archinstall.Installer
|
||||
57
examples/archinstall/docs/archinstall/plugins.rst
Normal file
57
examples/archinstall/docs/archinstall/plugins.rst
Normal file
@@ -0,0 +1,57 @@
|
||||
.. _archinstall.Plugins:
|
||||
|
||||
Python Plugins
|
||||
==============
|
||||
|
||||
``archinstall`` supports plugins via two methods.
|
||||
|
||||
First method is directly via the ``--plugin`` parameter when running as a CLI tool. This will load a specific plugin locally or remotely via a path.
|
||||
|
||||
The second method is via Python's built in `plugin discovery`_ using `entry points`_ categorized as ``archinstall.plugin``.
|
||||
|
||||
``--plugin`` parameter
|
||||
----------------------
|
||||
|
||||
The parameter has the benefit of being stored in the ``--conf`` state, meaning when re-running an installation — the plugin will automatically be loaded.
|
||||
It's limitation is that it requires an initial path to be known and written and be cumbersome.
|
||||
|
||||
Plugin Discovery
|
||||
----------------
|
||||
|
||||
This method allows for multiple plugins to be loaded with the drawback that they have to be installed beforehand on the system running ``archinstall``.
|
||||
This mainly targets those who build their own ISO's and package specific setups for their needs.
|
||||
|
||||
|
||||
What's supported?
|
||||
-----------------
|
||||
|
||||
Currently the documentation for this is scarse. Until that is resolved, the best way to find supported features is to search the source code for `plugin.on_ <https://github.com/search?q=repo%3Aarchlinux%2Farchinstall+%22plugin.on_%22&type=code>`_ as this will give a clear indication of which calls are made to plugins.
|
||||
|
||||
How does it work?
|
||||
-----------------
|
||||
|
||||
``archinstall`` plugins use a discovery-driven approach where plugins are queried for certain functions.
|
||||
As an example, if a plugin has the following function:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def on_pacstrap(*packages):
|
||||
...
|
||||
|
||||
The function :code:`archinstall.Pacman().strap(["some packages"])` is hardcoded to iterate plugins and look for :code:`on_pacstrap` in the plugin.
|
||||
If the function exists, :code:`.strap()` will call the plugin's function and replace the initial package list with the result from the plugin.
|
||||
|
||||
The best way to document these calls is currently undecided, as it's hard to document this behavior dynamically.
|
||||
|
||||
Writing your own?
|
||||
-----------------
|
||||
|
||||
The simplest way currently is to look at a reference implementation or the community. Two of these are:
|
||||
|
||||
* `torxed/archinstall-aur <https://github.com/torxed/archinstall-aur>`_
|
||||
* `phisch/archinstall-aur <https://github.com/phisch/archinstall-aur>`_
|
||||
|
||||
And search for `plugin.on_ <https://github.com/search?q=repo%3Aarchlinux%2Farchinstall+%22plugin.on_%22&type=code>`_ in the code base to find what ``archinstall`` will look for. PR's are welcome to widen the support for this.
|
||||
|
||||
.. _plugin discovery: https://packaging.python.org/en/latest/specifications/entry-points/
|
||||
.. _entry points: https://docs.python.org/3/library/importlib.metadata.html#entry-points
|
||||
@@ -0,0 +1,24 @@
|
||||
Key,Value(s),Description,Required
|
||||
additional-repositories,[ `multilib <https://wiki.archlinux.org/title/Official_repositories#multilib>`_!, `testing <https://wiki.archlinux.org/title/Official_repositories#Testing_repositories>`_ ],Enables one or more of the testing and multilib repositories before proceeding with installation,No
|
||||
archinstall-language,`lang <https://github.com/archlinux/archinstall/blob/master/archinstall/locales/languages.json>`__,Sets the TUI language used *(make sure to use the ``lang`` value not the ``abbr``)*,No
|
||||
audio_config,`pipewire <https://wiki.archlinux.org/title/PipeWire>`_!, `pulseaudio <https://wiki.archlinux.org/title/PulseAudio>`_,Audioserver to be installed,No
|
||||
bootloader,`Systemd-boot <https://wiki.archlinux.org/title/Systemd-boot>`_!, `grub <https://wiki.archlinux.org/title/GRUB>`_,Bootloader to be installed *(grub being mandatory on BIOS machines)*,Yes
|
||||
debug,``true``!, ``false``,Enables debug output,No
|
||||
disk_config,*Read more under* :ref:`disk config`,Contains the desired disk setup to be used during installation,No
|
||||
disk_encryption,*Read more about under* :ref:`disk encryption`,Parameters for disk encryption applied on top of ``disk_config``,No
|
||||
hostname,``str``,A string defining your machines hostname on the network *(defaults to ``archinstall``)*,No
|
||||
kernels,[ `linux <https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels>`_!, `linux-hardened <https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels>`_!, `linux-lts <https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels>`_!, `linux-rt <https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels>`_!, `linux-rt-lts <https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels>`_!, `linux-zen <https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels>`_ ],Defines which kernels should be installed and setup in the boot loader options,Yes
|
||||
custom_commands,*Read more under* :ref:`custom commands`,Custom commands that will be run post-install chrooted inside the installed system,No
|
||||
locale_config,{kb_layout: `lang <https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration>`__!, sys_enc: `Character encoding <https://wiki.archlinux.org/title/Locale>`_!, sys_lang: `locale <https://wiki.archlinux.org/title/Locale>`_},Defines the keyboard key map!, system encoding and system locale,No
|
||||
mirror_config,{custom_mirrors: [ https://... ]!, mirror_regions: { "Worldwide": [ "https://geo.mirror.pkgbuild.com/$repo/os/$arch" ] } },Sets various mirrors *(defaults to ISO's ``/etc/pacman.d/mirrors`` if not defined)*,No
|
||||
network_config,*`see options under Network Configuration`*,Sets which type of *(if any)* network configuration should be used,No
|
||||
no_pkg_lookups,``true``!, ``false``,Disabled package checking against https://archlinux.org/packages/,No
|
||||
ntp,``true``!, ``false``,enables or disables `NTP <https://wiki.archlinux.org/title/Network_Time_Protocol_daemon>`_ during installation,No
|
||||
offline,``true``!, ``false``,enables or disables certain online checks such as mirror reachability etc,No
|
||||
packages,[ <package1>!, <package2>!, ... ],A list of packages to install during installation,No
|
||||
parallel downloads,0-∞,sets a given number of parallel downloads to be used by `pacman <https://wiki.archlinux.org/title/Pacman#Enabling_parallel_downloads>`_,No
|
||||
profile_config,*`read more under the profiles section`*,Installs a given profile if defined,No
|
||||
script,`guided <https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py>`__! *(default)*!, `minimal <https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/minimal.py>`__!, `only_hdd <https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/only_hdd.py>`_!, When used to autorun an installation!, this sets which script to autorun with,No
|
||||
silent,``true``!, ``false``,disables or enables user questions using the TUI,No
|
||||
swap,``true``!, ``false``,enables or disables swap,No
|
||||
timezone,`timezone <https://wiki.archlinux.org/title/System_time#Time_zone>`_,sets a timezone for the installed system,No
|
||||
|
Can't render this file because it contains an unexpected character in line 13 and column 68.
|
@@ -0,0 +1,22 @@
|
||||
.. _custom commands:
|
||||
|
||||
Custom Commands
|
||||
===============
|
||||
|
||||
Custom commands is a configuration entry that allows for executing custom commands post-installation.
|
||||
The commands are executed with `arch-chroot <https://man.archlinux.org/man/extra/arch-install-scripts/arch-chroot.8.en>`_.
|
||||
|
||||
The option takes a list of arguments, an example is:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"custom_commands": [
|
||||
"hostname new-hostname"
|
||||
]
|
||||
}
|
||||
|
||||
The following example will set a new hostname in the installed system.
|
||||
The example is just to illustrate that the command is not run in the ISO but inside the installed system after the base system is installed.
|
||||
|
||||
More examples can be found in the code repository under `examples/ <https://github.com/archlinux/archinstall/tree/e6344f93f7e476d05bbcd642f2ed91fdde545870/examples>`_
|
||||
231
examples/archinstall/docs/cli_parameters/config/disk_config.rst
Normal file
231
examples/archinstall/docs/cli_parameters/config/disk_config.rst
Normal file
@@ -0,0 +1,231 @@
|
||||
.. _disk config:
|
||||
|
||||
Disk Configuration
|
||||
==================
|
||||
|
||||
There are only three modes in the ``disk_config`` option. They are described in more detail below.
|
||||
|
||||
"Leave as is"
|
||||
--------------
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"config_type": "pre_mounted_config",
|
||||
"mountpoint": "/mnt/archinstall"
|
||||
}
|
||||
|
||||
This mode will not perform any partitioning what so ever.
|
||||
Instead it relies on what's mounted manually by the user under ``/mnt/archinstall``.
|
||||
|
||||
Given the following disk example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
/mnt/archinstall (/dev/sda2)
|
||||
├── boot (/dev/sda1)
|
||||
└── home (/dev/sda3)
|
||||
|
||||
Running ``archinstall --conf your.json --silent`` where the above JSON is configured. The disk will be left alone — and a working system will be installed to the above folders and mountpoints will be translated into the installed system.
|
||||
|
||||
.. note::
|
||||
|
||||
Some disk layouts can be too complicated to detect, such as RAID setups. Please do report those setups on the `Issue Tracker <https://github.com/archlinux/archinstall>`__ so we can support them.
|
||||
|
||||
Best Effort
|
||||
-----------
|
||||
|
||||
.. warning::
|
||||
|
||||
This mode will wipe data!
|
||||
|
||||
.. note::
|
||||
|
||||
Note that this options is similar to the manual partitioning but is generated through the menu system! And the best effort layout might deviate slightly from some wiki guidelines in order to facilitate some optional configurations at a later stage.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"disk_config": {
|
||||
"config_type": "default_layout",
|
||||
"device_modifications": [
|
||||
{
|
||||
"device": "/dev/sda",
|
||||
"wipe": true,
|
||||
"partitions": "..."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
This mode will attempt to configure a sane default layout on the selected disks.
|
||||
Based on the chosen filesystem, and potential optional settings for said filesystem — different default layouts will be provided.
|
||||
|
||||
Manual Partitioning
|
||||
-------------------
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"disk_config": {
|
||||
"config_type": "manual_partitioning",
|
||||
"device_modifications": [
|
||||
"filesystem struct"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Manual partitioning is the most complex one of the three. It offers you near endless flexibility of how to partition your disk. It integrates against `pyparted <https://github.com/dcantrell/pyparted>`__ and some control logic in ``archinstall`` that deals with creating things like subvolumes and compression.
|
||||
|
||||
Sizes are by default ``sector`` units, but other units are supported.
|
||||
|
||||
The options supplied to ``manual_partitioning`` are dictionary definitions, where the following parameters must exist:
|
||||
|
||||
.. csv-table:: JSON options
|
||||
:file: ./manual_options.csv
|
||||
:widths: 15, 15, 65, 5
|
||||
:escape: !
|
||||
:header-rows: 1
|
||||
|
||||
Each partition definition heavily relies on what filesystem is used.
|
||||
Below follow two of the more common filesystems, anything else will best be described by running ``archinstall`` to generate a desired configuration for the desired filesystem type — and copy the relevant parts for permanent configurations.
|
||||
|
||||
.. warning::
|
||||
|
||||
Important to note that the units and positions in the examples below — are highly user specific!
|
||||
|
||||
FAT32
|
||||
^^^^^
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"btrfs": [],
|
||||
"flags": [
|
||||
"boot"
|
||||
],
|
||||
"fs_type": "fat32",
|
||||
"length": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 99982592
|
||||
},
|
||||
"mount_options": [],
|
||||
"mountpoint": "/boot",
|
||||
"obj_id": "369f31a8-2781-4d6b-96e7-75680552b7c9",
|
||||
"start": {
|
||||
"sector_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 512
|
||||
},
|
||||
"total_size": null,
|
||||
"unit": "sectors",
|
||||
"value": 34
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
}
|
||||
|
||||
.. note::
|
||||
|
||||
The ``Boot`` flag will make ``archinstall`` automatically set the correct ESP partition GUID if the system is booted with ``EFI`` support. The GUID will then be set to ``C12A7328-F81F-11D2-BA4B-00A0C93EC93B``.
|
||||
|
||||
EXT4
|
||||
^^^^
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"btrfs": [],
|
||||
"flags": [],
|
||||
"fs_type": "ext4",
|
||||
"length": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 15805127360
|
||||
},
|
||||
"mount_options": [],
|
||||
"mountpoint": "/",
|
||||
"obj_id": "3e75d045-21a4-429d-897e-8ec19a006e8b",
|
||||
"start": {
|
||||
"sector_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 512
|
||||
},
|
||||
"total_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 16106127360
|
||||
},
|
||||
"unit": "MB",
|
||||
"value": 301
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
}
|
||||
|
||||
BTRFS
|
||||
^^^^^
|
||||
|
||||
The BTRFS filesystem is inherently more complicated, thus the options are a bit more involved.
|
||||
This example contains both subvolumes and compression.
|
||||
|
||||
.. note::
|
||||
|
||||
Note that the ``"mountpoint": null`` is used for the overall partition, and instead individual subvolumes have mountpoints set.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"btrfs": [
|
||||
{
|
||||
"mountpoint": "/",
|
||||
"name": "@",
|
||||
},
|
||||
{
|
||||
"mountpoint": "/home",
|
||||
"name": "@home",
|
||||
},
|
||||
{
|
||||
"mountpoint": "/var/log",
|
||||
"name": "@log",
|
||||
},
|
||||
{
|
||||
"mountpoint": "/var/cache/pacman/pkg",
|
||||
"name": "@pkg",
|
||||
}
|
||||
],
|
||||
"dev_path": null,
|
||||
"flags": [],
|
||||
"fs_type": "btrfs",
|
||||
"mount_options": [
|
||||
"compress=zstd"
|
||||
],
|
||||
"mountpoint": null,
|
||||
"obj_id": "d712357f-97cc-40f8-a095-24ff244d4539",
|
||||
"size": {
|
||||
"sector_size": {
|
||||
"unit": "B",
|
||||
"value": 512
|
||||
},
|
||||
"unit": "B",
|
||||
"value": 15568207872
|
||||
},
|
||||
"start": {
|
||||
"sector_size": {
|
||||
"unit": "B",
|
||||
"value": 512
|
||||
},
|
||||
"unit": "MiB",
|
||||
"value": 513
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
.. _disk encryption:
|
||||
|
||||
Disk Encryption
|
||||
===============
|
||||
|
||||
Disk encryption consists of a top level entry in the user configuration.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"disk_encryption": {
|
||||
"encryption_type": "luks",
|
||||
"partitions": [
|
||||
"d712357f-97cc-40f8-a095-24ff244d4539"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
The ``UID`` in the ``partitions`` list is an internal reference to the ``obj_id`` in the :ref:`disk config` entries.
|
||||
@@ -0,0 +1,4 @@
|
||||
Key,Value(s),Description,Required
|
||||
device,``str``,Which block-device to format,yes
|
||||
partitions,[ {key: val} ],The data describing the change/addition in a partition,yes
|
||||
wipe,``bool``,clear the disk before adding any partitions,No
|
||||
|
126
examples/archinstall/docs/conf.py
Normal file
126
examples/archinstall/docs/conf.py
Normal file
@@ -0,0 +1,126 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
|
||||
def process_docstring(app, what, name, obj, options, lines) -> None: # type: ignore[no-untyped-def]
|
||||
spaces_pat = re.compile(r'( {8})')
|
||||
ll = [spaces_pat.sub(' ', line) for line in lines]
|
||||
lines[:] = ll
|
||||
|
||||
|
||||
def setup(app) -> None: # type: ignore[no-untyped-def]
|
||||
app.connect('autodoc-process-docstring', process_docstring)
|
||||
|
||||
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# This file only contains a selection of the most common options. For a full
|
||||
# list see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'python-archinstall'
|
||||
copyright = '2022, Anton Hvornum'
|
||||
author = 'Anton Hvornum'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = 'v2.3.0'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
master_doc = 'index'
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.inheritance_diagram',
|
||||
'sphinx.ext.todo',
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
# html_theme = 'alabaster'
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
html_logo = '_static/logo.png'
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# If false, no module index is generated.
|
||||
html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
html_split_index = True
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
html_show_sourcelink = False
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
# html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
# html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
# html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
# html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'archinstalldoc'
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [('index', 'archinstall', 'archinstall Documentation', ['Anton Hvornum'], 1)]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
# man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'archinstall', 'archinstall Documentation', 'Anton Hvornum', 'archinstall', 'Simple and minimal HTTP server.'),
|
||||
]
|
||||
97
examples/archinstall/docs/examples/python.rst
Normal file
97
examples/archinstall/docs/examples/python.rst
Normal file
@@ -0,0 +1,97 @@
|
||||
.. _examples.python:
|
||||
|
||||
Python module
|
||||
=============
|
||||
|
||||
Archinstall supports running in `module mode <https://docs.python.org/3/library/__main__.html>`_.
|
||||
The way the library is invoked in module mode is limited to executing scripts under the `scripts`_ folder.
|
||||
|
||||
It's therefore important to place any script or profile you wish to invoke in the examples folder prior to building and installing.
|
||||
|
||||
Pre-requisites
|
||||
--------------
|
||||
|
||||
We'll assume you've followed the :ref:`installing.python.manual` method.
|
||||
Before actually installing the library, you will need to place your custom installer-scripts under `scripts`_ as a python file.
|
||||
|
||||
More on how you create these in the next section.
|
||||
|
||||
.. warning::
|
||||
|
||||
This is subject to change in the future as this method is currently a bit stiff. The script path will become a parameter. But for now, this is by design.
|
||||
|
||||
Creating a script
|
||||
-----------------
|
||||
|
||||
Lets create a `test_installer` - installer as an example. This is assuming that the folder `./archinstall` is a git-clone of the main repo.
|
||||
We begin by creating "`scripts`_:code:`/test_installer.py`". The placement here is important later.
|
||||
|
||||
This script can now already be called using :code:`python -m archinstall --script test_installer` after a successful installation of the library itself.
|
||||
But the script won't do much. So we'll do something simple like list all the hard drives as an example.
|
||||
|
||||
To do this, we'll begin by importing :code:`archinstall` in our "`scripts`_:code:`/test_installer.py`" and call a function whtin ``archinstall``.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from archinstall.lib.disk.device_handler import device_handler
|
||||
from pprint import pprint
|
||||
|
||||
pprint(device_handler.devices)
|
||||
|
||||
Now, go ahead and reference the :ref:`installing.python.manual` installation method.
|
||||
After running ``python -m archinstall test_installer`` it should print something that looks like:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
[
|
||||
BDevice(
|
||||
disk=<parted.disk.Disk object at 0x7fbe17156050>,
|
||||
device_info=_DeviceInfo(
|
||||
model='PC801 NVMe SK hynix 512GB',
|
||||
path=PosixPath('/dev/nvme0n1'),
|
||||
type='nvme',
|
||||
total_size=Size(value=512110190592, unit=<Unit.B: 1>,
|
||||
sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
|
||||
free_space_regions=[
|
||||
<archinstall.lib.disk.device.DeviceGeometry object at 0x7fbe166c4250>,
|
||||
<archinstall.lib.disk.device.DeviceGeometry object at 0x7fbe166c4c50>,
|
||||
<archinstall.lib.disk.device.DeviceGeometry object at 0x7fbe166c4a10>],
|
||||
sector_size=SectorSize(value=512, unit=<Unit.B: 1>),
|
||||
read_only=False,
|
||||
dirty=False
|
||||
),
|
||||
partition_infos=[
|
||||
_PartitionInfo(
|
||||
partition=<parted.partition.Partition object at 0x7fbe166c4a90>,
|
||||
name='primary',
|
||||
type=<PartitionType.Primary: 'primary'>,
|
||||
fs_type=<FilesystemType.Fat32: 'fat32'>,
|
||||
path='/dev/nvme0n1p1',
|
||||
start=Size(value=2048, unit=<Unit.sectors: 'sectors'>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
|
||||
length=Size(value=535822336, unit=<Unit.B: 1>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
|
||||
flags=[
|
||||
<PartitionFlag.BOOT: flag_id=1, alias=None>,
|
||||
<PartitionFlag.ESP: flag_id=18, alias=None>
|
||||
],
|
||||
partn=1,
|
||||
partuuid='a26be943-c193-41f4-9930-9341cf5f6b19',
|
||||
uuid='6EE9-2C00',
|
||||
disk=<parted.disk.Disk object at 0x7fbe17156050>,
|
||||
mountpoints=[
|
||||
PosixPath('/boot')
|
||||
],
|
||||
btrfs_subvol_infos=[]
|
||||
),
|
||||
_PartitionInfo(...)
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
That means your script is in the right place, and ``archinstall`` is working as intended.
|
||||
|
||||
.. note::
|
||||
|
||||
Most calls, including the one above requires `root <https://en.wikipedia.org/wiki/Superuser>`_ privileges.
|
||||
|
||||
|
||||
.. _scripts: https://github.com/archlinux/archinstall/tree/master/archinstall/scripts
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1 @@
|
||||
<mxfile host="Electron" modified="2021-05-02T19:57:46.193Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.82 Electron/12.0.1 Safari/537.36" etag="WWkzNgJUxTiFme1f07FW" version="14.5.1" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7VvZdqM4EP2anHlKDpsxPMZ20sl0kl7S05meNwVkYCIjt5C3+fqRjFgFNnbwksQv3a5CCKG6dWsROdP7o/knAsb+PXYhOtMUd36mD840TVUsi/3HNYtYY5tC4ZHAFYMyxWPwH0zuFNpJ4MKoMJBijGgwLiodHIbQoQUdIATPisOGGBWfOgYelBSPDkCy9ilwqR9rLa2b6W9g4PnJk1XTjq+MQDJYvEnkAxfPcir96kzvE4xp/Gs070PENy/Zl6fbxRO6ezE//fkt+g3+6n3+8fDzPJ7sepNb0lcgMKRbT/3y2bLtaXf4oFrf7ga/rYfB/dW5IV6NLpL9gi7bPiFiQn3s4RCgq0zbI3gSupDPqjIpG3OH8Vgo/4WULgQWwIRipvLpCImr7C3I4m8mKBedRPzFxUQYzAvSQkhDHNI+RpgsV6obpmF3BkwfUYJfYO5K17IuL3V+R4BQTt/T+vZlbzmve80upetxLznSmOggEEWBs5wUECoGKYmcDAtxyHcieoHU8cWAeCf59pWAt8ZqYlyEJ8SBK8bpwnkA8eCq+cwUmsynIR5BtoXsPgIRoMG0uDggnMtLx2UAYj8EhjaAqljkFKCJeNIjRNytNaWHsPMygNPAYXRQRt3MDyh8HIPlDswYExURwy0v4KSyl+t53EypYbj1E9/mo1NHVSS01gFiBYRqQLeZdaeQUDjP7b1soOSqKehG8K0lxFlGXmrCSH6OuAzl9SatpAhNMukDPrFGBUHskwzMhmSgKtVga50NKqEjs8GvCt8/IHbUA2HnbUScCpBp3mx4N50TtftTuRl3H7/9Y4fnmrGS0c6Vi65qCCw0Bp6Y7isOQpobgofDiC2mjMz0qduHLlMC69VoTPl7xCEswKEEXeLj0fOELa23JoAVQhJH1TUYBYjD7AaiKaSBAyrCHECBF3KMMHtCUh3r2COD0GOSmUk/lm7Bkru3H/7UbsP4Z7UQ/6rRXcNiCp9WU7YKhs6ETJdGkTOUgodvQXWbU1OdieE8oDnOZFJKmex3xphcSAhz2yBd4LpqSizxpiDEjFeVjVGZJ8Bq02sNw2y3koprQa5cqIZmv44QxVRGp+QvZskP4rWLu/Ll4f6YtSsza+iQxZg//Tsvn0/VQB1SOnrJvPahywHlSMqBd5nWJ02ztSlXZ13G9XqCaZUXKqGkSlA6VHmwx0j3YXBbPbCG7vbTnVJl8rqf8FY0g5Gm9AZ/yOg7Zfi7zvC1piFtdxm+Kpn9naTwbbt5coCzLjxZDfPhPbm9HGjSrjSb8HmZgvbTig6ELvsXj3nFD/jkI2ZdeupZN3dpQ99jlloJQLul1KJd723dS+tzw2N20srVqHKVuFVh8arucCGRy/K62qbFG7G0ah6VqTuSpftsv0AQ8q7aV5bGBpx6T7nY7olb7xxbLqbKzL1/GtjskOjgNGC1TQO5gxvdFj3Qo2gjVKfvbQX7nab0FWd5pYq98lCwXOQfvjJ4FQS140o6LAk5X5CbrwoUH/Cg5LBdhKHcqP64EQkQR6xU0/cYoAz14AHKOkWjlVSgNv02pemh2WaRh1EoWOQGjHkcinYRd1T5i4G0rRAfaynXtwhGi4jCkQSaU/eg7oxLb+rjO+seaHKFcmzpRFt5gAsiP11Wy0yQ7FrDD4iOJitI1p0/JuAtwNXV6RqHLgGgnA9sdiQkM0Cd3fO8sS8H3ucnqyvxlDPgbcjS7eWd/DMunuCNKvK57W0o2crSnnXTbGIrtwMt1yjZquCXzA70C0/tKN9hY5e21I0js6Xe1inxqbrbnsiblncJERwLkcv13VMwhrH/96q+PPq4Bd3OCKVUwXWMTjNG2VkFpx9dMve+2aN9Uqj+FNJUS3WEYRenqPkUsq16MHnP/LkGgoDwnIN3lUzEdrP3zGTT47/iwtA9F50mZqWKuHYipNazVaMBIRntEBITs78PjXGW/ZWtfvU/</diagram></mxfile>
|
||||
14
examples/archinstall/docs/help/discord.rst
Normal file
14
examples/archinstall/docs/help/discord.rst
Normal file
@@ -0,0 +1,14 @@
|
||||
.. _help.discord:
|
||||
|
||||
Discord
|
||||
=======
|
||||
|
||||
There's a discord channel which is frequented by some `contributors <https://github.com/archlinux/archinstall/graphs/contributors>`_.
|
||||
|
||||
To join the server, head over to `https://discord.gg/aDeMffrxNg <https://discord.gg/aDeMffrxNg>`_ and join in.
|
||||
There's not many rules other than common sense and to treat others with respect. The general chat is for off-topic things as well.
|
||||
|
||||
There's the ``@Party Animals`` role if you want notifications of new releases which is posted in the ``#Release Party`` channel.
|
||||
Another thing is the ``@Contributors`` role can be activated by contributors by writing ``!verify`` and follow the verification process.
|
||||
|
||||
Hop in, we hope to see you there! : )
|
||||
136
examples/archinstall/docs/help/known_issues.rst
Normal file
136
examples/archinstall/docs/help/known_issues.rst
Normal file
@@ -0,0 +1,136 @@
|
||||
.. _help.known_issues:
|
||||
|
||||
Known Issues
|
||||
============
|
||||
|
||||
Some issues are out of the `archinstall`_ projects scope, and the ones we know of are listed below.
|
||||
|
||||
.. _waiting for time sync:
|
||||
|
||||
Waiting for time sync `#2144`_
|
||||
------------------------------
|
||||
|
||||
The usual root cause of this is the network topology.
|
||||
More specifically `timedatectl show`_ cannot perform a proper time sync against the default servers.
|
||||
|
||||
Restarting ``systemd-timesyncd.service`` might work but most often you need to configure ``/etc/systemd/timesyncd.conf`` to match your network design.
|
||||
|
||||
.. note::
|
||||
|
||||
If you know your time is correct on the machine, you can run ``archinstall --skip-ntp`` to ignore time sync.
|
||||
|
||||
Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete. `#2679`_
|
||||
------------------------------
|
||||
|
||||
The ``archlinux-keyring-wkd-sync.service`` or ``archlinux-keyring-wkd-sync.timer`` can hang "indefinitely" some times.
|
||||
This is usually due to an inability to reach the key servers, or a slow connection towards key servers.
|
||||
|
||||
The script ``/usr/bin/archlinux-keyring-wkd-sync`` can be run manually, to verify if it's executing slowly or not.
|
||||
|
||||
If ``systemctl show --property=ActiveEnterTimestamp --no-pager archlinux-keyring-wkd-sync.timer`` shows nothing, it means the built-in sync never finished. Likewise ``systemctl show --no-pager -p SubState --value archlinux-keyring-wkd-sync.service`` most likely shows ``dead``, which means the service never completed.
|
||||
|
||||
To fix this, try the following:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# killall gpg-agent
|
||||
# rm -rf /etc/pacman.d/gnupg
|
||||
# pacman-key --init
|
||||
# pacman-key --populate
|
||||
# pacman -Sy archlinux-keyring
|
||||
# systemctl restart archlinux-keyring-wkd-sync.timer
|
||||
|
||||
.. note::
|
||||
|
||||
If you know the ISO is the latest, and that you have valid GPG keys, try ``archinstall --skip-wkd`` to ignore waiting for the sync.
|
||||
|
||||
If you skip WKD sync, you might end up with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
> error: archinstall: signature from "Anton Hvornum (Torxed) <torxed@archlinux.org>" is unknown trust
|
||||
> :: File /var/cache/pacman/pkg/archinstall-1.2.3-4-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
|
||||
> Do you want to delete it? [Y/n]
|
||||
|
||||
Missing Nvidia Proprietary Driver `#2002`_
|
||||
------------------------------------------
|
||||
|
||||
In some instances, the nvidia driver might not have all the necessary packages installed.
|
||||
This is due to the kernel selection and/or hardware setups requiring additional packages to work properly.
|
||||
|
||||
A common workaround is to install the package `linux-headers`_ and `nvidia-dkms`_
|
||||
|
||||
ARM, 32bit and other CPU types error out `#1686`_, `#2185`_
|
||||
-----------------------------------------------------------
|
||||
|
||||
This is a bit of a catch-all known issue.
|
||||
Officially `x86_64`_ is only supported by Arch Linux.
|
||||
Hence little effort have been put into supporting other platforms.
|
||||
|
||||
In theory, other architectures should work but small quirks might arise.
|
||||
|
||||
PR's are welcome but please be respectful of the delays in merging.
|
||||
Other fixes, issues or features will be prioritized for the above reasons.
|
||||
|
||||
Keyring is out of date `#2213`_
|
||||
-------------------------------
|
||||
|
||||
Missing key-issues tend to be that the `archlinux-keyring`_ package is out of date, usually as a result of an outdated ISO.
|
||||
There is an attempt from upstream to fix this issue, and it's the `archlinux-keyring-wkd-sync.service`_
|
||||
|
||||
The service starts almost immediately during boot, and if network is not configured in time — the service will fail.
|
||||
Subsequently the ``archinstall`` run might operate on a old keyring despite there being an update service for this.
|
||||
|
||||
There is really no way to reliably over time work around this issue in ``archinstall``.
|
||||
Instead, efforts to the upstream service should be considered the way forward. And/or keys not expiring between a sane amount of ISO's.
|
||||
|
||||
.. note::
|
||||
|
||||
The issue can happen on new ISO's too even as little as a few days after release, as some keys might expire right after the keyring is *"burnt in"* to the ISO.
|
||||
|
||||
.. note::
|
||||
|
||||
Another common issue relating to the network not being configured, is that time might not be set correctly - resulting in the keyring not being able to update. See :ref:`waiting for time sync`.
|
||||
|
||||
AUR packages
|
||||
------------
|
||||
|
||||
This is also a catch-all issue.
|
||||
`AUR is unsupported <https://wiki.archlinux.org/title/Arch_User_Repository#Updating_packages>`_, and until that changes we cannot use AUR packages to solve feature requests in ``archinstall``.
|
||||
|
||||
This means that feature requests like supporting filesystems such as `ZFS`_ can not be added, and issues cannot be solved by using AUR packages either.
|
||||
|
||||
.. note::
|
||||
|
||||
But in spirit of giving the community options, ``archinstall`` supports :ref:`archinstall.Plugins`, which means you can run ``archinstall --plugin <url>`` and source an AUR plugin.
|
||||
|
||||
`torxed/archinstall-aur <https://github.com/torxed/archinstall-aur>`_ is a reference implementation for plugins:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# archinstall --plugin https://archlinux.life/aur-plugin
|
||||
|
||||
`phisch/archinstall-aur <https://github.com/phisch/archinstall-aur>`_ is another alternative:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# archinstall --plugin https://raw.githubusercontent.com/phisch/archinstall-aur/master/archinstall-aur.py
|
||||
|
||||
.. warning::
|
||||
|
||||
This will allow for unsupported usage of AUR during installation.
|
||||
|
||||
.. _#1686: https://github.com/archlinux/archinstall/issues/1686
|
||||
.. _#2002: https://github.com/archlinux/archinstall/issues/2002
|
||||
.. _#2144: https://github.com/archlinux/archinstall/issues/2144
|
||||
.. _#2185: https://github.com/archlinux/archinstall/issues/2185
|
||||
.. _#2213: https://github.com/archlinux/archinstall/issues/2213
|
||||
.. _#2679: https://github.com/archlinux/archinstall/issues/2679
|
||||
.. _linux-headers: https://archlinux.org/packages/core/x86_64/linux-headers/
|
||||
.. _nvidia-dkms: https://archlinux.org/packages/extra/x86_64/nvidia-dkms/
|
||||
.. _x86_64: https://wiki.archlinux.org/title/Frequently_asked_questions#What_architectures_does_Arch_support?
|
||||
.. _archlinux-keyring: https://archlinux.org/packages/core/any/archlinux-keyring/
|
||||
.. _archlinux-keyring-wkd-sync.service: https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/blob/7e672dad10652a80d1cc575d75cdb46442cd7f96/wkd_sync/archlinux-keyring-wkd-sync.service.in
|
||||
.. _ZFS: https://aur.archlinux.org/packages/zfs-linux
|
||||
.. _archinstall: https://github.com/archlinux/archinstall/
|
||||
.. _timedatectl show: https://github.com/archlinux/archinstall/blob/e6344f93f7e476d05bbcd642f2ed91fdde545870/archinstall/lib/installer.py#L136
|
||||
33
examples/archinstall/docs/help/report_bug.rst
Normal file
33
examples/archinstall/docs/help/report_bug.rst
Normal file
@@ -0,0 +1,33 @@
|
||||
.. _help.issues:
|
||||
|
||||
Report Issues & Bugs
|
||||
====================
|
||||
|
||||
Issues and bugs should be reported over at `https://github.com/archlinux/archinstall/issues <https://github.com/archlinux/archinstall/issues>`_.
|
||||
|
||||
General questions, enhancements and security issues can be reported over there too.
|
||||
For quick issues or if you need help, head over to the Discord server which has a help channel.
|
||||
|
||||
Log files
|
||||
---------
|
||||
|
||||
When submitting a help ticket, please include the :code:`/var/log/archinstall/install.log`.
|
||||
It can be found both on the live ISO but also in the installed filesystem if the base packages were strapped in.
|
||||
|
||||
.. tip::
|
||||
| An easy way to submit logs is ``curl -F'file=@/var/log/archinstall/install.log' https://0x0.st``.
|
||||
| Use caution when submitting other log files, but ``archinstall`` pledges to keep ``install.log`` safe for posting publicly!
|
||||
|
||||
There are additional log files under ``/var/log/archinstall/`` that can be useful:
|
||||
|
||||
- ``/var/log/archinstall/user_configuration.json`` - Stores most of the guided answers in the installer
|
||||
- ``/var/log/archinstall/user_credentials.json`` - Stores any usernames or passwords, can be passed to ``--creds``
|
||||
- ``/var/log/archinstall/user_disk_layouts.json`` - Stores the chosen disks and their layouts
|
||||
- ``/var/log/archinstall/install.log`` - A log file over what steps were taken by archinstall
|
||||
- ``/var/log/archinstall/cmd_history.txt`` - A complete command history, command by command in order
|
||||
- ``/var/log/archinstall/cmd_output.txt`` - A raw output from all the commands that were executed by archinstall
|
||||
|
||||
.. warning::
|
||||
|
||||
We only try to guarantee that ``/var/log/archinstall/install.log`` is free from sensitive information.
|
||||
Any other log file should be pasted with **utmost care**!
|
||||
41
examples/archinstall/docs/index.rst
Normal file
41
examples/archinstall/docs/index.rst
Normal file
@@ -0,0 +1,41 @@
|
||||
archinstall Documentation
|
||||
=========================
|
||||
|
||||
**archinstall** is library which can be used to install Arch Linux.
|
||||
The library comes packaged with different pre-configured installers, such as the default :ref:`guided` installer.
|
||||
|
||||
Some of the features of Archinstall are:
|
||||
|
||||
* **Context friendly.** The library always executes calls in sequential order to ensure installation-steps don't overlap or execute in the wrong order. It also supports *(and uses)* context wrappers to ensure cleanup and final tasks such as ``mkinitcpio`` are called when needed.
|
||||
|
||||
* **Full transparency** Logs and insights can be found at ``/var/log/archinstall`` both in the live ISO and partially on the installed system.
|
||||
|
||||
* **Accessibility friendly** Archinstall works with ``espeakup`` and other accessibility tools thanks to the use of a TUI.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Running Archinstall
|
||||
|
||||
installing/guided
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: Getting help
|
||||
|
||||
help/known_issues
|
||||
help/report_bug
|
||||
help/discord
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: Archinstall as a library
|
||||
|
||||
installing/python
|
||||
examples/python
|
||||
archinstall/plugins
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: API Reference
|
||||
|
||||
archinstall/Installer
|
||||
297
examples/archinstall/docs/installing/guided.rst
Normal file
297
examples/archinstall/docs/installing/guided.rst
Normal file
@@ -0,0 +1,297 @@
|
||||
.. _guided:
|
||||
|
||||
Guided installation
|
||||
===================
|
||||
|
||||
Archinstall ships with a pre-programmed `Guided Installer`_ guiding you through the mandatory steps as well as some optional configurations that can be done.
|
||||
|
||||
.. note::
|
||||
|
||||
Other pre-programmed scripts can be invoked by executing :code:`archinstall --script <script>` *(without .py)*. To see a complete list of scripts, run :code:`archinstall --script list` or check the source code `scripts`_ directory.
|
||||
|
||||
.. note::
|
||||
|
||||
It's recommended to run ``archinstall`` from the official Arch Linux ISO.
|
||||
|
||||
|
||||
.. 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.
|
||||
|
||||
Running the guided installation
|
||||
-------------------------------
|
||||
|
||||
To start the installer, run the following in the latest Arch Linux ISO:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
archinstall
|
||||
|
||||
Since the `Guided Installer`_ is the default script, this is the equivalent of running :code:`archinstall guided`
|
||||
|
||||
|
||||
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 two configuration files, both are optional.
|
||||
|
||||
``--config``
|
||||
------------
|
||||
|
||||
This parameter takes a local :code:`.json` file as argument and contains the overall configuration and menu answers for the guided installer.
|
||||
|
||||
``--config-url``
|
||||
------------
|
||||
|
||||
This parameter takes a remote :code:`.json` file as argument and contains the overall configuration and menu answers for the guided installer.
|
||||
|
||||
.. note::
|
||||
|
||||
You can always get the latest options for this file with ``archinstall --dry-run``, this executes the guided installer in a safe mode where no permanent actions will be taken on your system but simulate a run and save the configuration to disk.
|
||||
|
||||
Example usage
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
archinstall --config config.json
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
archinstall --config-url https://domain.lan/config.json
|
||||
|
||||
The contents of :code:`https://domain.lan/config.json`:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"additional-repositories": [],
|
||||
"archinstall-language": "English",
|
||||
"audio_config": null,
|
||||
"bootloader": "Systemd-boot",
|
||||
"debug": false,
|
||||
"disk_config": {
|
||||
"config_type": "manual_partitioning",
|
||||
"device_modifications": [
|
||||
{
|
||||
"device": "/dev/sda",
|
||||
"partitions": [
|
||||
{
|
||||
"btrfs": [],
|
||||
"flags": [
|
||||
"boot"
|
||||
],
|
||||
"fs_type": "fat32",
|
||||
"length": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 99982592
|
||||
},
|
||||
"mount_options": [],
|
||||
"mountpoint": "/boot",
|
||||
"obj_id": "369f31a8-2781-4d6b-96e7-75680552b7c9",
|
||||
"start": {
|
||||
"sector_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 512
|
||||
},
|
||||
"total_size": null,
|
||||
"unit": "sectors",
|
||||
"value": 34
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
},
|
||||
{
|
||||
"btrfs": [],
|
||||
"flags": [],
|
||||
"fs_type": "fat32",
|
||||
"length": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 100000000
|
||||
},
|
||||
"mount_options": [],
|
||||
"mountpoint": "/efi",
|
||||
"obj_id": "13cf2c96-8b0f-4ade-abaa-c530be589aad",
|
||||
"start": {
|
||||
"sector_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 512
|
||||
},
|
||||
"total_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 16106127360
|
||||
},
|
||||
"unit": "MB",
|
||||
"value": 100
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
},
|
||||
{
|
||||
"btrfs": [],
|
||||
"flags": [],
|
||||
"fs_type": "ext4",
|
||||
"length": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 15805127360
|
||||
},
|
||||
"mount_options": [],
|
||||
"mountpoint": "/",
|
||||
"obj_id": "3e75d045-21a4-429d-897e-8ec19a006e8b",
|
||||
"start": {
|
||||
"sector_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 512
|
||||
},
|
||||
"total_size": {
|
||||
"sector_size": null,
|
||||
"total_size": null,
|
||||
"unit": "B",
|
||||
"value": 16106127360
|
||||
},
|
||||
"unit": "MB",
|
||||
"value": 301
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
}
|
||||
],
|
||||
"wipe": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"disk_encryption": {
|
||||
"encryption_type": "luks",
|
||||
"partitions": [
|
||||
"3e75d045-21a4-429d-897e-8ec19a006e8b"
|
||||
]
|
||||
},
|
||||
"hostname": "archlinux",
|
||||
"kernels": [
|
||||
"linux"
|
||||
],
|
||||
"locale_config": {
|
||||
"kb_layout": "us",
|
||||
"sys_enc": "UTF-8",
|
||||
"sys_lang": "en_US"
|
||||
},
|
||||
"mirror_config": {
|
||||
"custom_servers": [
|
||||
{
|
||||
"url": "https://mymirror.com/$repo/os/$arch"
|
||||
}
|
||||
],
|
||||
"mirror_regions": {
|
||||
"Australia": [
|
||||
"http://archlinux.mirror.digitalpacific.com.au/$repo/os/$arch"
|
||||
]
|
||||
},
|
||||
"optional_repositories": [
|
||||
"testing"
|
||||
],
|
||||
"custom_repositories": [
|
||||
{
|
||||
"name": "myrepo",
|
||||
"url": "https://myrepo.com/$repo/os/$arch",
|
||||
"sign_check": "Required",
|
||||
"sign_option": "TrustAll"
|
||||
}
|
||||
]
|
||||
},
|
||||
"network_config": {},
|
||||
"no_pkg_lookups": false,
|
||||
"ntp": true,
|
||||
"offline": false,
|
||||
"packages": [],
|
||||
"parallel downloads": 0,
|
||||
"profile_config": null,
|
||||
"save_config": null,
|
||||
"script": "guided",
|
||||
"silent": false,
|
||||
"swap": true,
|
||||
"timezone": "UTC",
|
||||
"version": "2.6.0"
|
||||
}
|
||||
|
||||
``--config`` options
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. warning::
|
||||
|
||||
All key and value entries must conform to the JSON standard. Below is human readable examples with links, effectively breaking the syntax. Adapt the descriptions below to suit your needs and the JSON format.
|
||||
|
||||
.. note::
|
||||
|
||||
Scroll to the right in the table to see required options.
|
||||
|
||||
.. csv-table:: JSON options
|
||||
:file: ../cli_parameters/config/config_options.csv
|
||||
:widths: 15, 40, 40, 5
|
||||
:escape: !
|
||||
:header-rows: 1
|
||||
|
||||
.. I'd like to keep this note, as this is the intended behavior of archinstall.
|
||||
.. note::
|
||||
|
||||
If no entries are found in ``disk_config``, archinstall guided installation will use whatever is mounted currently under ``/mnt/archinstall`` without performing any disk operations.
|
||||
|
||||
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_enc_password" : "SecretSanta2022"
|
||||
}
|
||||
|
||||
.. list-table:: ``--creds`` options
|
||||
:widths: 25 25 40 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Key
|
||||
- Values
|
||||
- Description
|
||||
- Required
|
||||
* - ``!encryption-password``
|
||||
- ``str``
|
||||
- Password to encrypt disk, not encrypted if password not provided
|
||||
- No
|
||||
* - ``root_enc_password``
|
||||
- ``str``
|
||||
- The root account password
|
||||
- No
|
||||
* - ``users``
|
||||
- .. code-block:: json
|
||||
|
||||
{
|
||||
"username": "<USERNAME>",
|
||||
"enc_password": "<PASSWORD_HASH>",
|
||||
"sudo": false
|
||||
}
|
||||
- List of regular user credentials, see configuration for reference
|
||||
- Maybe
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
``users`` is optional only if ``root_enc_password`` was set. ``users`` will be enforced otherwise and the minimum amount of users with sudo privileges required will be set to 1.
|
||||
|
||||
.. note::
|
||||
|
||||
.. _scripts: https://github.com/archlinux/archinstall/tree/master/archinstall/scripts
|
||||
.. _Guided Installer: https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py
|
||||
59
examples/archinstall/docs/installing/python.rst
Normal file
59
examples/archinstall/docs/installing/python.rst
Normal file
@@ -0,0 +1,59 @@
|
||||
.. _installing.python:
|
||||
|
||||
Python library
|
||||
==============
|
||||
|
||||
Archinstall ships on `PyPi <https://pypi.org/>`_ as `archinstall <pypi.org/project/archinstall/>`_.
|
||||
But the library can be installed manually as well.
|
||||
|
||||
.. warning::
|
||||
These steps are not required if you want to use archinstall on the official Arch Linux ISO.
|
||||
|
||||
Installing with pacman
|
||||
----------------------
|
||||
|
||||
Archinstall is on the `official repositories <https://wiki.archlinux.org/index.php/Official_repositories>`_.
|
||||
And it will also install archinstall as a python library.
|
||||
|
||||
To install both the library and the archinstall script:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
pacman -S archinstall
|
||||
|
||||
Alternatively, you can install only the library and not the helper executable using the ``python-archinstall`` package.
|
||||
|
||||
Installing from PyPI
|
||||
--------------------
|
||||
|
||||
The basic concept of PyPI applies using `pip`.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
pip install archinstall
|
||||
|
||||
.. _installing.python.manual:
|
||||
|
||||
Install using source code
|
||||
-------------------------
|
||||
|
||||
You can also install using the source code.
|
||||
For sake of simplicity we will use ``git clone`` in this example.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
git clone https://github.com/archlinux/archinstall
|
||||
|
||||
You can either move the folder into your project and simply do
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import archinstall
|
||||
|
||||
Or you can PyPa's `build <https://github.com/pypa/build>`_ and `installer <https://github.com/pypa/installer>`_ to install it into pythons module path.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ cd archinstall
|
||||
$ python -m build .
|
||||
$ python -m installer dist/*.whl
|
||||
BIN
examples/archinstall/docs/logo.png
Normal file
BIN
examples/archinstall/docs/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
12
examples/archinstall/docs/pull_request_template.md
Normal file
12
examples/archinstall/docs/pull_request_template.md
Normal file
@@ -0,0 +1,12 @@
|
||||
- This fix issue: <!-- #13, #15 and #16 for instance. Or ignore if you're adding new functionality -->
|
||||
|
||||
## PR Description:
|
||||
|
||||
<!-- Please describe what changes this PR introduces, a good example would be: https://github.com/archlinux/archinstall/pull/1377 -->
|
||||
|
||||
## Tests and Checks
|
||||
- [ ] I have tested the code!<br>
|
||||
<!--
|
||||
After submitting your PR, an ISO can be downloaded below the PR description. After testing it you can check the box
|
||||
You can do manual tests too, like isolated function tests, just something!
|
||||
-->
|
||||
Reference in New Issue
Block a user