Added some debugging to help identify why archinstall cannot find unencrypted devices when setting up the boot loader.

This commit is contained in:
Anton Hvornum 2021-03-21 16:48:22 +01:00
parent 3baaefb97d
commit 2fab088314
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 3 additions and 0 deletions

View File

@ -352,6 +352,7 @@ class Installer():
if self.partition.encrypted:
log(f"Identifying root partition {self.partition} to boot based on disk UUID, looking for '{os.path.basename(self.partition.real_device)}'.", level=LOG_LEVELS.Info)
for root, folders, uids in os.walk('/dev/disk/by-uuid'):
for uid in uids:
real_path = os.path.realpath(os.path.join(root, uid))
@ -363,6 +364,7 @@ class Installer():
return True
break
else:
log(f"Identifying root partition {self.partition} to boot based on partition UUID, looking for '{os.path.basename(self.partition.path)}'.", level=LOG_LEVELS.Info)
for root, folders, uids in os.walk('/dev/disk/by-partuuid'):
for uid in uids:
real_path = os.path.realpath(os.path.join(root, uid))
@ -373,6 +375,7 @@ class Installer():
self.helper_flags['bootloader'] = bootloader
return True
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.")
else:
raise RequirementError(f"Unknown (or not yet implemented) bootloader added to add_bootloader(): {bootloader}")