summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2014-08-28 23:13:05 +0200
committerTails developers <tails@boum.org>2014-08-28 23:13:05 +0200
commit3dc3499a88a5df7b2e110dfc89a83a71257d2371 (patch)
tree449241422232f29542fb8c73d9e341783eb0fa0f
parentcb4d7397c68a4bab0a6c06c438bce52c6a5bdc98 (diff)
parent116e637aaa97517aa4b51204bff0c811ba8d3683 (diff)
Merge branch 'bugfix/7716-dont-update-partition-properties-on-mbr'
-rwxr-xr-xliveusb/creator.py12
-rwxr-xr-xliveusb/gui.py2
2 files changed, 13 insertions, 1 deletions
diff --git a/liveusb/creator.py b/liveusb/creator.py
index ad9a0ab..20981d6 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -895,6 +895,18 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
# do it (as of Wheezy).
self._set_partition_flags(self.drive['parent'], 1, SYSTEM_PARTITION_FLAGS)
+ def is_partition_GPT(self):
+
+ # Check if the partition scheme is GPT
+ udi = self.drive['udi']
+ dev_obj = self.bus.get_object("org.freedesktop.UDisks", udi)
+ properties = dbus.Interface(dev_obj, "org.freedesktop.DBus.Properties")
+ partition_scheme = str(properties.Get(udi, 'PartitionScheme'))
+ if partition_scheme == 'gpt':
+ return True
+ else:
+ return False
+
def switch_drive_to_system_partition(self):
self._full_drive = self._drive
append = False
diff --git a/liveusb/gui.py b/liveusb/gui.py
index d2f89f8..4b89f03 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -239,7 +239,7 @@ class LiveUSBThread(QtCore.QThread):
self.live.update_configs()
self.live.reset_mbr()
- if not self.parent.opts.partition:
+ if not self.parent.opts.partition and self.live.is_partition_GPT():
self.live.update_system_partition_properties()
self.live.install_bootloader()
# self.live.bootable_partition()