|
27 | 27 | # project to mark strings as translatable with _('translate me') |
28 | 28 | DeferredTranslation.install() |
29 | 29 |
|
30 | | -# Log various information about hardware before starting the installation. This might assist in troubleshooting |
31 | | -debug(f"Hardware model detected: {SysInfo.sys_vendor()} {SysInfo.product_name()}; UEFI mode: {SysInfo.has_uefi()}") |
32 | | -debug(f"Processor model detected: {SysInfo.cpu_model()}") |
33 | | -debug(f"Memory statistics: {SysInfo.mem_available()} available out of {SysInfo.mem_total()} total installed") |
34 | | -debug(f"Virtualization detected: {SysInfo.virtualization()}; is VM: {SysInfo.is_vm()}") |
35 | | -debug(f"Graphics devices detected: {SysInfo._graphics_devices().keys()}") |
36 | | - |
37 | | -# For support reasons, we'll log the disk layout pre installation to match against post-installation layout |
38 | | -debug(f"Disk states before installing:\n{disk_layouts()}") |
39 | | - |
40 | 30 |
|
41 | 31 | # @archinstall.plugin decorator hook to programmatically add |
42 | 32 | # plugins in runtime. Useful in profiles_bck and other things. |
43 | 33 | def plugin(f, *args, **kwargs) -> None: # type: ignore[no-untyped-def] |
44 | 34 | plugins[f.__name__] = f |
45 | 35 |
|
46 | 36 |
|
| 37 | +def _log_sys_info() -> None: |
| 38 | + # Log various information about hardware before starting the installation. This might assist in troubleshooting |
| 39 | + debug(f"Hardware model detected: {SysInfo.sys_vendor()} {SysInfo.product_name()}; UEFI mode: {SysInfo.has_uefi()}") |
| 40 | + debug(f"Processor model detected: {SysInfo.cpu_model()}") |
| 41 | + debug(f"Memory statistics: {SysInfo.mem_available()} available out of {SysInfo.mem_total()} total installed") |
| 42 | + debug(f"Virtualization detected: {SysInfo.virtualization()}; is VM: {SysInfo.is_vm()}") |
| 43 | + debug(f"Graphics devices detected: {SysInfo._graphics_devices().keys()}") |
| 44 | + |
| 45 | + # For support reasons, we'll log the disk layout pre installation to match against post-installation layout |
| 46 | + debug(f"Disk states before installing:\n{disk_layouts()}") |
| 47 | + |
| 48 | + |
47 | 49 | def _fetch_arch_db() -> None: |
48 | 50 | info("Fetching Arch Linux package database...") |
49 | 51 | try: |
@@ -82,6 +84,8 @@ def main() -> int: |
82 | 84 | print(_("Archinstall requires root privileges to run. See --help for more.")) |
83 | 85 | return 1 |
84 | 86 |
|
| 87 | + _log_sys_info() |
| 88 | + |
85 | 89 | if not arch_config_handler.args.offline: |
86 | 90 | _fetch_arch_db() |
87 | 91 |
|
|
0 commit comments