Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk.py
AgeCommit message (Collapse)Author
2021-06-14moved valid_parted_position to disk. And made it handle float numbers.Anton Hvornum
2021-06-14Since all fs-type's appear to be lower-case in 'man parted', we'll check ↵Anton Hvornum
against a lowered list in general for supported fs-types.
2021-06-14Added BlockDevice.largest_free_space and BlockDevice.free_space (iterator). ↵Anton Hvornum
Also added additional supported filesystems to parted. Apparently the online manpages doesn't agree with the local manpages, my previous statement that these gets ignored is false so added those in and removed some that isn't supported by my local manpages, 'ufs' for instance.
2021-06-13Started on multiple-disk-re-usage selection process.Anton Hvornum
2021-06-13Removed old safety logics for partitions. Partitions will now always be ↵Anton Hvornum
formatted when .format() is called on them. The safety now lay in the code parsing the declerative partition layouts. Also added the encrypt/mount logic for encrypted partitions, which by default will be unencrypted unless a password is specified.
2021-06-13Added multi-disk suggested layout. It's sorted on performance, and the first ↵Anton Hvornum
relevant disk with the closest size to a desired size will be used for root, and the same (exluding the one already used) will be used for /home
2021-06-13Merge branch 'torxed-rework-partitioning' of ↵Anton Hvornum
github.com:archlinux/archinstall into torxed-rework-partitioning
2021-06-13Working suggested single disk layout, preparing for multiple selections.Anton Hvornum
2021-06-11Added BlockDevice.spinning and BlockDevice.bus_typeAnton Hvornum
2021-06-11Made it so that the .partitions property of Install() fetches from live ↵Anton Hvornum
data, rather than storing and caching partitions on initation. Since it now supports mounting a partition layout given by external usage.
2021-06-10Fixed format detection on commands, should be using exit codes instead?Anton Hvornum
2021-06-10Renamed vfat -> fat32 for the purpose of consistency. Most actions are ↵Anton Hvornum
referring to fat32, it's only mkfs that has the notion vfat and then -F32 for format 32. And I think vfat confuses more people than it does good, so sticking with fat32 which works better with parted as well. Also added the partitioning logic, started on the mounting logic
2021-06-10Added wipe support to layout definitions. Also changed default start ↵Anton Hvornum
positions of partitions to 1MiB in.
2021-06-10Merging in latest changes from master.Anton Hvornum
2021-06-10Started working on partitioning logic from declarative layouts.Anton Hvornum
2021-06-09Try to unmount devices before attempting to run mklabelDylan M. Taylor
2021-06-07Started working on the load_layout functionAnton Hvornum
2021-06-06Added sorting logic for BlockDevice. Also swapped sys_command() to ↵Anton Hvornum
SysCommand() and refined the logic around those calls.
2021-06-06As of Python 3.6 and 3.7, dictionaries are ordered by insertion by default. ↵Anton Hvornum
We there for no longer need to use OrderedDict for our dictionaries where this logic is required.
2021-06-04Merge branch 'master' of github.com:archlinux/archinstall into ↵Anton Hvornum
torxed-rework-partitioning
2021-06-03Attempt to avoid crashing when encountering swap partitions in has_content()Dylan M. Taylor
2021-05-30Fix typo in error msgCsonka Mihaly
2021-05-21Merging in latest changes from master and resolved conflicts.Anton Hvornum
2021-05-19Added support for getting configuration from a config file (#364)Yash Tripathi
* added support for ingesting config * fixed condition to check key in dictionary * Removed redundant code, profile and desktop keys are now optional * Added base-config.json and support for pulling credentials from .env * added base config file and env file for users credentials * added silent install switch * added python-dotenv as a dependency * Updated Readme to include argparse changes as well as config ingestion * Updated Readme to include argparse changes as well as config ingestion * fixed typo in pyproject.toml * Replaced the magic __builtin__ global variable. This should fix mypy complaints while still retaining the same functionality, kinda. It's less automatic but it's also less of dark magic, which makes sense for anyone but me. * Fixes string index error. * Quotation error. * fixed initializing --script argument * added python-dotenv as a dependency * Installation can't be silent if config is not passed * fixed silent install help * fixed condition for ask_user_questions * reverted to creating profile object properly * Cleaned up and incorporated suggestions * added Profile import * added condition if Profile is null * fixed condition * updated parsing vars from argparse * removed loading users from .env * Reworking SysCommand & Moving to localectl for locale related activities (#4) * Moving to `localectl` rather than local file manipulation *(both for listing locales and setting them)*. * Swapped `loadkeys` for localectl. * Renamed `main` to `maim` in awesome profile. * Created `archinstall.Boot(<installation>)` which spawns a `systemd-nspawn` container against the installation target. * Exposing systemd.py's internals to archinstall global scope. * Re-worked `SysCommand` completely, it's now a wrapper for `SysCommandWorker` which supports interacting with the process in a different way. `SysCommand` should behave just like the old one, for backwards compatibility reasons. This fixes #68 and #69. * `SysCommand()` now has a `.decode()` function that defaults to `UTF-8`. * Adding back peak_output=True to pacstrap. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com> Co-authored-by: Dylan Taylor <dylan@dylanmtaylor.com> Co-authored-by: Anton Hvornum <anton@hvornum.se> Co-authored-by: Anton Hvornum <anton.feeds@gmail.com> * fixed indent * removed redundant import * removed duplicate import * removed duplicate import Co-authored-by: Anton Hvornum <anton.feeds@gmail.com> Co-authored-by: Anton Hvornum <anton@hvornum.se> Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2021-05-19Reworking SysCommand & Moving to localectl for locale related activitiesAnton Hvornum
* Moving to `localectl` rather than local file manipulation *(both for listing locales and setting them)*. * Swapped `loadkeys` for localectl. * Renamed `main` to `maim` in awesome profile. * Created `archinstall.Boot(<installation>)` which spawns a `systemd-nspawn` container against the installation target. * Exposing systemd.py's internals to archinstall global scope. * Re-worked `SysCommand` completely, it's now a wrapper for `SysCommandWorker` which supports interacting with the process in a different way. `SysCommand` should behave just like the old one, for backwards compatibility reasons. This fixes #68 and #69. * `SysCommand()` now has a `.decode()` function that defaults to `UTF-8`. * Adding back peak_output=True to pacstrap. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com> Co-authored-by: Dylan Taylor <dylan@dylanmtaylor.com>
2021-05-15Fix some variable shadowing issuesDylan Taylor
2021-05-15Perform refactoring to PEP 8 naming conventionsDylan Taylor
2021-05-15Merge branch 'lxqt-lightdm' into formatting2Dylan Taylor
2021-05-15Fix missing Optional importDylan M. Taylor
2021-05-15Merge pull request #450 from charlesvdv/masterAnton Hvornum
propagate options when mounting a partition
2021-05-15Remove some redundant parenthesisDylan Taylor
2021-05-15More formatting fixes to satisfy PEP 8Dylan Taylor
2021-05-15Fix E101: mix of spaces and tabsDylan Taylor
2021-05-15propagate options when mounting a partitionCharles Vandevoorde
2021-05-15f-string fixesDylan Taylor
2021-05-15Whitespace changesDylan Taylor
2021-05-15Cleanup imports and disk.py a bit moreDylan Taylor
2021-05-15Many more manual changesDylan Taylor
2021-05-12some type hint fixes and a bad catch fixadvaithm
2021-05-11Renamed keyboard-language to keyboard-layout to avoid confusion. Added ↵Anton Hvornum
encryption checks for disk layout selection, if disk encryption password is given - but no partitions were found using encryption, the user will be asked which partitions to encrypt - unless there's only /boot and /<root> then we'll automatically select /<root> because that's what we support for now.
2021-05-11Spelling errors, and filtered the output a bit.Anton Hvornum
2021-05-10Tested the workflow, and it works pretty decent. There's some kinks to work ↵Anton Hvornum
out. Added BlockDevice().size as well.
2021-05-10Added Partition() properties: sector_size, start, end, boot, partition_type ↵Anton Hvornum
and a __dump__() function. As well as kept working on the partition logic of guided to have a more traditional workflow of adding/deleting partitions in a guided manner, as well as the ability to mark partitions as encrypted/boot and set target mountpoints.
2021-05-06Removed obsolete variable in prep for multi-disk support.Anton Hvornum
2021-05-01Merge branch 'master' of https://github.com/archlinux/archinstall into ↵Anton Hvornum
torxed-partitioning
2021-04-29Added a postgresql application profile. (#383)Anton Hvornum
* Added a postgres application profile. Also introducing runas to the arch_chroot of the installation, to run commands as emulated users. This is highly WIP at the moment. * Fixing top-level-listing of profiles. As well as testing some postgres installation steps. * Removed dupe functions. * Added safety check in case a comment mentions the top level profile thing. * Patching namespace corruption. * Avoiding runtime collision due to installation not being initiated yet. * Allow for parameterization of filesystem in guided. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
2021-04-28Added a mini curses class and generic-multi-select (#362)Anton Hvornum
* Added a mini curses class. It can do some simple tricks to iterate over menu options and indicate which ones are chosen using generic_multi_select(). * Include the default parameter if set. * Modified 'select_kernel()' to use the new multi-select. * Sneaky character got in. * removed some debugging * removed some debugging * Spelling error * Adding error handling and loop support. * Enforce that 'default' is always selected if no other option is selected. * Fixed backspace issues and ghosting. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
2021-04-27Moving away from custom log levels, to something that's well defined. (#360)Anton Hvornum
* Moving away from custom log levels, to something that's well defined. * Added backward compability to log() as well. * Added an option to force log messages out on screen even if the level is below the log level threashold. * Added force log messages when wrong notation is used. * Added some more length to the deprecated message * Swapped all log levels to use logging.<level> instead. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
2021-04-16Adding debug data to the log. It will now contain lsblk before and after the ↵Anton Hvornum
installation to help with detecting any potential information. Also removed a traceback log that was for debugging purposes.
2021-04-12Merge branch 'master' into torxed-v2.2.0Anton Hvornum