Update patch 06_support_fromiso_isofrom.dpatch: unmount device when using isofrom... v1.157.1-1grml.04
authorMichael Prokop <mika@grml.org>
Fri, 15 May 2009 16:43:03 +0000 (18:43 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 15 May 2009 17:18:06 +0000 (19:18 +0200)
debian/changelog
debian/patches/06_support_fromiso_isofrom.dpatch

index cc018e0..8bb9d32 100644 (file)
@@ -1,3 +1,12 @@
+live-initramfs (1.157.1-1grml.04) unstable; urgency=low
+
+  * Update patch 06_support_fromiso_isofrom.dpatch:
+    Make sure to get rid of loopback device and unmount /isofrom
+    when using fromiso/isofrom bootoption in combination with toram.
+    Thanks to Marc Haber for reporting and the VM setup!
+
+ -- Michael Prokop <mika@grml.org>  Fri, 15 May 2009 18:40:20 +0200
+
 live-initramfs (1.157.1-1grml.03) unstable; urgency=low
 
   * Re-enabling 04_fix_no_medium_found_error as
 live-initramfs (1.157.1-1grml.03) unstable; urgency=low
 
   * Re-enabling 04_fix_no_medium_found_error as
index 521ec56..1710a3a 100755 (executable)
@@ -20,7 +20,7 @@
                        username=*)
                                USERNAME="${ARGUMENT#username=}"
                                LIVECONF="changed"
                        username=*)
                                USERNAME="${ARGUMENT#username=}"
                                LIVECONF="changed"
-@@ -1300,6 +1305,17 @@ check_dev ()
+@@ -1339,6 +1344,17 @@ check_dev ()
        devname="${2}"
        skip_uuid_check="${3}"
  
        devname="${2}"
        skip_uuid_check="${3}"
  
        if [ -z "${devname}" ]
        then
                devname=$(sys2dev "${sysdev}")
        if [ -z "${devname}" ]
        then
                devname=$(sys2dev "${sysdev}")
+@@ -1609,6 +1625,15 @@ mountroot ()
+               log_end_msg
+       fi
++      # if we do not unmount the ISO we can't run "fsck /dev/ice" later on
++      # because the mountpoint is left behind in /proc/mounts, so let's get
++      # rid of it when running from RAM
++      if [ -n "$FROMISO" ] && [ "${TORAM}" ]
++      then
++        losetup -d /dev/loop0
++        grep -q /isofrom /proc/mounts && umount /isofrom
++      fi
++
+       if [ -n "${MODULETORAMFILE}" ]
+       then
+               setup_unionfs "${livefs_root}" "${rootmnt}"