diff --git a/plugins/partition/partition.py b/plugins/partition/partition.py index 79224a2..3a090ee 100644 --- a/plugins/partition/partition.py +++ b/plugins/partition/partition.py @@ -37,7 +37,7 @@ PARTTYPES = { "linux" : ["L", "ext3"]} CONFIGPARTITION = { - "size" : 5, # size of configuration partition (if necessary) in MB + "size" : 10, # size of configuration partition (if necessary) in MB "type" : "L", "fs" : "ext2"} @@ -184,6 +184,7 @@ class partition(cryptobox.plugins.base.CryptoBoxPlugin): block_devices = [ e for e in blockdevice_tools.Blockdevices().get_partitionable_devices() if self.cbox.is_device_allowed(e) ] + block_devices.sort() counter = 0 for dev in block_devices: self.hdf[self.hdf_prefix + "BlockDevices.%d.name" % counter] = \ @@ -461,7 +462,7 @@ class partition(cryptobox.plugins.base.CryptoBoxPlugin): self.cbox.log.info("failed to reread the modified partition table: %s" % error) # refresh the device list self.cbox.reread_container_list() - # update the blockdevice - especially the new partitioned children + # update the current blockdevice - especially the new partitioned children self.blockdevice.reset() return (fdisk_status == 0) @@ -504,7 +505,7 @@ class partition(cryptobox.plugins.base.CryptoBoxPlugin): """Format all partitions of the device. """ parts = param_parts[:] - part_num = 1 + part_num = 0 ## maybe a config partition? if self.with_config_partition: dev_name = self.__get_partition_device(self.blockdevice, part_num) @@ -548,8 +549,8 @@ class partition(cryptobox.plugins.base.CryptoBoxPlugin): valid_children.sort() self.cbox.log.debug("Valid children of %s: %s" % \ (blockdev, [child.name for child in valid_children])) - if number <= len(valid_children): - childdev = valid_children[number-1] + if number < len(valid_children): + childdev = valid_children[number] if childdev: return childdev.get_device() ## return some guessed value - we should never get here ...