Skip to content

Commit

Permalink
Merge pull request #58 from drauger-os-development/dev
Browse files Browse the repository at this point in the history
More fixes for #52
  • Loading branch information
Batcastle authored Jan 16, 2022
2 parents 9b1bc15 + a56cd7a commit 085ee62
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions usr/share/system-installer/modules/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,19 @@ def _install_grub(root):
del root[-1]
root = "".join(root)
redo = False
os.mkdir("/boot/grub")
try:
subprocess.check_call(["grub-mkdevicemap", "--verbose"],
stdout=stderr.buffer)
except CalledProcessError:
stdout=stderr.buffer)
except subprocess.CalledProcessError:
redo = True
subprocess.check_call(["grub-install", "--verbose", "--force",
"--target=i386-pc", root], stdout=stderr.buffer)
if redo:
try:
subprocess.check_call(["grub-mkdevicemap", "--verbose"],
stdout=stderr.buffer)
except CalledProcessError as e:
stdout=stderr.buffer)
except subprocess.CalledProcessError as e:
eprint("WARNING: GRUB device map failed to generate")
eprint("The error was as follows:")
eprint(traceback.format_exeception())
Expand All @@ -296,7 +297,7 @@ def _install_systemd_boot(release, root, distro):
pass
os.mkdir("/boot/efi/loader")
os.mkdir("/boot/efi/loader/entries")
os.mkdir(f"/boot/efi/{distro}" )
os.mkdir(f"/boot/efi/{distro}")
os.environ["SYSTEMD_RELAX_ESP_CHECKS"] = "1"
with open("/etc/environment", "a") as envi:
envi.write("export SYSTEMD_RELAX_ESP_CHECKS=1")
Expand Down

0 comments on commit 085ee62

Please sign in to comment.