[master 1/1] anaconda-dracut: Mount /dev/mapper/live-rw (#1232411)

bcl installerbot-noreply at redhat.com
Thu Jun 25 14:15:37 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

systemd added handling of some root=live: cmdline args, dracut adjusted
and started using a systemd generator that is run early, based on the
cmdline, and stopped creating a mount hook when dmsquash-live-root is
called.

There should be a cleaner way for us to interact with dracut, but isn't.
So for now (in the interest of being able to boot and test things) we
will write the dracut mount hook ourselves.
---
 dracut/anaconda-lib.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index f373d37..38e17f8 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -97,7 +97,12 @@ anaconda_live_root_dir() {
         umount $repodir
         [ -n "$iso" ] && umount $isodir
     fi
-    [ -e "$img" ] && /sbin/dmsquash-live-root $img
+    if [ -e "$img" ]; then
+        /sbin/dmsquash-live-root $img
+        # dracut & systemd only mount things with root=live: so we have to so this ourselves
+        # See https://bugzilla.redhat.com/show_bug.cgi?id=1232411
+        printf 'mount /dev/mapper/live-rw %s\n' "$NEWROOT" > $hookdir/mount/01-$$-anaconda.sh
+    fi
 }
 
 # find updates.img/product.img/RHUpdates and unpack/copy them so they'll


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/cbced0ab8bfcbcb4d0b2e5760a5d8747e27bfd2a


More information about the anaconda-patches mailing list