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-09-19general: remove all found white-spacesSecondThundeR
Also this change adds new line at the end for some scripts
2021-09-18Removing hardcoded btrfs for suggested partition layouts.Anton Hvornum
2021-09-15Making sure the drive paths are in the JSON structure, and not the class ↵Anton Hvornum
object, as it won't work seamlessly to access for instance storage['disk_layouts'][ClassInstance()] if it's not the identical mem copy of the object we're accessing, so strings are better for storage/comparisons.
2021-09-14Added a 'hidden' variable called --disk-sleep for delaying disk partition up ↵Anton Hvornum
time before continuing after a format. This is an ugly hack to get around some disk issues, for now.
2021-09-06Merged in master.Anton Hvornum
2021-09-06Merge pull request #610 from luckspt/patch-2Anton Hvornum
Typo
2021-09-06Corrected some minor modifications mentioned in #595 as well as merged in ↵Anton Hvornum
latest changes from master. For future PR's do create a patch-branch for upstream patches to avoid changes to your local repo.
2021-09-04Fixed edge case where size of disks could be exactly 40GB and a /home would ↵Anton Hvornum
never be created on single devices.
2021-09-04Added a PARTUUID -> parted index, this in order to properly set the boot ↵Anton Hvornum
flag on the correct partition. Perhaps there's a smarter way. I suspect parted can operate on a given partition ID, but haven't found the docs for it yet.
2021-09-04Simplified lambda and made it filter out non relevant disks for the ↵Anton Hvornum
selection process.
2021-09-04Fixed filtering if largest disk selectionAnton Hvornum
2021-08-18Reworking logic that selects / and /home for multi-disk configurations. Also ↵Anton Hvornum
added some more debugging
2021-08-17Fixed a prompt error in one of the parted calls. Also started on a more ↵Anton Hvornum
reliable size-conversion that isn't limited to Gigabytes in free_space().
2021-07-28TypoLucas Pinto
Fix a tiny typo
2021-07-18fix for #602, running mklabel before formattingYash Tripathi
2021-07-07Fix encryption + grub both in UEFI and BIOS systems.Hamad Al Marri
We need to have two partitions in BIOS one for boot (grub) and the other for root (/). The format of the boot partition is ext2 (so it is added). If disk is chosen to be encrypted, `then /etc/default/grub` is edited as the followings: https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#Configuring_GRUB_2 Issue: https://github.com/archlinux/archinstall/issues/586 This work is done while working on CachyOS which is Arch based and it is using customized archinstaller. To test these changes you can try CachyOS installer which supports encrypted disk with grub (https://wiki.cachyos.org/). Hamad
2021-07-04Removed debuggingAnton Hvornum
2021-07-04Added a filesystem check when marking for formatting, this should ensure ↵Anton Hvornum
that encrypted volumes get a proper filesystem without having to go through an extra step of selecting filesystem.
2021-07-03Added options to mark/unmark partitions for formatting (useful when re-using ↵Anton Hvornum
partitions, and fine tune which data to save and which to wipe). Setting a desired filesystem for a partition (both new ones and the ones being re-used).
2021-07-03Saving partitioning layout in a layout file (JSON format)Anton Hvornum
2021-07-03Missing .format() on 'use entire disk' stepAnton Hvornum
2021-06-15Added more detail to BlockDevice.__repr__Anton Hvornum
2021-06-15Added fs-type and formatting on encrypted partitions that haven't been given ↵Anton Hvornum
a fs-type prior when re-using partitions.
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