Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
If a separate EFI partition exists, mount it! [zfs] [efi]
Browse files Browse the repository at this point in the history
  • Loading branch information
karasu committed Dec 12, 2016
1 parent feed3b6 commit d7e93de
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cnchi/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

""" Set some Cnchi global constants """

CNCHI_VERSION = "0.14.200"
CNCHI_VERSION = "0.14.201"
CNCHI_WEBSITE = "http://www.antergos.com"
CNCHI_RELEASE_STAGE = "production"

Expand Down
19 changes: 17 additions & 2 deletions cnchi/installation/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ def mount_partitions(self):
else:
boot_partition = ""

# EFI partition
if "/boot/efi" in self.mount_devices:
efi_partition = self.mount_devices["/boot/efi"]
else:
efi_partition = ""

# Swap partition
if "swap" in self.mount_devices:
swap_partition = self.mount_devices["swap"]
Expand All @@ -171,7 +177,7 @@ def mount_partitions(self):
cmd = ["zfs", "mount", "-a"]
call(cmd)
elif root_partition:
txt = "Mounting partition {0} into {1} directory".format(root_partition, DEST_DIR)
txt = "Mounting root partition {0} into {1} directory".format(root_partition, DEST_DIR)
logging.debug(txt)
cmd = ['mount', root_partition, DEST_DIR]
call(cmd, fatal=True)
Expand All @@ -180,11 +186,20 @@ def mount_partitions(self):
boot_path = os.path.join(DEST_DIR, "boot")
os.makedirs(boot_path, mode=0o755, exist_ok=True)
if boot_partition:
txt = _("Mounting partition {0} into {1} directory").format(boot_partition, boot_path)
txt = _("Mounting boot partition {0} into {1} directory").format(boot_partition, boot_path)
logging.debug(txt)
cmd = ['mount', boot_partition, boot_path]
call(cmd, fatal=True)

if self.method == "zfs" and efi_partition:
# In automatic zfs mode, it could be that we have a specific EFI
# partition (different from /boot partition). This happens if using
# EFI and grub2 bootloader
txt = _("Mounting EFI partition {0} into {1} directory").format(efi_partition, efi_path)
logging.debug(txt)
cmd = ['mount', efi_partition, efi_path]
call(cmd, fatal=True)

# In advanced mode, mount all partitions (root and boot are already mounted)
if self.method == 'advanced':
for path in self.mount_devices:
Expand Down
2 changes: 1 addition & 1 deletion update.info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"version":"0.14.200","files":[
{"version":"0.14.201","files":[
]}

0 comments on commit d7e93de

Please sign in to comment.