Skip to content

Commit

Permalink
fstab incorrectly updated since many version ago
Browse files Browse the repository at this point in the history
Updated `genfstab()` to approprately generate a correct fstab for mounted filesystems used in `installation.mountpoint`.
  • Loading branch information
Torxed committed Dec 7, 2020
1 parent 7097fb9 commit ba863c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions archinstall/lib/installer.py
Expand Up @@ -118,9 +118,9 @@ def set_mirrors(self, mirrors):
def genfstab(self, flags='-pU'):
self.log(f"Updating {self.mountpoint}/etc/fstab", level=LOG_LEVELS.Info)

print(f'/usr/bin/genfstab {flags} {self.mountpoint} >> {self.mountpoint}/etc/fstab')
o = b''.join(sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint} >> {self.mountpoint}/etc/fstab'))
print(o)
o = b''.join(sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}'))
with open(f"{self.mountpoint}/etc/fstab", 'a') as fstab:
fstab.write(f"\n{o.decode('UTF-8')}")

if not os.path.isfile(f'{self.mountpoint}/etc/fstab'):
raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{o}')
Expand Down

0 comments on commit ba863c3

Please sign in to comment.