Oleksandr Zinkevych
165d47f4bb
Fix use_mirrors
2021-10-15 18:21:35 +03:00
Oleksandr Zinkevych
427492d7c9
Fix re_rank_mirrors
2021-10-15 18:03:08 +03:00
Hugo Ankarloo
5bcbb50936
Fix Bug: 'Suggest partition layout' crashes
...
File: lib/user_interaction.py
When function manage_new_and_existing_partitions() is used, and
'Suggest partition layout' is selected, the installer crashes.
REASON
Bug was introduced in commit 9e67ce3 , when partition layout was
changed to use device.path as keys (instead of device).
It seems all necessary changes were made for this, except this one.
2021-09-21 00:38:20 +02:00
Hugo Ankarloo
e71a41377d
Merge branch 'master' into svintooo-fix
...
Sync branch svintooo-fix with latest code changes on master.
2021-09-20 21:52:14 +02:00
Hugo Ankarloo
26244212cf
Fix Bug: Cannot get partuuid from loop device
...
File: lib/disk.py
When installing on a loopback device (a.k.a loop device), function
Filesystem.partuuid_to_index() crashes with a JSON parsing error.
REASON
1) For loop devices, the property BlockDevice.device returns the
actual image file (back-file) of the loop device instead of the
/dev/X device.
2) Function Filesystem.partuuid_to_index() executes `lsblk --json`
against BlockDevice.device .
3) `lsblk` fails and prints the error "not a block device" to stderr.
This causes the output to not be valid JSON.
4) Code crashes when JSON parser tries to parse the output.
SOLUTION
- Make sure property BlockDevice.device only returns a valid block
device.
- Create new function BlockDevice.device_or_backfile that mimics
the present behaviour of BlockDevice.device.
- Use BlockDevice.device_or_backfile in function
BlockDevice.__repr__().
SOLUTION REASONING
I can only see one reason behind BlockDevice.device returning
the back-file of a loop device, and that is to show the back-file
to the user (instead of /dev/X) when printing the string
representation of a BlockDevice.
All other parts of the code can use the /dev/X file just fine.
And IMO it makes more sense that a property named `device` only
returns devices, and not normal files.
2021-09-20 21:46:56 +02:00
Hugo Ankarloo
915ae88947
Fix Bug: Set filesystem crashes if no partitions
...
File: lib/user_interaction.py
When function manage_new_and_existing_partitions() is used, and
no partitions are configured, and 'Set desired filesystem for a
partition' is selected, the installer crashes.
2021-09-20 20:17:39 +02:00
Hugo Ankarloo
ffbfafb354
Fix Bug: config b0rked by Suggest partition layout
...
File: lib/user_interaction.py
When function manage_new_and_existing_partitions() is used, and
'Suggest partition layout' is selected, the partition info is not
correctly stored in the config.
Instead of: {"partitions": [{...}, {...}]}
You get: {"partitions": {"partitions": [{...}, {...}], "wipe":True}}
2021-09-20 19:58:56 +02:00
Hugo Ankarloo
d2d80113b3
Fix Bug: Timezone is ignored, always same as host
...
Bug affects normal interactive usage (example/guided.py).
The timezone configured in the installer is not the timezone that
ends up in the new installed system. Instead, the timezone
used in the host system (from where the installer is run) is the
one that finally ends up being used.
Reason: systemd-nspawn by default copies the host timezone into
the target. And systemd-nspawn is run when keyboard-layout is
changed (which is done after changing the timezone).
Solution: Add option `--timezone=off` to systemd-nspawn, which
hinders affecting the timezone in the target.
2021-09-20 19:30:07 +02:00
SecondThundeR
ffe38c879a
general: remove all found white-spaces
...
Also this change adds new line at the end for some scripts
2021-09-19 15:49:44 +03:00
Anton Hvornum
ed823be3ba
Refactoring and cleaning up a bit
...
I'm making sure that the JSON structure of the user config can get a say in how the subvolumes should be used later on. As well as splitting up where the logic should be to make it easier to maintain.
2021-09-18 15:52:29 +02:00
Anton Hvornum
68212dd32c
Preparing to split up ./lib/disk.py
...
And added some sane(?) defaults, which I'll massage into code some how.
2021-09-18 14:54:42 +02:00
Anton Hvornum
6a125d5bd2
Adding in options for BTRFS subvolumes
2021-09-18 11:22:18 +02:00
Anton Hvornum
f6ceb8bba6
Removing hardcoded btrfs for suggested partition layouts.
2021-09-18 10:37:55 +02:00
Anton Hvornum
e21cf77e77
Removing /tmp from fstab
...
Since systemd takes care of mounting /tmp as a tmpt, there's no point in having a manual entry in fstab.
2021-09-17 23:52:10 +02:00
Anton Hvornum
9e67ce3f05
Making sure the drive paths are in the JSON structure, and not the class 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-15 20:11:40 +02:00
Anton Hvornum
7d3f2b6f29
Added a 'hidden' variable called --disk-sleep for delaying disk partition up time before continuing after a format. This is an ugly hack to get around some disk issues, for now.
2021-09-14 14:07:50 +00:00
Anton Hvornum
6d2a2f327c
Moved --noconfirm at the end of the pacstrap command to get piped properly to pacman inside pacstrap.
2021-09-14 11:47:16 +00:00
Anton Hvornum
e0f00ad1fe
Merging latest changes
2021-09-13 14:56:03 +00:00
Anton Hvornum
168379d43d
Added --noconfirm to pacstrap and increased logging verbosity when packages fail, and adding a exception so that the installation doesn't continue silently. This causes too much confusion (even tho I liked the idea that people could recover the missing parts without having to re-run the installer for subsequent steps.
2021-09-13 14:55:09 +00:00
Anton Hvornum
995edaf316
Removed legacy need to add_bootloader
...
`add_bootloader` no longer needs to have a harddrive given as a argument. It will (and should) auto-detect what's mounted in the `self.target` (aka mountpoint) of the installation.
2021-09-12 15:42:13 +02:00
Anton Hvornum
009dc0ab37
Merge pull request #623 from conqp/clean_hardware_imports
...
Remove unused import of json
2021-09-06 18:01:46 +02:00
Anton Hvornum
6aa028d29d
Merge pull request #626 from conqp/refactor_meminfo
...
Refactor meminfo() to allow direct key access
2021-09-06 18:01:31 +02:00
Anton Hvornum
6ead767907
Merge pull request #625 from conqp/fix_tab_indentation
...
Fix indentation with tabs instead of spaces
2021-09-06 17:59:43 +02:00
Richard Neumann
712e5d4a70
Fix indentation with tabs instead of spaces
2021-09-06 17:15:40 +02:00
Richard Neumann
0a8fe402a4
Refactor meminfo() to allow direct key access
2021-09-06 17:13:26 +02:00
Richard Neumann
93496087e5
Remove unused import of json
2021-09-06 16:52:41 +02:00
Anton Hvornum
e10daf4c57
Merged in master
2021-09-06 14:41:29 +00:00
Anton Hvornum
51565314b4
Merged in master.
2021-09-06 14:40:05 +00:00
Richard Neumann
8841e209ee
Refactor cpu_model() to use cpuinfo()
2021-09-06 16:12:53 +02:00
Richard Neumann
086dcc3325
Refactor cpu_vendor() to use cpuinfo()
2021-09-06 16:12:16 +02:00
Anton Hvornum
1030bd19c5
Merge branch 'master' into native_cpu_detection
2021-09-06 15:54:52 +02:00
Anton Hvornum
355f502d80
Merge pull request #610 from luckspt/patch-2
...
Typo
2021-09-06 15:45:53 +02:00
Anton Hvornum
bf18260510
Merge pull request #605 from CYPT71/patch-1
...
Update hardware.py
2021-09-06 15:42:15 +02:00
Anton Hvornum
8d7ccde162
Added exception handling to check_output
...
I tweaked the optimized return of check_output. Worth mentioning that `check_output()` will raise an exception `subprocess.CalledProcessError: Command 'lscpu | grep AMD' returned non-zero exit status 1.`.
2021-09-06 13:40:45 +00:00
Anton Hvornum
5fe752cf72
No need for try/catch any longer.
...
The old behavior of SysCommand was that exit codes raised an exception, which needed to be handled by each individual caller. We now utilize `.exit_code` instead to manually detect faulty commands and raise exceptions where needed.
2021-09-06 13:22:53 +00:00
Anton Hvornum
48fd68124a
Merge branch 'master' into master
2021-09-06 15:01:37 +02:00
Anton Hvornum
05c923524b
Merge pull request #600 from monosans/comprehension
...
Replace for loops with comprehensions
2021-09-06 14:26:30 +02:00
Anton Hvornum
025dc83194
Corrected some minor modifications mentioned in #595 as well as merged in 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-06 12:22:57 +00:00
Anton Hvornum
8a0a9b16e1
Merge branch 'master' of github.com:archlinux/archinstall into torxed-rework-partitioning
2021-09-04 20:58:05 +02:00
Anton Hvornum
e88ac430f2
Fixed edge case where size of disks could be exactly 40GB and a /home would never be created on single devices.
2021-09-04 20:54:25 +02:00
Anton Hvornum
278ded8e74
Added a PARTUUID -> parted index, this in order to properly set the boot 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-04 19:09:16 +02:00
Anton Hvornum
429006fe4b
Simplified lambda and made it filter out non relevant disks for the selection process.
2021-09-04 17:03:52 +02:00
Anton Hvornum
1814a19d6a
Fixed filtering if largest disk selection
2021-09-04 16:39:15 +02:00
Richard Neumann
a5a56728f1
Remove excess newline
2021-08-20 18:16:45 +02:00
Richard Neumann
61947ab944
Rewrite CPU vendor detection functions
...
Use cpuinfo() function rather than a subprocess.
2021-08-20 18:16:00 +02:00
Richard Neumann
b8ede1b333
Add cpuinfo()
2021-08-20 18:13:23 +02:00
Anton Hvornum
81e52bc3ff
Reworking logic that selects / and /home for multi-disk configurations. Also added some more debugging
2021-08-18 08:17:50 +02:00
Anton Hvornum
59c366da35
Fixed a prompt error in one of the parted calls. Also started on a more reliable size-conversion that isn't limited to Gigabytes in free_space().
2021-08-17 20:23:20 +02:00
Lucas Pinto
64e6b7b456
Typo
...
Fix a tiny typo
2021-07-28 01:35:26 +01:00
CYPT71
bbce3aa26a
Update hardware.py
...
Rewrite some function
if condition is True then return true else return false, transform in return condition directly
Also I don't understand why we need a try/except at line 151 and why we not write return condition ??
2021-07-22 11:47:56 +02:00
j-james
b0aa5dcbbb
Mention GNOME and KDE's soft dependency on NetworkManager in the install
2021-07-19 16:09:44 -07:00
Yash Tripathi
b60e8dfd10
changed dry_run to dry-run
2021-07-18 21:45:24 +05:30
Yash Tripathi
b1998ddebf
fix for #602 , running mklabel before formatting
2021-07-18 17:15:01 +05:30
Yash Tripathi
d55b1786c5
created load_config() to load configuration
2021-07-18 01:28:41 +05:30
monosans
3d4f58a04e
Replace for loops with comprehensions
2021-07-16 10:42:29 +03:00
Hamad Al Marri
51eb05691a
Fix encryption + grub both in UEFI and BIOS systems.
...
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-07 18:38:55 +03:00
Anton Hvornum
a53ee624ef
Removed debugging
2021-07-04 15:15:21 +02:00
Anton Hvornum
f2b0fcc652
Added a filesystem check when marking for formatting, this should ensure that encrypted volumes get a proper filesystem without having to go through an extra step of selecting filesystem.
2021-07-04 15:15:07 +02:00
Anton Hvornum
57bad26553
Added options to mark/unmark partitions for formatting (useful when re-using 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-03 15:10:23 +02:00
Anton Hvornum
51f2eca60e
Saving partitioning layout in a layout file (JSON format)
2021-07-03 14:27:49 +02:00
Anton Hvornum
e965eaf546
Missing .format() on 'use entire disk' step
2021-07-03 14:00:03 +02:00
Anton Hvornum
20e759d4cc
Added more detail to BlockDevice.__repr__
2021-06-15 11:51:29 +02:00
Anton Hvornum
0079f3d95c
Added fs-type and formatting on encrypted partitions that haven't been given a fs-type prior when re-using partitions.
2021-06-15 10:55:36 +02:00
Anton Hvornum
6cf50618b1
Change of variable
2021-06-14 21:37:34 +02:00
Anton Hvornum
fa8862a460
moved valid_parted_position to disk. And made it handle float numbers.
2021-06-14 19:04:51 +02:00
Anton Hvornum
6176ac5e5d
Since all fs-type's appear to be lower-case in 'man parted', we'll check against a lowered list in general for supported fs-types.
2021-06-14 19:01:06 +02:00
Anton Hvornum
2ac1f453cf
Added BlockDevice.largest_free_space and BlockDevice.free_space (iterator). 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-14 18:53:34 +02:00
Anton Hvornum
eb4c134c80
Unifying partioning logic into one function when managing partitions. Rather than giving the option between wiping and creating, and re-using and creating
2021-06-14 16:20:26 +02:00
Anton Hvornum
00b1dfde6d
Merged in master
2021-06-14 16:05:19 +02:00
Anton Hvornum
0c203384e0
Re-structuring partition flow
2021-06-14 16:04:43 +02:00
Anton Hvornum
630dedadd1
Legacy re-name of function.
2021-06-14 14:49:49 +02:00
Anton Hvornum
d4f0d411f6
Synced master into partitioning branch
2021-06-14 09:26:03 +02:00
Dylan M. Taylor
8617e0c2b7
Change graphics driver prompt to better indicate default action
2021-06-13 21:51:40 -04:00
Anton Hvornum
1450387fae
Started on multiple-disk-re-usage selection process.
2021-06-13 22:06:40 +02:00
Yash Tripathi
d30a22cae3
Setting proper keys in exported config ( #557 )
...
* Set the resolved profile path to the actual desktop environment
* split Nvidia driver list into proprietary and open-source
* Updated select_driver to use archinstall.arguments for driver selection
* Adding default value that works with later .get()
* audio will now be prompted irrespective of profile
2021-06-13 14:52:24 +02:00
Dylan M. Taylor
4e17355796
Implement is_desktop_profile helper function ( #575 )
...
* Implement is_desktop_profile helper function
* Make ask_for_audio_selection use generic_select
* Fix default value for audio selection
* Leverage list of supported desktops to perform is_desktop_profile check
* is_desktop_profile was missing a default return value
* Store return value for audio server
2021-06-13 14:32:38 +02:00
Anton Hvornum
d76760b45f
Removed old safety logics for partitions. Partitions will now always be 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-13 14:25:07 +02:00
Anton Hvornum
af790faf7a
Added multi-disk suggested layout. It's sorted on performance, and the first 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-13 11:25:33 +02:00
Anton Hvornum
9b6d7021a8
This fixes https://github.com/archlinux/archinstall/pull/426#discussion_r650372664
2021-06-13 10:37:30 +02:00
Anton Hvornum
8cc51cbcdc
Merge branch 'torxed-rework-partitioning' of github.com:archlinux/archinstall into torxed-rework-partitioning
2021-06-13 10:34:12 +02:00
Anton Hvornum
858171986c
Working suggested single disk layout, preparing for multiple selections.
2021-06-13 10:34:08 +02:00
Anton Hvornum
ba60d82bb9
Added BlockDevice.spinning and BlockDevice.bus_type
2021-06-11 21:33:37 +02:00
Anton Hvornum
24476ac1f6
Made it so that the .partitions property of Install() fetches from live data, rather than storing and caching partitions on initation. Since it now supports mounting a partition layout given by external usage.
2021-06-11 17:22:20 +02:00
Anton Hvornum
b9af735d85
Merge pull request #569 from dylanmtaylor/patch-1
...
Add a message when running check_mirror_reachable to let users know it's not frozen
2021-06-10 21:15:53 +02:00
Anton Hvornum
0a8c061ab4
Fixed format detection on commands, should be using exit codes instead?
2021-06-10 21:00:33 +02:00
Anton Hvornum
4e9b1c1635
Renamed vfat -> fat32 for the purpose of consistency. Most actions are 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-10 20:38:35 +02:00
Anton Hvornum
4691bad46b
Added wipe support to layout definitions. Also changed default start positions of partitions to 1MiB in.
2021-06-10 19:29:10 +02:00
Dylan M. Taylor
2eec8ffd6c
Clarify driver recommendations ( #572 )
2021-06-10 15:43:50 +02:00
Anton Hvornum
0946b73095
Merging in latest changes from master.
2021-06-10 15:27:02 +02:00
Yash Tripathi
fcd0acfef2
added --dry-run flag ( #570 )
...
* added --dry-run flag
2021-06-10 15:06:15 +02:00
Dylan M. Taylor
3023e57033
Add a message when running check_mirror_reachable to let users know it is not frozen.
2021-06-10 07:44:23 -04:00
Anton Hvornum
e8d38ea1a7
Started working on partitioning logic from declarative layouts.
2021-06-10 13:39:50 +02:00
Anton Hvornum
14d0685edc
Merge pull request #552 from l4zy0n3/patch-1
...
added support for optionally seperating credentials from config
2021-06-10 13:34:59 +02:00
Anton Hvornum
5ae3d11ab2
Merge pull request #537 from archlinux/torxed-fix-517
...
Introduces the use of HTTP mirrors additionally
2021-06-10 13:31:27 +02:00
Anton Hvornum
dc10725bf9
Merge pull request #538 from archlinux/torxed-fix-536
...
Attempt to fix issue regarding broken output
2021-06-10 13:27:48 +02:00
Dylan M. Taylor
0563d307e8
Exit codes are an 8 bit value and could be 0 through 255
...
We also don't need to check the exit code - this message should just be displayed if we are not root
2021-06-10 06:53:05 -04:00
Anton Hvornum
14aeb3b177
Merge pull request #562 from dylanmtaylor/hide-requires-root-if-root
...
Only print requires root messages if effective user id is not root
2021-06-10 11:53:43 +02:00
Anton Hvornum
4572a41159
Merge pull request #559 from dylanmtaylor/patch-1
...
Proposal: Split Nvidia so that there are two options for it
2021-06-10 10:02:56 +02:00
Dylan Taylor
a8dda07169
Only print requires root messages if effective user id is not root
2021-06-09 23:37:35 -04:00
Dylan M. Taylor
65407b4054
Try to unmount devices before attempting to run mklabel
2021-06-09 19:28:09 -04:00
Dylan M. Taylor
fe76c517e0
Split Nvidia so that there are two options for it
...
This makes selecting an Nvidia driver simpler and makes it apparent that we support both open-source and proprietary from the initial selection.
2021-06-09 19:27:41 -04:00
Anton Hvornum
5701ef9539
Started working on the load_layout function
2021-06-07 12:40:24 +02:00
Anton Hvornum
25e835ce3e
Removed the bulk of disk-operations from guided, and will move the logic into the Filesystem() class instead.
2021-06-06 17:35:44 +02:00
Anton Hvornum
0552d040ac
Added a json.dumps() helper that wraps JSON cls. Also tweaked the logic for the size creation so that they don't overlap
2021-06-06 17:13:42 +02:00
Anton Hvornum
ce4b1fbcff
Added sorting logic for BlockDevice. Also swapped sys_command() to SysCommand() and refined the logic around those calls.
2021-06-06 16:19:53 +02:00
Anton Hvornum
f9774af2cc
As of Python 3.6 and 3.7, dictionaries are ordered by insertion by default. We there for no longer need to use OrderedDict for our dictionaries where this logic is required.
2021-06-06 15:31:51 +02:00
Yash Tripathi
9bec42ad08
updated creds help
2021-06-06 08:41:37 +05:30
Yash Tripathi
158dbbf8f1
changed block location
2021-06-06 08:35:26 +05:30
Yash Tripathi
419b058b6f
added support for seperating credentials from config
2021-06-06 08:18:34 +05:30
Anton Hvornum
71b6efab69
Merge branch 'master' of github.com:archlinux/archinstall into torxed-rework-partitioning
2021-06-04 15:08:04 +02:00
Anton Hvornum
7d60287a3d
Merged in changes from master
2021-06-04 15:07:42 +02:00
Dylan M. Taylor
f1503349da
Attempt to avoid crashing when encountering swap partitions in has_content()
2021-06-03 08:25:36 -04:00
Anton Hvornum
7b4564c0fc
Merge pull request #542 from dylanmtaylor/bootloader-directory-creation
...
Add some safeguards to create directories before writing files
2021-06-03 13:52:29 +02:00
Dylan Taylor
dcf178c7e8
Add some safeguards to create directories before writing files
2021-06-03 07:20:16 -04:00
Anton Hvornum
2731f82d0f
Merge pull request #539 from archlinux/torxed-improve-logging
...
Adding --debug and other log enhancements
2021-06-03 10:32:09 +02:00
Dylan Taylor
3e505d4321
Clean up graphics driver output
2021-06-02 21:43:46 -04:00
Dylan Taylor
118cc17eb2
Fix my Quadro T1000 not being detected
2021-06-02 21:26:24 -04:00
Dylan Taylor
e90b17ca1c
Add hardware logging to beginning of installation
2021-06-02 21:17:54 -04:00
Dylan Taylor
c851a38a9e
Add additional hardware functions
2021-06-02 21:00:42 -04:00
Anton Hvornum
abcf3ea88a
Wrong variable name
2021-06-02 23:53:13 +02:00
Dylan Taylor
81269b972c
Remove line explaining desktop profile
2021-06-02 16:56:39 -04:00
Dylan Taylor
f88da81645
Add description to profile listing
2021-06-02 16:52:26 -04:00
Anton Hvornum
6a0f6b161c
Adding more granular debugging
2021-06-02 21:31:28 +02:00
Anton Hvornum
8bbc26ca59
Attempt to fix issue regarding broken output
...
Since pacman and some other commands these days write multiple lines and goes back and fourth, it's not reliable to say the "peaked" line is a single line. And if it's not, it will make the output look like garbage.
So instead, we'll write any output - as is - and let the command deal with fancy printing.
2021-06-02 00:21:15 +02:00
Anton Hvornum
434ebb3419
Added docstrings
2021-06-02 00:08:45 +02:00
Anton Hvornum
0901723ff4
Windows fix + Sorting based on list
...
This fix introduces changes so that development can be done (and tested) on other platforms than Linux. This is a convenience fix and shouldn't break anything (simply a few Linux-specific imports that have moved into the functions where they are used).
This commit also introduces sorting based on a list of priorities (where the default will be last if not matched).
2021-06-01 23:56:15 +02:00
Anton Hvornum
32dce85257
Introduces HTTP mirror selection
2021-06-01 20:11:25 +02:00
Dylan M. Taylor
ec2b00c117
Remove comment that no longer applies
2021-05-31 19:45:49 -04:00
Anton Hvornum
a67677cb2d
Merge pull request #531 from Kibouo/master
...
Fix typo in error msg
2021-05-31 12:47:16 +02:00
Anton Hvornum
62c22f78b1
Moved return logic to not abort the iteration of kernels.
2021-05-31 12:26:49 +02:00
Anton Hvornum
7b1bb4af97
Fixed a plugin issue where there are no plugins found.
2021-05-31 12:17:18 +02:00
Anton Hvornum
3006e5b4c3
Creating multiple boot configs, based on the selected kernels. Not 100% sure both initramfs and vmlinuz will have the trailing definitions, but made both {kernel}
2021-05-31 11:15:01 +02:00
Anton Hvornum
baca0cc514
Creating PR
2021-05-31 10:09:03 +02:00
Csonka Mihaly
f60cd10afb
Fix typo in error msg
2021-05-30 17:37:44 +02:00
Anton Hvornum
e993590f5f
Pulled in latest master changes
2021-05-28 09:30:35 +02:00
Anton Hvornum
a89f87c145
Update __version__ to become a dev-version again
...
To avoid accidental pypi snafu's
2021-05-28 09:03:10 +02:00
Dylan M. Taylor
5b1f30383b
Update version for 2.2.0 final
2021-05-27 14:42:24 -04:00
Dylan Taylor
8ddb9153c7
Fix is_vm detection on real hardware
2021-05-27 14:15:27 -04:00
Dylan M. Taylor
712d299627
Change ordering of example profiles
2021-05-27 05:34:28 -04:00
nullrequest
544eccaada
made it more clear
...
using Redecorating's suggestion in the discord
2021-05-27 10:13:23 +05:30
nullrequest
c3b703bc2a
Make it more clear what the desktop profile does
2021-05-27 09:34:55 +05:30
Anton Hvornum
94bceb2199
Adding support for --plugin=<plugin path>
2021-05-24 15:29:59 +02:00
Anton Hvornum
7b1096bfa6
Added a number of on_<event> hooks for different stages of the installation.
2021-05-24 14:59:34 +02:00
Anton Hvornum
0d0dfc8ebe
Added/moved comments.
2021-05-24 14:40:21 +02:00
Anton Hvornum
1773efbe45
Pleasing the linter gods
2021-05-24 14:37:31 +02:00
Anton Hvornum
e604f2c676
Added optional version handling. And improved error handling a bit.
2021-05-24 14:36:24 +02:00
Anton Hvornum
2b5ad7e52e
Added a comment
2021-05-24 14:13:45 +02:00
Anton Hvornum
250eb93f10
Added better error handling.
2021-05-24 14:12:23 +02:00
Anton Hvornum
c7426067dd
Implemented load_plugin() which handles local or remote paths. Also added some error handling surrounding the loading of plugins.
2021-05-24 13:56:57 +02:00
Anton Hvornum
1fff9b44d1
Spelling error
2021-05-24 13:42:28 +02:00
Anton Hvornum
14577415f3
Spelling error
2021-05-24 13:42:09 +02:00
Anton Hvornum
6f3a358422
Added a comment
2021-05-24 13:38:54 +02:00
Anton Hvornum
29dcd5f2d0
Pleasing the linter gods
2021-05-24 13:38:17 +02:00
Anton Hvornum
fcbb5490c0
Removed empty whitespace
2021-05-24 13:38:01 +02:00
Anton Hvornum
bad4d8a38b
Added redundant argument creation.
2021-05-24 13:37:33 +02:00
Anton Hvornum
2ee88e0e3a
Switched plugin strategty. Now uses built-in entrypoints to source and load the plugins. This is the default method provided by Python, and is the cleanest so far I think.
2021-05-24 13:34:56 +02:00
Anton Hvornum
9b0de26c67
Syncing in latest changes from master
2021-05-24 12:34:32 +02:00
Anton Hvornum
515cd4daf0
Merged in latest changes from master
2021-05-24 12:29:43 +02:00
Anton Hvornum
7daaf1143f
Fixes #489
2021-05-23 14:18:49 +02:00
Anton Hvornum
43792cd7f3
Spelling error
2021-05-23 11:37:51 +02:00
Anton Hvornum
0b3e822795
Merge branch 'master' of github.com:archlinux/archinstall
2021-05-23 10:32:43 +02:00
Anton Hvornum
9fa9520ac9
Version bump for tagging.
2021-05-23 10:32:40 +02:00
Yash Tripathi
194d45ad2d
removed debug code
2021-05-23 11:52:52 +05:30
Yash Tripathi
48f1e62427
bringing back the old method for parsing extra args as config values
2021-05-23 11:38:53 +05:30
Anton Hvornum
1bc218b2e1
Forgot an important import.
2021-05-22 20:57:36 +02:00
Anton Hvornum
662ffb05b2
Fixes docstrings.
2021-05-22 20:51:59 +02:00
Anton Hvornum
1552cc8277
Re-worked the select_profile() user interaction. It no longer takes options as a parameter, instead it sources the profiles available, prints a curated list but allows for any input that is a valid profile.
2021-05-22 20:50:02 +02:00
Anton Hvornum
f2e7b1440a
Since SysCommand() wraps SysCommandWorker(), but SysCommand() doesn't use contexts, we have to flush the output manually here to avoid newlines not being before the next output.
2021-05-22 19:58:40 +02:00
advaithm
439abc4402
fixed bootloader flag not being set
2021-05-22 18:18:05 +05:30
Anton Hvornum
f9ec8f2a27
Merging in latest changes from master and resolved conflicts.
2021-05-21 09:56:42 +02:00
Anton Hvornum
54a693be4f
Merge pull request #495 from dylanmtaylor/patch-1
...
Add ArchInstall user-agent to mirror requests
2021-05-21 09:29:50 +02:00
Anton Hvornum
60cdb2ab87
Merge pull request #485 from dylanmtaylor/post-installation-scripts
...
Implement post-installation commands
2021-05-21 09:29:04 +02:00
Dylan M. Taylor
ac2b1084e8
Add ArchInstall user-agent to mirror requests
2021-05-20 18:00:44 -04:00
Dylan Taylor
e6befe53c7
Use {installation.target} in custom commands handler
2021-05-20 17:55:40 -04:00
Dylan Taylor
5652ba20ae
Extract custom-commands function into general.py
2021-05-20 17:12:41 -04:00
JakobDev
c63fdf0148
Use pure Python code in filter_mirrors_by_region
2021-05-20 22:40:27 +02:00
Anton Hvornum
c2f3b9e208
Merge pull request #488 from SimonPe/patch-1
...
look for default profiles in correct location
2021-05-20 09:13:58 +02:00
Anton Hvornum
c0458cf641
Merge pull request #484 from dylanmtaylor/patch-1
...
Have the configuration file request identify itself as coming from ArchInstall
2021-05-20 09:12:06 +02:00
Anton Hvornum
71ab52178c
Merge pull request #481 from dylanmtaylor/minor-formatting-cleanup
...
Some very minor cleanup
2021-05-20 08:07:02 +02:00
Simon Peeters
8fc236ac77
look for default profiles in correct location
...
The default `profiles` directory is a sibling of the `lib` directory, not of `storage.py` itself.
2021-05-20 03:00:57 +02:00
Dylan M. Taylor
5b0f918d1b
Have the configuration file request identify itself as coming from ArchInstall
...
This is necessary to allow proper filtering of these requests server-side, and some services block urllib requests (known issue with Cloudflare).
2021-05-19 18:16:28 -04:00
Dylan Taylor
b94fee2242
very minor whitespace fixes
2021-05-19 17:20:46 -04:00
Dylan Taylor
c1cd845d07
Added support for getting configuration from a URL
2021-05-19 17:06:42 -04:00
Yash Tripathi
bbb4599165
Added support for getting configuration from a config file ( #364 )
...
* 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-19 21:31:58 +02:00
Anton Hvornum
49e6cbdc54
Reworking SysCommand & Moving to localectl for locale related activities
...
* 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-19 16:45:13 +02:00
Dylan Taylor
da0da729c5
Proofreading: Fix misc. spelling and grammar issues
2021-05-18 09:36:22 -04:00
Dylan M. Taylor
596c068f9d
Remove unreachable code
2021-05-18 08:32:30 -04:00
Dylan M. Taylor
c14ee42bff
Remove PermissionError since it shadows the built-in of the same name
2021-05-18 08:27:59 -04:00
Anton Hvornum
f56bfd5ab8
Merge pull request #468 from dylanmtaylor/patch-3
...
Add missing urllib.error import
2021-05-18 07:25:21 +00:00
Anton Hvornum
fb8bb98b83
Incorrect variable names being used from copy paste.
2021-05-18 09:21:18 +02:00
Dylan M. Taylor
9cae2374a8
Add missing urllib.error import
...
Fixes an unresolved reference
Add missing urllib.error import
2021-05-17 21:55:48 -04:00
Anton Hvornum
d0bc166e7e
Compliment to #461 and #459 : is_vm() also outputted 'kvm'. This should fix that.
2021-05-18 00:28:59 +02:00
Anton Hvornum
e0561641f6
Converted from subprocess.check_output() to SysCommand() to hide cpu_vendor() output.
2021-05-18 00:21:48 +02:00
Anton Hvornum
e23fffe288
Reverted 2afc317. Using Path().unlink() instead on ucode if they exist.
2021-05-17 21:59:42 +02:00
Anton Hvornum
2afc31715e
Adding a pacman --overwrite declaration for ucodes.
2021-05-17 21:27:31 +02:00
Anton Hvornum
9f14f2cc53
Merge pull request #456 from dylanmtaylor/patch-4
...
Add mirror reachability check
2021-05-16 14:02:49 +00:00
Dylan M. Taylor
22fc18dc46
Add mirror reachability check
...
Needed error handling
Fix internet connection text not showing up and make it red
2021-05-15 22:53:58 -04:00
Dylan M. Taylor
b3c06092b9
Delete tts.py
...
This is an empty file, and as far as I can tell it's unused.
2021-05-15 20:18:18 -04:00
Dylan Taylor
0ce2ffa4cf
Fix some variable shadowing issues
2021-05-15 17:52:12 -04:00
Dylan Taylor
1796bbb918
Perform refactoring to PEP 8 naming conventions
2021-05-15 17:50:28 -04:00
Dylan Taylor
81423330aa
Merge branch 'lxqt-lightdm' into formatting2
2021-05-15 17:31:14 -04:00
Dylan M. Taylor
0e5b0edd6c
reintroduce this line, seems to be needed for install to work despite being detected as unused
2021-05-15 16:23:11 -04:00
Dylan M. Taylor
720cb9b0b7
Fix missing Optional import
2021-05-15 16:21:02 -04:00
Dylan Taylor
8e86a955ec
archinstall/__init__.py changes
2021-05-15 15:43:02 -04:00
Anton Hvornum
2e168790c8
Merge pull request #450 from charlesvdv/master
...
propagate options when mounting a partition
2021-05-15 19:28:23 +00:00
Dylan Taylor
96a48664e2
Fix mutable default arguments
...
https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments
2021-05-15 15:24:34 -04:00
Dylan Taylor
f7642786c9
Remove some redundant parenthesis
2021-05-15 15:18:46 -04:00
Dylan Taylor
55b09aa1eb
Fix E713 test for membership should be 'not in'
2021-05-15 15:14:38 -04:00
Dylan Taylor
4a34b3a9d0
Fix E712
2021-05-15 15:08:50 -04:00
Dylan Taylor
126c7ebfca
More formatting fixes to satisfy PEP 8
2021-05-15 15:04:39 -04:00
Dylan Taylor
3b3c1c1d70
Fix E101: mix of spaces and tabs
2021-05-15 14:59:23 -04:00
Charles Vandevoorde
d61801011c
propagate options when mounting a partition
2021-05-15 20:43:47 +02:00
Dylan Taylor
a0cbb31d3e
f-string fixes
2021-05-15 14:29:24 -04:00
Dylan Taylor
3b20adb7d2
Whitespace changes
2021-05-15 13:59:37 -04:00
Dylan Taylor
a475852d7a
Remove unnecessary parenthesis
2021-05-15 13:37:08 -04:00
Dylan Taylor
45d8c1c336
Fix partition -> part suggestion by Torxed
2021-05-15 13:33:30 -04:00
Dylan Taylor
8bc361970b
Resolve a few more PEP issues in general.py
2021-05-15 13:29:21 -04:00
Dylan Taylor
67b4d5d551
fix installer.py inconsistent tabs/spaces error
2021-05-15 13:14:45 -04:00
Dylan Taylor
6057203e5b
More formatting fixes
2021-05-15 12:59:38 -04:00
Dylan Taylor
e966bef891
general.py formatting
2021-05-15 12:56:14 -04:00
Dylan Taylor
658e5c0411
Cleanup imports and disk.py a bit more
2021-05-15 12:50:01 -04:00
Dylan Taylor
b2d20647fc
Some additional formatting
2021-05-15 12:46:23 -04:00
Dylan Taylor
69d675f4aa
Many more manual changes
2021-05-15 12:29:57 -04:00
Anton Hvornum
e4e5e3db2d
Updating __version__ to dev1 for dev release.
2021-05-15 16:14:34 +02:00
Anton Hvornum
a2766a7aac
Merge pull request #437 from dylanmtaylor/patch-7
...
Don't list __init__.py files in profile list
2021-05-15 09:13:12 +00:00
Dylan M. Taylor
60858634f1
Fix microcode not getting added to base_packages before install
...
Update installer.py
2021-05-14 22:39:54 -04:00
Dylan M. Taylor
bd9992be29
Don't list __init__.py files in profile list
2021-05-14 21:22:30 -04:00
Anton Hvornum
0df6eced77
Adding a fallback systemd-boot install if writing variables failed.
2021-05-14 21:09:06 +02:00
Anton Hvornum
4b6a7514c9
Adding in a default timeout to systemd-boot, but only if no other timeout was specified. Also fixes a regression bug with line endings in the loader configuration.
2021-05-14 21:05:18 +02:00
Anton Hvornum
6e898217ee
Merge branch 'master' of github.com:archlinux/archinstall into torxed-fix-350
2021-05-14 18:35:40 +02:00
Anton Hvornum
16441f11cb
Merge branch 'master' of github.com:archlinux/archinstall into torxed-kernel-params
2021-05-14 18:00:27 +02:00
Anton Hvornum
1674b7088d
Fixes string index error.
2021-05-14 16:13:03 +02:00
Anton Hvornum
12dc55650d
Merge branch 'master' of github.com:Torxed/archinstall into torxed-fix-350
2021-05-12 14:45:04 +02:00
Anton Hvornum
4ff35663b8
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.
2021-05-12 13:55:41 +02:00
Anton Hvornum
df6c4e77f7
Merge pull request #427 from advaithm/mypy
...
some type hint fixes and a bad catch fix
2021-05-12 10:58:46 +00:00
Anton Hvornum
0ef8cc579e
Merge pull request #422 from arieboven/print_large_list_fix
...
fix error when there are to many options to print and calculation spaces
2021-05-12 10:58:00 +00:00
Anton Hvornum
a85517513d
Merge pull request #379 from SecondThundeR/multi-select-update
...
Update generic_multi_select and generic_select
2021-05-12 10:33:57 +00:00
advaithm
69d079e63a
some type hint fixes and a bad catch fix
2021-05-12 15:45:45 +05:30
Anton Hvornum
129ceaea8b
Renamed keyboard-language to keyboard-layout to avoid confusion. Added 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-11 13:37:08 +02:00
Anton Hvornum
e6c28a94ee
Fixed line-ending issue after using generic_multi_select()
2021-05-11 11:48:44 +02:00
Anton Hvornum
4b6e312cfa
Flipped log level logic.
2021-05-11 11:41:43 +02:00
Anton Hvornum
20d9858cf6
Spelling errors, and filtered the output a bit.
2021-05-11 09:53:18 +02:00
Anton Hvornum
dd52bfb3a7
Tested the workflow, and it works pretty decent. There's some kinks to work out. Added BlockDevice().size as well.
2021-05-10 19:21:05 +02:00
Anton Hvornum
4aaaa3208b
Tested creating partitions and deleting them. Kinda works now.
2021-05-10 16:44:01 +02:00
Anton Hvornum
6d5d9a1798
Added Partition() properties: sector_size, start, end, boot, partition_type 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-10 14:32:39 +02:00
Anton Hvornum
3e601ff9ab
Added a soft-wrapper around parted logic. This logic will guide users through setting up partitions, if they chose to wipe a drive. We'll avoid doing to much auto-magic, and this is just a start.
2021-05-10 10:14:33 +02:00
aboven
24a14d1800
fix error when to many options and calculation spaces
2021-05-08 13:18:03 +02:00
Anton Hvornum
d6f63375c6
Splitting up partitioning logic some more.
2021-05-07 16:38:46 +02:00
SecondThundeR
493814d8bd
Add default graphics card driver option
2021-05-06 21:38:20 +03:00
Anton Hvornum
8925be6c87
Adding in partition layout structure
2021-05-06 15:18:57 +02:00