Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/__init__.py2
-rw-r--r--archinstall/lib/disk/filesystem.py6
-rw-r--r--archinstall/lib/installer.py14
3 files changed, 10 insertions, 12 deletions
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index 2eec1ce6..30ed8667 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -72,6 +72,8 @@ arguments = initialize_arguments()
storage['arguments'] = arguments
if arguments.get('debug'):
log(f"Warning: --debug mode will write certain credentials to {storage['LOG_PATH']}/{storage['LOG_FILE']}!", fg="red", level=logging.WARNING)
+if arguments.get('mount-point'):
+ storage['MOUNT_POINT'] = arguments['mount-point']
from .lib.plugins import plugins, load_plugin # This initiates the plugin loading ceremony
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index cf2a286e..2eb1864d 100644
--- a/archinstall/lib/disk/filesystem.py
+++ b/archinstall/lib/disk/filesystem.py
@@ -20,12 +20,6 @@ class Filesystem:
self.mode = mode
def __enter__(self, *args, **kwargs):
- # TODO: partition_table_type is hardcoded to GPT at the moment. This has to be changed.
- if self.mode == self.blockdevice.partition_table_type:
- log(f'Kept partition format {self.mode} for {self.blockdevice}', level=logging.DEBUG)
- else:
- raise DiskError(f'The selected partition table format {self.mode} does not match that of {self.blockdevice}.')
-
return self
def __repr__(self):
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 3cfe0ab7..7ac80047 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -7,7 +7,7 @@ import shlex
import pathlib
import subprocess
import glob
-from .disk import get_partitions_in_use, Partition, find_partition_by_mountpoint
+from .disk import get_partitions_in_use, Partition
from .general import SysCommand
from .hardware import has_uefi, is_vm, cpu_vendor
from .locale_helpers import verify_keyboard_layout, verify_x11_keyboard_layout
@@ -174,7 +174,8 @@ class Installer:
mountpoints[partition['mountpoint']] = partition
for mountpoint in sorted(mountpoints.keys()):
- if mountpoints[mountpoint]['encrypted']:
+ log(f"Mounting {mountpoint} to {self.target}{mountpoint}", level=logging.INFO)
+ if mountpoints[mountpoint].get('encrypted', False):
loopdev = storage.get('ENC_IDENTIFIER', 'ai') + 'loop'
if not (password := mountpoints[mountpoint].get('!password', None)):
raise RequirementError(f"Missing mountpoint {mountpoint} encryption password in layout: {mountpoints[mountpoint]}")
@@ -186,8 +187,10 @@ class Installer:
mountpoints[mountpoint]['device_instance'].mount(f"{self.target}{mountpoint}")
time.sleep(1)
- if not get_mount_info(f"{self.target}{mountpoint}", traverse=False):
- raise DiskError(f"Target {self.target}{mountpoint} never got mounted properly.")
+ try:
+ get_mount_info(f"{self.target}{mountpoint}", traverse=False)
+ except DiskError:
+ raise DiskError(f"Target {self.target}{mountpoint} never got mounted properly (unable to get mount information using findmnt).")
if (subvolumes := mountpoints[mountpoint].get('btrfs', {}).get('subvolumes', {})):
for name, location in subvolumes.items():
@@ -575,7 +578,7 @@ class Installer:
with open(f'{self.target}/boot/loader/entries/{self.init_time}_{kernel}.conf', 'w') as entry:
entry.write('# Created by: archinstall\n')
entry.write(f'# Created on: {self.init_time}\n')
- entry.write('title Arch Linux\n')
+ entry.write(f'title Arch Linux ({kernel})\n')
entry.write(f"linux /vmlinuz-{kernel}\n")
if not is_vm():
vendor = cpu_vendor()
@@ -619,7 +622,6 @@ class Installer:
self.helper_flags['bootloader'] = True
return True
else:
- boot_partition = find_partition_by_mountpoint(self.partitions, relative_mountpoint=f"/boot")
SysCommand(f'/usr/bin/arch-chroot {self.target} grub-install --target=i386-pc --recheck {boot_partition.path}')
SysCommand(f'/usr/bin/arch-chroot {self.target} grub-mkconfig -o /boot/grub/grub.cfg')
self.helper_flags['bootloader'] = True