From: Brian C. Lane Date: Tue, 8 Oct 2013 13:13:44 +0000 (+0200) Subject: dmsquash-live: add /dev/mapper/live-base X-Git-Tag: 035~116 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3622d6d7b0806023d60f62fc90b859adaefe5e59;p=thirdparty%2Fdracut.git dmsquash-live: add /dev/mapper/live-base This is similar to the reason for adding the /run/initramfs/live-baseloop symlink -- access to the original live image without overlays. livemedia-creator does not create a osmin.img, so there is no mountable device for it to use when rsyncing the live image to the target. It needs a device that points to the original live image without overlays. Note that lmc won't be creating osmin.img, since really isn't needed any longer. Its purpose was to provide a minimal image that could be dd'd to the target. Now that we use rsync this is no longer necessary. The included patch adds a /dev/mapper/live-base device that Anaconda can use whether or not there is an osmin present. --- diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh index 8951f80cf..5705e8df9 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh @@ -144,6 +144,9 @@ do_live_overlay() { over=$OVERLAY_LOOPDEV fi echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw + + # Create a device that always points to a ro base image + echo 0 $sz linear $base 0 | dmsetup create --readonly live-base } # live cd helper function @@ -225,9 +228,6 @@ if [ -n "$ROOTFLAGS" ]; then ROOTFLAGS="-o $ROOTFLAGS" fi -if [ -b "$BASE_LOOPDEV" ]; then - ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop -fi ln -s /dev/mapper/live-rw /dev/root printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh