From a68a23d10a08052091df9550d119810db94a2fdf Mon Sep 17 00:00:00 2001 From: HTV04 <53527582+HTV04@users.noreply.github.com> Date: Tue, 4 Jan 2022 08:31:21 -0500 Subject: Add prompt for /home partition (#801) --- archinstall/lib/disk/user_guides.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'archinstall') diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py index 8dbd15dd..3d48c104 100644 --- a/archinstall/lib/disk/user_guides.py +++ b/archinstall/lib/disk/user_guides.py @@ -9,6 +9,7 @@ def suggest_single_disk_layout(block_device, default_filesystem=None, advanced_o MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb using_subvolumes = False + using_home_partition = False if default_filesystem == 'btrfs': using_subvolumes = input('Would you like to use BTRFS subvolumes with a default structure? (Y/n): ').strip().lower() in ('', 'y', 'yes') @@ -45,10 +46,14 @@ def suggest_single_disk_layout(block_device, default_filesystem=None, advanced_o } }) + if not using_subvolumes and block_device.size >= MIN_SIZE_TO_ALLOW_HOME_PART: + using_home_partition = input('Would you like to create a separate partition for /home? (Y/n): ').strip().lower() in ('', 'y', 'yes') + # Set a size for / (/root) - if using_subvolumes or block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART: + if using_subvolumes or block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART or not using_home_partition: # We'll use subvolumes # Or the disk size is too small to allow for a separate /home + # Or the user doesn't want to create a separate partition for /home layout[block_device.path]['partitions'][-1]['size'] = '100%' else: layout[block_device.path]['partitions'][-1]['size'] = f"{min(block_device.size, 20)}GB" @@ -69,7 +74,7 @@ def suggest_single_disk_layout(block_device, default_filesystem=None, advanced_o # else: # pass # ... implement a guided setup - elif block_device.size >= MIN_SIZE_TO_ALLOW_HOME_PART: + elif using_home_partition: # If we don't want to use subvolumes, # But we want to be able to re-use data between re-installs.. # A second partition for /home would be nice if we have the space for it -- cgit v1.2.3-54-g00ecf From ddb0810af0d0bb3fd9aa955d5fee18526b1fd043 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 5 Jan 2022 23:42:06 +0100 Subject: 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 --- archinstall/lib/exceptions.py | 4 + archinstall/lib/simple_menu.py | 3 +- docs/archinstall/general.rst | 18 +- docs/help/discord.rst | 10 +- docs/help/issues.rst | 12 +- docs/index.rst | 24 +-- docs/installing/guided.rst | 388 ++++++++++++++++++----------------------- docs/installing/python.rst | 38 ++-- 8 files changed, 231 insertions(+), 266 deletions(-) (limited to 'archinstall') diff --git a/archinstall/lib/exceptions.py b/archinstall/lib/exceptions.py index aa86124b..6cf00026 100644 --- a/archinstall/lib/exceptions.py +++ b/archinstall/lib/exceptions.py @@ -23,6 +23,10 @@ class SysCallError(BaseException): self.exit_code = exit_code +class PermissionError(BaseException): + pass + + class ProfileNotFound(BaseException): pass diff --git a/archinstall/lib/simple_menu.py b/archinstall/lib/simple_menu.py index 6e4853ea..bc78e703 100644 --- a/archinstall/lib/simple_menu.py +++ b/archinstall/lib/simple_menu.py @@ -59,8 +59,7 @@ from typing import ( try: import termios except ImportError as e: - raise NotImplementedError('"{}" is currently not supported.'.format(platform.system())) from e - + pass # raise NotImplementedError('"{}" is currently not supported.'.format(platform.system())) from e __author__ = "Ingo Meyer" __email__ = "i.meyer@fz-juelich.de" diff --git a/docs/archinstall/general.rst b/docs/archinstall/general.rst index 79406ea3..804d4416 100644 --- a/docs/archinstall/general.rst +++ b/docs/archinstall/general.rst @@ -12,7 +12,7 @@ Packages ======== .. autofunction:: archinstall.find_package -Be + .. autofunction:: archinstall.find_packages Locale related @@ -68,10 +68,20 @@ Luks (Disk encryption) Networking ========== -.. autofunction:: archinstall.getHwAddr +.. autofunction:: archinstall.get_hw_addr .. autofunction:: archinstall.list_interfaces +.. autofunction:: archinstall.check_mirror_reachable + +.. autofunction:: archinstall.enrich_iface_types + +.. autofunction:: archinstall.get_interface_from_mac + +.. autofunction:: archinstall.wireless_scan + +.. autofunction:: archinstall.get_wireless_networks + General ======= @@ -79,7 +89,9 @@ General .. autofunction:: archinstall.locate_binary -.. autofunction:: archinstall.sys_command +.. autofunction:: archinstall.SysCommand + +.. autofunction:: archinstall.SysCommandWorker Exceptions ========== diff --git a/docs/help/discord.rst b/docs/help/discord.rst index 4075bc54..f0c7c279 100644 --- a/docs/help/discord.rst +++ b/docs/help/discord.rst @@ -5,10 +5,10 @@ Discord There's a discord channel which is frequented by some `contributors `_. -To join the server, head over to `https://discord.gg/cqXU88y `_'s server and join in. -There's not many rules other than common sense and to treat others with respect. +| To join the server, head over to `https://discord.gg/cqXU88y `_ 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 which you can get by writing `!verify` and verify that you're a contributor. +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, I hope to see you there! : ) +Hop in, we hope to see you there! : ) diff --git a/docs/help/issues.rst b/docs/help/issues.rst index 7e8d04c0..da4181af 100644 --- a/docs/help/issues.rst +++ b/docs/help/issues.rst @@ -8,15 +8,17 @@ Issues and bugs should be reported over at `https://github.com/archlinux/archins 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. -Submitting a help ticket -======================== +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. -| There are additional worker files, these worker files contain individual command input and output. -| These worker files are located in :code:`~/.cache/archinstall/` and do not need to be submitted by default when submitting issues. +| There are additional log files under ``/var/log/archinstall/`` that can be useful. +| For instance the ``cmd_history.txt`` which contains a fully transparent list of all commands executed. +| Or ``cmd_output.txt`` which is a transcript and contains any output seen on the screen. .. warning:: - Worker log-files *may* contain sensitive information such as **passwords** and **private information**. Never submit these logs without going through them manually making sure they're good for submission. Or submit only parts of them which are relevant to the issue itself. + We only try to guarantee that ``/var/log/archinstall/install.log`` is free from sensitive information. + Any other log should be pasted with **utmost care**! diff --git a/docs/index.rst b/docs/index.rst index c9a6aca4..3e4b5203 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,18 +1,20 @@ -python-archinstall Documentation -================================ +archinstall Documentation +========================= -| **python-archinstall** *(or, archinstall for short)* is a helper library to install Arch Linux and manage services, packages and other things. -| It comes packaged with different pre-configured installers, such as the :ref:`guided_installation` installer. +| **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. | -| A demo can be viewed here: `https://www.youtube.com/watch?v=9Xt7X_Iqg6E `_ which uses the default guided installer. +| A demo of the :ref:`guided` installer can be seen here: `https://www.youtube.com/watch?v=9Xt7X_Iqg6E `_. Some of the features of Archinstall are: * **No external dependencies or installation requirements.** Runs without any external requirements or installation processes. -* **Single threaded and 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 things such as `sync` are called so data and configurations aren't lost. +* **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. -* **Supports standalone executable** The library can be compiled into a single executable and run on any system with or without Python. This is ideal for live mediums that don't want to ship Python as a big dependency. +* **Full transparancy** Logs and insights can be found at ``/var/log/archinstall`` both in the live ISO and the installed system. + +* **Accessibility friendly** Archinstall works with ``espeakup`` and other accessibility tools thanks to the use of a TUI. .. toctree:: :maxdepth: 3 @@ -29,16 +31,16 @@ Some of the features of Archinstall are: .. toctree:: :maxdepth: 3 - :caption: Installing the library + :caption: Archinstall as a library installing/python - installing/binary + examples/python .. toctree:: :maxdepth: 3 - :caption: Using the library + :caption: Archinstall as a binary - examples/python + installing/binary examples/binary .. examples/scripting 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 `_. 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/ `_) to learn more +| This is the default script the Arch Linux `Archinstall package `_. +| 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 `_ to get that to work. + There are other scripts and they can be invoked by executing `archinstall