summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2014-05-26 08:16:11 +0000
committerTails developers <tails@boum.org>2014-05-26 08:16:11 +0000
commita3d85c67e701f3a71d3edfc71dc1fe37da29213b (patch)
tree2f06f50bceaa23a633e459e9bf51592e1b9ec11d
parent6c09fc08a7a50f680e3f5691ea35c0b7e3fc17b9 (diff)
Pass a parent device (e.g. /dev/sdb) instead of a partition (e.g. /dev/sdb1) to sgdisk.
Else, sgdisk tries to create a recursive GPT, and fails to perform its job properly: what we want is really to modify partition #1 on /dev/sdb, not partition #1 on /dev/sdb1.
-rwxr-xr-xliveusb/creator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/liveusb/creator.py b/liveusb/creator.py
index d8a1b6d..408f770 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -246,7 +246,7 @@ class LiveUSBCreator(object):
def update_system_partition_properties(self):
cmd = ( [ '/sbin/sgdisk' ]
+ [ '--typecode=1:%s' % ESP_GUID ]
- + [ self.drive['device'] ])
+ + [ self.drive['parent'] ])
self.popen(cmd, shell=False)
def _gdisk_script(self, gdisk_cmds):
@@ -888,7 +888,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
# We still need to set the system partition flags as udisks cannot
# do it (as of Wheezy).
- self._set_partition_flags(self.drive['device'], 1, SYSTEM_PARTITION_FLAGS)
+ self._set_partition_flags(self.drive['parent'], 1, SYSTEM_PARTITION_FLAGS)
def switch_drive_to_system_partition(self):
self._full_drive = self._drive