From df86d2b80d9fcaa37f4ebef5de8d070017019ec0 Mon Sep 17 00:00:00 2001 From: advaithm Date: Wed, 28 Apr 2021 06:39:59 +0530 Subject: pdb traceing --- archinstall/lib/installer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 577a2ae1..ddfd9018 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -1,6 +1,6 @@ import os, stat, time, shutil, pathlib import subprocess, logging - +import pdb from .exceptions import * from .disk import * from .general import * @@ -356,6 +356,7 @@ class Installer(): return True def add_bootloader(self, bootloader='systemd-bootctl'): + pdb.set_trace() boot_partition = None root_partition = None for partition in self.partitions: -- cgit v1.2.3-54-g00ecf From 464cee46ed961627c7c2503302d1de6ebc7872e1 Mon Sep 17 00:00:00 2001 From: advaithm Date: Wed, 28 Apr 2021 07:08:35 +0530 Subject: fixed kernel select --- archinstall/lib/installer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index ddfd9018..94324238 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -40,8 +40,8 @@ class Installer(): :type hostname: str, optional """ - def __init__(self, target, *, base_packages='base base-devel linux linux-firmware', kernels='linux'): - base_packages = base_packages + kernels.replace(',', ' ') + def __init__(self, target, *, base_packages='base base-devel linux-firmware', kernels='linux'): + kernels = kernels.split(",") self.target = target self.init_time = time.strftime('%Y-%m-%d_%H-%M-%S') self.milliseconds = int(str(time.time()).split('.')[1]) @@ -52,6 +52,8 @@ class Installer(): } self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages + for kernel in kernels: + self.base_packages.append(kernel) if hasUEFI(): self.base_packages.append("efibootmgr") else: -- cgit v1.2.3-54-g00ecf From 7922d82639f69f5b2761168f37173c7e639efa2a Mon Sep 17 00:00:00 2001 From: advaithm Date: Wed, 28 Apr 2021 07:41:34 +0530 Subject: trying to fix always failing bootloader install --- archinstall/lib/installer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 94324238..004a1743 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -442,6 +442,7 @@ class Installer(): root_device = f"{root_partition.path}" o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.target} grub-install --target=i386-pc /dev/{root_device}')) sys_command('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg') + self.helper_flags['bootloader'] = bootloader return True else: raise RequirementError(f"Unknown (or not yet implemented) bootloader requested: {bootloader}") -- cgit v1.2.3-54-g00ecf From db7632f55ed7160f55e5c8160ff0be750a26e2cc Mon Sep 17 00:00:00 2001 From: advaithm Date: Wed, 28 Apr 2021 07:48:44 +0530 Subject: log diffrent values when in bios mode --- archinstall/lib/installer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 004a1743..4fb3a337 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -366,8 +366,10 @@ class Installer(): boot_partition = partition elif partition.mountpoint == self.target: root_partition = partition - - self.log(f'Adding bootloader {bootloader} to {boot_partition}', level=logging.INFO) + if hasUEFI(): + self.log(f'Adding bootloader {bootloader} to {boot_partition}', level=logging.INFO) + else: + self.log(f'Adding bootloader {bootloader} to {root_partition}', level=logging.INFO) if bootloader == 'systemd-bootctl': if not hasUEFI(): -- cgit v1.2.3-54-g00ecf From 3bf7a9e7afe9a1a75f4026e3ff509b68d8f93287 Mon Sep 17 00:00:00 2001 From: advaithm Date: Wed, 28 Apr 2021 08:00:18 +0530 Subject: removed pdb --- archinstall/lib/installer.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 4fb3a337..a5449662 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -1,6 +1,5 @@ import os, stat, time, shutil, pathlib import subprocess, logging -import pdb from .exceptions import * from .disk import * from .general import * @@ -358,7 +357,6 @@ class Installer(): return True def add_bootloader(self, bootloader='systemd-bootctl'): - pdb.set_trace() boot_partition = None root_partition = None for partition in self.partitions: -- cgit v1.2.3-54-g00ecf From 8144ac736d0b190666aec03d2a57a41c01371946 Mon Sep 17 00:00:00 2001 From: advaithm Date: Wed, 28 Apr 2021 09:35:07 +0530 Subject: install nvidia-dkms when running linux-zen/lts --- profiles/xorg.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/profiles/xorg.py b/profiles/xorg.py index 413a6308..cd89668d 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -25,7 +25,14 @@ def _prep_function(*args, **kwargs): # or through conventional import xorg if __name__ == 'xorg': try: - installation.add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") + if "nvidia" in _gfx_driver_packages: + if "linux-zen" in installation.base_packages or "linux-lts" in installation.base_packages: + installation.add_additional_packages("dkms")#I've had kernel regen fail if it wasn't installed before nvidia-dkms + installation.add_additional_packages("xorg-server xorg-xinit nvidia-dkms") + else: + installation.add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") + else: + installation.add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") except: installation.add_additional_packages(f"xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install -- cgit v1.2.3-54-g00ecf From 0e89173ddf4827353874c611fba75f99d9693e27 Mon Sep 17 00:00:00 2001 From: advaithm Date: Wed, 28 Apr 2021 09:37:22 +0530 Subject: Raise a hardware incompatibilty error if someone installs the nvidia prop dirvers with sway --- profiles/sway.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/sway.py b/profiles/sway.py index 53eb8c5a..f132df33 100644 --- a/profiles/sway.py +++ b/profiles/sway.py @@ -11,7 +11,8 @@ def _prep_function(*args, **kwargs): other code in this stage. So it's a safe way to ask the user for more input before any other installer steps start. """ - + if "nvidia" in _gfx_driver_packages: + raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not support the proprietary nvidia drivers") __builtins__['_gfx_driver_packages'] = archinstall.select_driver() return True -- cgit v1.2.3-54-g00ecf