[master 2/2] livemedia-creator: no-virt fsimage should only use / size from ks
bcl
installerbot-noreply at redhat.com
Wed Aug 26 23:18:31 UTC 2015
From: "Brian C. Lane" <bcl at redhat.com>
The amount of free space for / should be consistent between installation
types, otherwise some may have enough space, and others won't.
---
src/sbin/livemedia-creator | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator
index 5f12efb..279c55c 100755
--- a/src/sbin/livemedia-creator
+++ b/src/sbin/livemedia-creator
@@ -791,7 +791,12 @@ def make_image(opts, ks):
Use virt-install or anaconda to install to a disk image.
"""
- disk_size = 2 + sum(p.size for p in ks.handler.partition.partitions)
+ # Disk size for a filesystem image should only be the size of /
+ # to prevent surprises when using the same kickstart for different installations.
+ 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 == "/")
+ else:
+ disk_size = 2 + sum(p.size for p in ks.handler.partition.partitions)
log.info("disk_size = %sMiB", disk_size)
if opts.image_name:
--
To view this commit on github, visit https://github.com/rhinstaller/lorax/commit/5a406dd074f06e63278ebd08af8262289d55d256
More information about the anaconda-patches
mailing list