--- usr/share/initramfs-tools/scripts/live~	2008-05-19 18:58:33.000000000 +0200
+++ usr/share/initramfs-tools/scripts/live	2008-05-20 16:50:03.000000000 +0200
@@ -508,7 +508,7 @@
 {
 	case "${1}" in
 		*.squashfs|*.ext2|*.ext3|*.jffs2)
-			echo $(setup_loop "${1}" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}")
+			echo $(setup_loop "${1}" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}" "${2}")
 			;;
 
 		*.dir)
@@ -1009,7 +1009,7 @@
 			rofslist="${image} ${rofslist}"
 		elif [ -f "${image}" ]
 		then
-			backdev=$(get_backing_device "${image}")
+			backdev=$(get_backing_device "${image}" "-r")
 			fstype=$(get_fstype "${backdev}")
 
 			if [ "${fstype}" = "unknown" ]
--- usr/share/initramfs-tools/scripts/live-helpers~	2008-04-26 15:40:02.000000000 +0200
+++ usr/share/initramfs-tools/scripts/live-helpers	2008-05-20 16:46:35.000000000 +0200
@@ -153,6 +153,7 @@
 	local pattern=${3}
 	local offset=${4}
 	local encryption=${5}
+        local readonly=${6}
 
 	modprobe -q -b "${module}"
 	udevsettle
@@ -163,6 +164,10 @@
 		then
 			dev=$(sys2dev "${loopdev}")
 			options=''
+                        if [ -n ${readonly} ] 
+                        then
+                                options="${options} -r "
+                        fi
 
 			if [ 0 -lt "${offset}" ]
 			then
