diff -rupN debian-testing-amd64-netinst.orig/bin/check-missing-firmware debian-testing-amd64-netinst/bin/check-missing-firmware
--- debian-testing-amd64-netinst.orig/bin/check-missing-firmware	2013-08-16 15:10:00.000000000 +0200
+++ debian-testing-amd64-netinst/bin/check-missing-firmware	2013-10-05 20:16:34.143372897 +0200
@@ -246,6 +246,24 @@ check_for_firmware() {
 }
 
 while check_missing && ask_load_firmware; do
+	# Check whether the boot parameter 'loopmount=' is used
+	for arg in $(cat /proc/cmdline); do
+		case $arg in
+		loopmount=*)
+			LOOPMOUNT=${arg#loopmount=}
+			LOOPFILE=${LOOPMOUNT#*:}
+			[ "$LOOPFILE" != "$LOOPMOUNT" ] && LOOPDEV=${LOOPMOUNT%:*}
+			;;
+		esac
+	done
+	# If LOOPMOUNT is used, check the (busy) device from which the ISO is loaded
+	if [ "$LOOPMOUNT" ]; then
+		log "Check on /loop for firmware"
+		if [ -d /loop/firmware ]; then
+			check_for_firmware /loop/firmware/*.deb /loop/firmware/*.udeb
+		fi
+	fi
+
 	# first, check if needed firmware (u)debs are available on the
 	# PXE initrd or the installation CD.
 	if [ -d /firmware ]; then
diff -rupN debian-testing-amd64-netinst.orig/var/lib/dpkg/info/cdrom-detect.postinst debian-testing-amd64-netinst/var/lib/dpkg/info/cdrom-detect.postinst
--- debian-testing-amd64-netinst.orig/var/lib/dpkg/info/cdrom-detect.postinst	2013-08-17 11:10:50.000000000 +0200
+++ debian-testing-amd64-netinst/var/lib/dpkg/info/cdrom-detect.postinst	2013-10-05 23:53:30.266800234 +0200
@@ -14,12 +14,26 @@ fail() {
 	exit 1
 }
 
+list_devices_by_id()
+{
+	local dir disk="$(echo "$1" | sed 's/ /\\x20/g')"
+	for dir in /dev/disk/by-label /dev/disk/by-uuid ; do
+		[ -e ${dir}/${disk} ] && echo ${dir}/${disk} || true
+	done
+}
+
+get_fstype ()
+{
+	/sbin/blkid -s TYPE -o value $1 2>/dev/null
+}
+
 try_mount() {
 	local device=$1
 	local type=$2
+	local options=$3
 
 	local ret=1
-	if mount -t $type -o $OPTIONS $device /cdrom; then
+	if mount -t $type -o $options $device /cdrom; then
 		log "CD-ROM mount succeeded: device=$device fstype=$type"
 		if [ -e /cdrom/.disk/info ]; then
 			CDNAME=$(cat /cdrom/.disk/info)
@@ -77,9 +91,8 @@ case "$OS" in
 	*)
 		log "Unknown OS '$OS', exiting"
 		exit 0
-		
 esac
- 
+
 # Is a cdrom already mounted? If so, assume it's the right one.
 mount | grep -q 'on /cdrom' && set_suite_and_codename && exit 0
 if [ -e /cdrom/.disk/info ]; then
@@ -95,41 +108,103 @@ log "Searching for Debian installation m
 
 mkdir /cdrom 2>/dev/null || true
 
+# Check whether the boot parameter 'loopmount=' is used
+for arg in $(cat /proc/cmdline); do
+	case $arg in
+	loopmount=*)
+		LOOPMOUNT=${arg#loopmount=}
+		LOOPFILE=${LOOPMOUNT#*:}
+		[ "$LOOPFILE" != "$LOOPMOUNT" ] && LOOPDEV=${LOOPMOUNT%:*}
+		;;
+	esac
+done
+
+if [ "$LOOPMOUNT" ]; then
+	# Create mount point for loop mount
+	mkdir /loop 2>/dev/null || true
+fi
+
 # Need to wait for the usb device scan to complete
 if [ "$OS" = "linux" ]; then
-  for count in 1 2 3 4 5 6 8 9 10; do
-    devices="$(list-devices cd; list-devices maybe-usb-floppy)"
-    log "Devices: '$devices'"
-    if [ -n "$devices" ]; then
-      break 2
-    else
-      sleep 1
-    fi
-  done
+	for count in 1 2 3 4 5 6 8 9 10; do
+		devices="$(list-devices cd; list-devices maybe-usb-floppy)"
+		log "Devices: '$devices'"
+		if [ "$devices" ]; then
+			break 2
+		else
+			sleep 1
+		fi
+	done
 fi
 
 while true; do
-	WRONG=
+	WRONG=''
 
-	devices="$(list-devices cd; list-devices maybe-usb-floppy)"
-	for device in $devices; do
-		if try_mount $device $CDFS; then
-			break 2
-		fi
-	done
-	
-	devices="$(list-devices usb-partition)"
-	for device in $devices; do
-		if try_mount $device $CDFS; then
-			db_set cdrom-detect/hybrid true
-			break 2
+	if [ "$LOOPMOUNT" ]; then
+		mounted=0
+		log "Searching for Debian ISO: LOOPDEV='$LOOPDEV' LOOPFILE='$LOOPFILE'"
+		loopfile=/loop/${LOOPFILE#/}
+		log "Unmounting /loop just to be sure"
+		umount /loop 2>/dev/null || true
+		
+		if [ "$LOOPDEV" ] ; then
+			dev_given="device_given"
+		else
+			dev_given=""
 		fi
-		if try_mount $device $FATFS; then
-			db_set cdrom-detect/usb-hdd true
-			break 2
+		
+		# First look for USB devices, since the ISO is probably on them
+		for fs in $dev_given "usb-partition" "cd" "partition"; do
+			if [ "$fs" = "device_given" ]; then
+				devices="$(list_devices_by_id "$LOOPDEV")"
+			else
+				devices="$(list-devices $fs)"
+			fi
+			log "Trying loopmount ($fs) on '$devices' ..."
+			for device in $devices; do
+				# Determine the filesystem of the device
+				LOOPFS=$(get_fstype "${device}")
+				# Mount the device and try to mount the ISO specified by 'loopmount='
+				log "Try to mount device=$device fstype=$LOOPFS"
+				if mount -o $OPTIONS -t $LOOPFS $device /loop; then
+					log "Try to loop mount file=$loopfile fstype=$CDFS"
+					if [ -f $loopfile ] && try_mount $loopfile $CDFS loop,$OPTIONS; then
+						log "ISO succesfully mounted"
+						mounted=1
+						break 2
+					else
+						umount /loop
+					fi
+				fi
+			done
+		done
+		if [ $mounted -eq 1 ]; then
+			log "Succesfully mounted the ISO: no need to check further devices"
+			break
 		fi
-	done
 
+	else
+
+		devices="$(list-devices cd; list-devices maybe-usb-floppy)"
+		for device in $devices; do
+			if try_mount $device $CDFS $OPTIONS; then
+				break 2
+			fi
+		done
+
+		devices="$(list-devices usb-partition)"
+		for device in $devices; do
+			if try_mount $device $CDFS $OPTIONS; then
+				db_set cdrom-detect/hybrid true
+				break 2
+			fi
+			if try_mount $device $FATFS $OPTIONS; then
+				db_set cdrom-detect/usb-hdd true
+				break 2
+			fi
+		done
+
+	fi
 
 	if [ "$WRONG" ]; then
 		db_input critical cdrom-detect/wrong-cd || [ $? -eq 30 ]
@@ -138,7 +213,7 @@ while true; do
 	fi
 
 	# If a device was detected but the mount failed, ask for the CD.
-	if [ -n "$devices" ]; then
+	if [ "$devices" ]; then
 		db_input critical cdrom-detect/retry || [ $? -eq 30 ]
 		db_go
 		db_get cdrom-detect/retry
@@ -150,7 +225,7 @@ while true; do
 			fail
 		fi
 	fi
- 
+
 	# If no device was detected, perhaps a driver floppy is needed.
 	if [ -e /usr/lib/debian-installer/retriever/media-retriever ]; then
 		db_input critical cdrom-detect/load_media
@@ -162,7 +237,7 @@ while true; do
 			continue
 		fi
 	fi
-    
+
 	# Otherwise manual configuration may be needed
 	db_input critical cdrom-detect/manual_config || [ $? -eq 30 ]
 	db_go
