Preparing log-data and debug output.

This commit is contained in:
Anton Hvornum 2020-10-20 21:40:17 +00:00
parent 66e495e994
commit e06ca749a4
1 changed files with 40 additions and 34 deletions

View File

@ -66,6 +66,8 @@ class Installer():
log('Some required steps were not successfully installed/configured before leaving the installer:', bg='black', fg='red') log('Some required steps were not successfully installed/configured before leaving the installer:', bg='black', fg='red')
for step in missing_steps: for step in missing_steps:
log(f' - {step}', bg='black', fg='red') log(f' - {step}', bg='black', fg='red')
log(f"Detailed error logs can be found at: {log_path}")
log(f"Submit this zip file as an issue to https://github.com/Torxed/archinstall/issues")
return False return False
def post_install_check(self, *args, **kwargs): def post_install_check(self, *args, **kwargs):
@ -168,8 +170,10 @@ class Installer():
self.helper_flags['base'] = True self.helper_flags['base'] = True
return True return True
def add_bootloader(self): def add_bootloader(self, bootloader='systemd-bootctl'):
log(f'Adding bootloader to {self.boot_partition}') log(f'Adding bootloader {bootloader} to {self.boot_partition}')
if bootloader == 'systemd-bootctle':
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} bootctl --no-variables --path=/boot install')) o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} bootctl --no-variables --path=/boot install'))
with open(f'{self.mountpoint}/boot/loader/loader.conf', 'w') as loader: with open(f'{self.mountpoint}/boot/loader/loader.conf', 'w') as loader:
loader.write('default arch\n') loader.write('default arch\n')
@ -194,7 +198,7 @@ class Installer():
entry.write(f'options cryptdevice=UUID={uid}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n') entry.write(f'options cryptdevice=UUID={uid}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n')
self.helper_flags['bootloader'] = True self.helper_flags['bootloader'] = bootloader
return True return True
break break
else: else:
@ -205,10 +209,12 @@ class Installer():
entry.write(f'options root=PARTUUID={uid} rw intel_pstate=no_hwp\n') entry.write(f'options root=PARTUUID={uid} rw intel_pstate=no_hwp\n')
self.helper_flags['bootloader'] = True self.helper_flags['bootloader'] = bootloader
return True return True
break break
raise RequirementError(f'Could not identify the UUID of {self.partition}, there for {self.mountpoint}/boot/loader/entries/arch.conf will be broken until fixed.') raise RequirementError(f"Could not identify the UUID of {self.partition}, there for {self.mountpoint}/boot/loader/entries/arch.conf will be broken until fixed.")
else:
raise RequirementError(f"Unknown (or not yet implemented) bootloader added to add_bootloader(): {bootloader}")
def add_additional_packages(self, *packages): def add_additional_packages(self, *packages):
return self.pacstrap(*packages) return self.pacstrap(*packages)