[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#877776: live-boot: fixed read-only mode with overlayfs



Package: live-boot
Version: 1:20170623
Severity: normal
Tags: patch

Read-only persistence mode doesn't currently work with overlayfs. The
attached patch fixes this issue.

Cheers

Ronny
commit 903d7ac3bb7fb69d01f9e499e569e881ba022ddc
Author: Ronny Standtke <ronny.standtke@gmx.net>
Date:   Thu Sep 7 16:58:30 2017 +0200

    fixed read-only mode with overlayfs

diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh
index 9d3cf9c..fb7256c 100755
--- a/components/9990-misc-helpers.sh
+++ b/components/9990-misc-helpers.sh
@@ -1638,6 +1638,13 @@ activate_custom_mounts ()
 			mkdir -p ${cow_dir}
 			chown_ref "${source}" "${cow_dir}"
 			chmod_ref "${source}" "${cow_dir}"
+			if [ "${UNIONTYPE}" = "overlay" ]
+			then
+				# When we use overlay we add the "/rw" postfix to our source when using it
+				# as upper layer. Therefore we also have to add it here when using it as
+				# the lower layer.
+				source="${source}/rw"
+			fi
 			do_union ${dest} ${cow_dir} ${source} ${rootfs_dest_backing}
 		fi
 

Reply to: