def merge_partitions
      partitions = {}

      merge_field('hardware.partitions') do |parts|
        parts.each do |root, partition|
          if partitions.keys.include?(root)
            partitions[root]['size'] = partition['size'] if partitions[root]['size'] < partition['size']

            unless partition['type'].nil?
              partitions[root].delete('options') if partitions[root]['type'] != partition['type']
              partitions[root]['type'] = partition['type']
            else
              partitions[root]['type'] = @appliance_config.default_filesystem_type
            end
          else
            partitions[root] = {}
            partitions[root]['size'] = partition['size']

            unless partition['type'].nil?
              partitions[root]['type'] = partition['type']
            else
              partitions[root]['type'] = @appliance_config.default_filesystem_type
            end
          end

          partitions[root]['passphrase'] = partition['passphrase'] unless partition['passphrase'].nil?
          partitions[root]['options'] = partition['options'] unless partition['options'].nil?
        end
      end

      # https://bugzilla.redhat.com/show_bug.cgi?id=466275
      partitions['/boot'] = {'type' => 'ext3', 'size' => 0.1} if partitions['/boot'].nil? and (@appliance_config.os.name == 'sl' or @appliance_config.os.name == 'centos' or @appliance_config.os.name == 'rhel') and @appliance_config.os.version == '5'

      @appliance_config.hardware.partitions = partitions
    end
def merge_partitions
      partitions = {}

      merge_field('hardware.partitions') do |parts|
        parts.each do |root, partition|
          if partitions.keys.include?(root)
            partitions[root]['size'] = partition['size'] if partitions[root]['size'] < partition['size']

            unless partition['type'].nil?
              partitions[root].delete('options') if partitions[root]['type'] != partition['type']
              partitions[root]['type'] = partition['type']
            else
              partitions[root]['type'] = @appliance_config.default_filesystem_type
            end
          else
            partitions[root] = {}
            partitions[root]['size'] = partition['size']

            unless partition['type'].nil?
              partitions[root]['type'] = partition['type']
            else
              partitions[root]['type'] = @appliance_config.default_filesystem_type
            end
          end

          partitions[root]['passphrase'] = partition['passphrase'] unless partition['passphrase'].nil?
          partitions[root]['options'] = partition['options'] unless partition['options'].nil?
        end
      end

      # https://bugzilla.redhat.com/show_bug.cgi?id=466275
      partitions['/boot'] = {'type' => 'ext3', 'size' => 0.1} if partitions['/boot'].nil? and (@appliance_config.os.name == 'sl' or @appliance_config.os.name == 'centos' or @appliance_config.os.name == 'rhel') and @appliance_config.os.version == '5'

      @appliance_config.hardware.partitions = partitions
    end
This will merge partitions from multiple appliances.