diff -Naur anaconda.200709140049.bugfix_selinux/livecd.py anaconda.turboliveinst/livecd.py
--- anaconda.200709140049.bugfix_selinux/livecd.py	2007-09-14 12:41:41.000000000 -0500
+++ anaconda.turboliveinst/livecd.py	2007-09-14 12:44:17.000000000 -0500
@@ -133,25 +133,24 @@
     def getLiveBlockDevice(self):
         return self.osimg
 
-    def getLiveSizeMB(self):
-        lnk = os.readlink(self.osimg)
-        if lnk[0] != "/":
-            lnk = os.path.join(os.path.dirname(self.osimg), lnk)
-        blk = os.path.basename(lnk)
-
-        if not os.path.exists("/sys/block/%s/size" %(blk,)):
-            log.debug("Unable to determine the actual size of the live image")
-            return 0
-
-        size = open("/sys/block/%s/size" %(blk,), "r").read()
-        try:
-            size = int(size)
-        except ValueError:
-            log.debug("Unable to handle live size conversion: %s" %(size,))
-            return 0
+    def parseField(self, output, field):
+        for line in output.split("\n"):
+            if line.startswith(field + ":"):
+                return line[len(field) + 1:].strip()
+        
+        raise KeyError("Failed to find field '%s' in output" % field)
 
-        return (size * 512) / 1024 / 1024
+    def getSectorCountOfExt2FS(self, filesystem):
+        output = subprocess.Popen(['/sbin/dumpe2fs', '-h', filesystem],
+                                  stdout=subprocess.PIPE,
+                                  stderr=open('/dev/null', 'w')
+                                  ).communicate()[0]
         
+        return (int(self.parseField(output, "Block count")) *
+                int(self.parseField(output, "Block size")) / 512)
+
+    def getLiveSizeMB(self):
+        return (self.getSectorCountOfExt2FS(self.osimg) * 512) / 1024 / 1024
 
 class LiveCDCopyBackend(backend.AnacondaBackend):
     def __init__(self, method, instPath):
@@ -215,6 +214,9 @@
         wait = anaconda.intf.waitWindow(_("Doing post-installation"),
                                         _("Performing post-installation filesystem changes.  This may take several minutes..."))
 
+        # resize rootfs first, since it is 100% full due to genMinInstDelta
+        self._resizeRootfs(anaconda, wait)
+
         # remount filesystems
         anaconda.id.fsset.mountFilesystems(anaconda)
 
@@ -291,7 +293,6 @@
                 log.error("error mounting selinuxfs: %s" %(e,))
         isys.mount("/dev", "%s/dev" %(anaconda.rootPath,), bindMount = 1)
 
-        self._resizeRootfs(anaconda, wait)
         wait.pop()
 
     def _resizeRootfs(self, anaconda, win = None):
diff -Naur anaconda.200709140049.bugfix_selinux/liveinst/liveinst.sh anaconda.turboliveinst/liveinst/liveinst.sh
--- anaconda.200709140049.bugfix_selinux/liveinst/liveinst.sh	2007-04-04 13:05:42.000000000 -0500
+++ anaconda.turboliveinst/liveinst/liveinst.sh	2007-09-14 12:20:13.000000000 -0500
@@ -4,7 +4,29 @@
 #
 
 if [ -z "$LIVE_BLOCK" ]; then
-    LIVE_BLOCK="/dev/live-osimg"
+    #
+    # We avoid copying unused data by copying a filesystem image that has 
+    # been reduced to the minimal possible size. This minimal image is not 
+    # sufficient for a running LiveCD as applications need room to write 
+    # more data, but the minimal image is efficiently created just before 
+    # copying by applying a pre-calculated set of deltas to the original 
+    # large filesystem image.
+    #
+
+    # did mayflower find and expose the delta data via loop118?
+    if ( losetup /dev/loop118 > /dev/null 2>&1 ); then
+	# the delta data is exposed as gzipped data in a loop device
+	zcat /dev/loop118 > /dev/shm/osmin.img
+	# devicemapper needs a loop device with the uncompressed data
+	losetup /dev/loop117 /dev/shm/osmin.img
+	# set up the devicemapper snapshot device, which will merge
+	# the normal live fs image, and the delta, into a minimzied fs image
+	echo "0 $( blockdev --getsize /dev/loop121 ) snapshot /dev/loop121 /dev/loop117 p 8" | dmsetup create --readonly live-osimg-min
+	LIVE_BLOCK="/dev/mapper/live-osimg-min"
+    else
+	# fall back to legacy pre-genMinInstDelta behavior
+	LIVE_BLOCK="/dev/live-osimg"
+    fi
 fi
 
 if [ ! -b $LIVE_BLOCK ]; then
@@ -42,3 +64,10 @@
 if [ -n $current ]; then
     /usr/sbin/setenforce $current
 fi
+
+# cleanup genMinInstDelta stuff if needed
+if ( losetup /dev/loop118 > /dev/null 2>&1 ); then
+    dmsetup remove live-osimg-min
+    losetup -d /dev/loop117
+    rm -f /dev/shm/osmin.img
+fi
