v2.1.2
版本发布时间: 2021-03-22 06:12:55
archlinux/archinstall最新发布版本:v2.6.3(2023-09-30 21:58:57)
New features
-
BlockDevice()
now has four new functions as well as "improved" cache (still some improvements to be done):-
BlockDevice().partition_table_type
which returnsGPT
orMBR
depending on which is used -
.has_partitions()
which returns the number of partitions -
.has_mount_point(path)
, returnsTrue
if any of the block device partitions have been mounted to the givenpath
-
.flush_cache()
which clears the internal partition cache and forces a refresh of the current partitions (mainly useful for internal use when formatting etc)
-
-
BlockDevice()
are now iterable and will iterate over the partitions (for partition in BlockDevice("/dev/sda"):
). -
BlockDevice()
will now auto fill information about itself if no information is given during initialization. - Throughout the guided.py installation, arguments are now supported from the command-line in to the script via
--argument=value
. This helps testing and enables scripts to utilize archinstall example installations (minimal and others will get an overhaul soon too). -
Partition()
has a lot of new additions, mainly safety features and a bit of re-work to support more complex partition layouts-
.target_mountpoint
which sets the desired mount point once the partition is formatted and complete -
.allow_formatting
(Bool) dictates if the archinstall formatter is allowed to touch the partition or not. By default all partitions are set toFalse
which ensures that for instance Windows partitions is left untouched. This protection can be overridden byBlockDevice().keep_partitions = False
which tells archinstall that it's ok to wipe all partitions no matter what individual partitions dictates. -
Partition()
now auto-mounts ifmountpoint
is given, which is not to say the same astarget_mountpoint
which is post-formatting. -
Partition()
will now correctly identify itself as encrypted by checking its file system during initialization, which will trigger additional user input / library actions depending on certain conditions. -
Partition()
is now sortable among other partitions (and strings), based on the full path name of itself. -
.detect_inner_filesystem()
a helper function that will attempt to detect any inner file systems automatically by decrypting the partition using any supplied password. -
.has_content()
will mount the partition to a temporary location and check if there's any content inside that temporary mount location. Useful to check if/boot
has content for instance. -
.safe_to_format()
will return a bool depending on some criteria. If.allow_formatting
isFalse
for instance, then.safe_to_format()
will also returnFalse
. -
.encrypt(*args, **kwargs)
is a helper/wrapper around setting up and callingluks2().encrypt(*args, **kwargs)
. -
.format()
has some new safety checks/features implemented to avoid accidental formatting. -
.unmount()
(.umount
is an alias) will attempt to unmount the partition. -
.filesystem_supported()
is a new helper function that will format the partitions selected file system against/dev/null
to determine if the format is supported, or if the selected file format isn't supported by archinstall.
-
-
Filesystem()
has been re-worked quite a bit to incorporate some new partition flexability. It now supports existing partition schemes by simply honoring what flags are set inPartition()
. But some new features, logic and flags are:- Will now check
self.blockdevice.keep_partitions
, and ifFalse
will initiate a new disk label wiping any existing partitions. -
.find_partition(mountpoint)
will iterate the partitions for the selected drive and find any partition with the given mount point and return that partition. -
.use_entire_disk()
have been re-worked completely to accommodate a new way of formatting. This function instead of actually formatting, will simply create a file system definition, and mark the partitions as ready to be formatted and set the protective flags accordingly. And if encryption is specified, will mark the correct partitions as encrypted triggering further actions later on in the library calls.
- Will now check
-
disk.py
also hasget_mount_info(path)
to get information based on a mount-point -
disk.py
also hasget_filesystem_type(path)
which will return a single string representing the file system on that path -
archinstall.exceptions.SysCallError
now has a property that can be fetched during atry/catch
, which iserr.exit_code
which might be useful to debug/set actions depending on a syscall that exits as non-zero. -
JSON_Encoder
now properly creates a copy of dictionaries rather than replacing keys in the existing dictionary (the old behavior would overwrite keys and values, causing confusion with the benefit of being more memory conservative) -
luks2()
now has some additional parameters,key_file
andauto_unmount
. The key-file is just to avoid hard-coded locations for key-file lookups. Andauto_unmount
will automatically close the encrypted partition once the__exit__
function is called.-
.mapdev
is also a new property which holds the location of the luks mapper device created duringcryptsetup open
. - If the partition is being used when we try to call
.encrypt()
,luks2()
will now attempt to close the device as well as unmount the location where it's mounted and then re-run the.encrypt()
call. - Any partition within the encryption will inherit safety-flags once the partition is unlocked. This means if the encrypted partition
/dev/sda2
is selected for formatting, then so will/dev/sda2 -> /dev/mapper/luksdev
as an example. -
.format()
is a helper function that will attempt to runcryptsetup -q -v luksErase
on the encrypted partition.
-
-
log()
will now default toLOG_LEVELS.Info
if nothing else is specified. -
Profile()
will now remember the initilization-namespace given, and.load_instructions()
can overwrite the namespace during loading of instructions to circumvent potentialif __name__ == "filename"
logics. But onceProfile().install()
is called, the original namespace is restored in favor or triggering thoseif __name__ == "filename"
again. -
Profile()
also has a new helper function called.has_prep_function()
, which will returnTrue
if thereis adef _prep_function()
defined in the profile - butif __name__ == 'moduleName'
also has to be defined for this helper function to returnTrue
. This to avoid "stray code" to be executed when we try to callprofile._prep_function()
in isolation. -
Application()
now also resets the namespace prior to executing.install()
. -
lib/user_interactions.py
have gotten quite a few new helper functions:-
get_terminal_height()
andget_terminal_width()
which returns what it sounds like, the size of the current terminal in terms of character columns and character lines. -
get_longest_option()
which returns the longest length of any given option within a list. -
get_password()
which is a helper function to get a password with verification from the user #106 -
print_large_list()
which enables columinzation of largers sets of options courtesy of @ninchester and fixes #81. -
ask_for_superuser_account()
which asks for a single super-user account and has aforce=True
option to enable sticky-asking. -
ask_for_additional_users()
now asks to create additional users and have the ability to ask and determinate and distinguish between normal users and superusers. -
ask_for_a_timezone()
can ask and verify selected time zones. -
ask_to_configure_network()
Now contains questions and options surrounding network configuration. This supports the option to copy existing configurations as well as configuring a specific interface for DHCP or static IP configuration. -
ask_for_disk_layout()
will ask if the user wants to abort, keep an existing partition layout of wipe the entire drive -
ask_for_main_filesystem_format()
will ask which file system to use for the root partition/
, asking from a hard coded set of file systems.
-
-
examples/guided.py has been re-written more or less entirely. Most of the logic is the same and in the same order. The key differences being that the example now has the steps in functions and they are in order of execution. It also supports arguments via
archinstall.arguments
which translatespython guided.py --argument=value
intoarchinstall.arguments['argument']
. It also has a completely re-written partitioning logic to support more flexible partitions. - The profile
awesome
has been slimmed down further.
Bugs and fixes
-
set_timezone
now properly removes any existing timezone that might be default in the installation #64. -
set_locale()
no longer adds encoding in thelocale
string, since that's another parameter to set_locale() - Although not as clean as I would want it, this first generation fix enables encrypted partitions using file formats other than btrfs by setting up
mkinitcpio.conf
"properly". In the future, I wish to not overwrite the config as it might interfere with future default Arch Linux changes. But for now this should work. -
add_bootloader
no longer defaults to a configuration file calledarch.conf
, which worked great in older versions of archinstall where flexability wasn't really that important. But since we now support multiple partiton layouts and multi-boot, this had to change #51. -
Profile()
have been improved and re-worked a bit. Profiles installation function.install()
no longer set the super-global variableinstallation
, instead,installation.install_profile(profile)
is now responsible for setting this variable. Since we need to install profiles through a installer instance, this makes more sense and also ensures that empty profile instances such asProfile(None, "awesome")
which hasNone
as the installation instance, can still be used for sanity checks - but not installations. This overall logic might be re-worked in the future, but the global variableinstallation
won't be accessible until.install_profile()
is called (perhaps we move this to the__init__()
function ofInstallation()
in the future).
This version closes the following issues:
- #64
- #81
- #101
- #51
- #106
- #46
Honorable mentions:
- General improvements to language in user input questions.
- Improved build instructions under the Github wiki
-
lib/disk.py
has some preparations added forMBR
disk setups which is a work in progress in PR #113 - Trying to use
pathlib.Path()
in as many places as possible
1、 archinstall-2.1.2.tar.gz.asc 488B