Blame SOURCES/0024-dmsquash-live-add-dev-mapper-live-base.patch

712866
From 86fff83927ad194def97c60c2eef80099ebb1238 Mon Sep 17 00:00:00 2001
712866
From: "Brian C. Lane" <bcl@redhat.com>
712866
Date: Tue, 8 Oct 2013 15:13:44 +0200
712866
Subject: [PATCH] dmsquash-live: add /dev/mapper/live-base
712866
712866
This is similar to the reason for adding the
712866
/run/initramfs/live-baseloop symlink -- access to the original live
712866
image without overlays.
712866
712866
livemedia-creator does not create a osmin.img, so there is no mountable
712866
device for it to use when rsyncing the live image to the target. It
712866
needs a device that points to the original live image without overlays.
712866
712866
Note that lmc won't be creating osmin.img, since really isn't needed any
712866
longer. Its purpose was to provide a minimal image that could be dd'd to
712866
the target. Now that we use rsync this is no longer necessary.
712866
712866
The included patch adds a /dev/mapper/live-base device that Anaconda can
712866
use whether or not there is an osmin present.
712866
---
712866
 modules.d/90dmsquash-live/dmsquash-live-root.sh | 6 +++---
712866
 1 file changed, 3 insertions(+), 3 deletions(-)
712866
712866
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
5c6c2a
index 8951f80c..5705e8df 100755
712866
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
712866
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
712866
@@ -144,6 +144,9 @@ do_live_overlay() {
712866
         over=$OVERLAY_LOOPDEV
712866
     fi
712866
     echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw
712866
+
712866
+    # Create a device that always points to a ro base image
712866
+    echo 0 $sz linear $base 0 | dmsetup create --readonly live-base
712866
 }
712866
 
712866
 # live cd helper function
712866
@@ -225,9 +228,6 @@ if [ -n "$ROOTFLAGS" ]; then
712866
     ROOTFLAGS="-o $ROOTFLAGS"
712866
 fi
712866
 
712866
-if [ -b "$BASE_LOOPDEV" ]; then
712866
-    ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop
712866
-fi
712866
 ln -s /dev/mapper/live-rw /dev/root
712866
 printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
712866