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