diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index 79d4a1a1..4b8f8ee1 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -931,10 +931,11 @@ def make_image(opts, ks): """ # Disk size for a filesystem image should only be the size of / # to prevent surprises when using the same kickstart for different installations. + unique_partitions = dict((p.mountpoint, p) for p in ks.handler.partition.partitions) if opts.no_virt and (opts.make_iso or opts.make_fsimage): - disk_size = 2 + sum(p.size for p in ks.handler.partition.partitions if p.mountpoint == "/") + disk_size = 2 + sum(p.size for p in unique_partitions.values() if p.mountpoint == "/") else: - disk_size = 2 + sum(p.size for p in ks.handler.partition.partitions) + disk_size = 2 + sum(p.size for p in unique_partitions.values()) log.info("disk_size = %sMiB", disk_size) if opts.image_name: