index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/disk.py | 17 | ||||
-rw-r--r-- | archinstall/lib/luks.py | 2 | ||||
-rw-r--r-- | archinstall/lib/user_interaction.py | 13 |
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index 9ad49ac2..44d46c8b 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -78,10 +78,15 @@ class BlockDevice(): return drive['back-file'] elif self.info['type'] == 'disk': return self.path + elif self.info['type'][:4] == 'raid': + # This should catch /dev/md## raid devices + return self.path elif self.info['type'] == 'crypt': if 'pkname' not in self.info: raise DiskError(f'A crypt device ({self.path}) without a parent kernel device name.') return f"/dev/{self.info['pkname']}" + else: + log(f"Unknown blockdevice type for {self.path}: {self.info['type']}", level=LOG_LEVELS.Debug) # if not stat.S_ISBLK(os.stat(full_path).st_mode): # raise DiskError(f'Selected disk "{full_path}" is not a block device.') @@ -240,9 +245,15 @@ class Partition(): if self.allow_formatting is False: log(f"Partition {self} is not marked for formatting.", level=LOG_LEVELS.Debug) return False - elif self.target_mountpoint == '/boot' and self.has_content(): - log(f"Partition {self} is a boot partition and has content inside.", level=LOG_LEVELS.Debug) - return False + elif self.target_mountpoint == '/boot': + try: + if self.has_content(): + log(f"Partition {self} is a boot partition and has content inside.", level=LOG_LEVELS.Debug) + return False + except SysCallError as err: + log(err.message, LOG_LEVELS.Debug) + log(f"Partition {self} was identified as /boot but we could not mount to check for content, continuing!", level=LOG_LEVELS.Debug) + pass return True diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index f36a25ab..62067ec1 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -109,7 +109,7 @@ class luks2(): else: raise err - if b'Command successful.' not in (cmd_output := b''.join(cmd_handle)): + if cmd_handle.exit_code != 0: raise DiskError(f'Could not encrypt volume "{partition.path}": {cmd_output}') return key_file diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 80db7be1..630862ee 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -272,9 +272,16 @@ def select_language(options, show_only_country_codes=True): print(' -- You can enter ? or help to search for more languages --') selected_language = input('Select one of the above keyboard languages (by number or full name): ') if selected_language.lower() in ('?', 'help'): - filter_string = input('Search for layout containing (example: "sv-"): ') - new_options = search_keyboard_layout(filter_string) - return select_language(new_options, show_only_country_codes=False) + while True: + filter_string = input('Search for layout containing (example: "sv-"): ') + new_options = list(search_keyboard_layout(filter_string)) + + if len(new_options) <= 0: + log(f"Search string '{filter_string}' yielded no results, please try another search or Ctrl+D to abort.", fg='yellow') + continue + + return select_language(new_options, show_only_country_codes=False) + elif selected_language.isdigit() and (pos := int(selected_language)) <= len(languages)-1: selected_language = languages[pos] # I'm leaving "options" on purpose here. |