Uelsk8s  committed d722619

added back umount partitions

  • Participants
  • Parent commits 398b7b0
  • Branches master

Comments (0)

Files changed (3)

File vinstall/backend/

         for partition in partitions:
             if not partition.is_mounted():
+                needs_umount = True
             if is_install_media(partition.mountpoint):
                 config = parse_config(partition.mountpoint)
                 yield cls(partition.mountpoint, config)
                             config = parse_config(iso_mountpoint)
                             yield cls(isopath, config)
+            if needs_umount:
+                partition.umount()
     def __init__(self, path, config):
         """Expose install media base dir and the config object

File vinstall/backend/

         """ Delete all partitions from drive
-        self.disk._disk.deleteAllPartitions()
+        #self.disk._disk.deleteAllPartitions()
+        self.disk._disk = parted.freshDisk(self.disk._device, "msdos")
+        self.disk._disk.has_partition_table = True
     def add_partition(self,  size=0, units='MB'):
         """Add a partition to the disk.  

File vinstall/controller/

         if install_media.is_iso():
             if not os.path.exists(install_media.path):
                 print "mount container here"
+		mntpoint = install_media.path.rsplit("/", 1)[0]
+		dev = mntpoint.replace("/mnt", "/dev")
+            	utils.mount(dev, mountpoint)
             utils.mountiso(install_media.path, mountpoint)
             utils.mount(install_media.path, mountpoint, filesystem="auto")