index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-04-09 11:45:06 +0200 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-04-09 11:45:06 +0200 |
commit | 05e848ce626c768bc6bfbcdbfa65083abb035b87 (patch) | |
tree | f97a433e012314e71b7fd3fa2ac155ce2250f56a /archinstall/lib | |
parent | 08cf788eaad2ec9ecdfd2c1da1da70bfd4180984 (diff) |
-rw-r--r-- | archinstall/lib/disk.py | 18 |
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index dbb69662..7e02c539 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -366,14 +366,16 @@ class Partition(): if not fs: if not self.filesystem: raise DiskError(f'Need to format (or define) the filesystem on {self} before mounting.') fs = self.filesystem - ## libc has some issues with loop devices, defaulting back to sys calls - # ret = libc.mount(self.path.encode(), target.encode(), fs.encode(), 0, options.encode()) - # if ret < 0: - # errno = ctypes.get_errno() - # raise OSError(errno, f"Error mounting {self.path} ({fs}) on {target} with options '{options}': {os.strerror(errno)}") - if sys_command(f'/usr/bin/mount {self.path} {target}').exit_code == 0: - self.mountpoint = target - return True + + pathlib.Path(self.path).mkdir(parents=True, exist_ok=True) + + try: + sys_command(f'/usr/bin/mount {self.path} {target}') + except SysCallError as err: + raise err + + self.mountpoint = target + return True def unmount(self): try: |