Also using nodiratime, not just noatime.
[live-boot-grml.git] / scripts / live
index 7a82f60..ebac3ae 100755 (executable)
@@ -336,6 +336,11 @@ Arguments ()
                                export SHOWMOUNTS
                                ;;
 
+                       textonly)
+                               TEXTONLY="Yes"
+                               export TEXTONLY
+                               ;;
+
                        timezone=*)
                                TIMEZONE="${ARGUMENT#timezone=}"
                                export TIMEZONE
@@ -727,7 +732,7 @@ do_snap_copy ()
                if [ -n "${fstype}" ]
                then
                        # Copying stuff...
-                       mount -t "${fstype}" -o ro "${fromdev}" "${tomount}"
+                       mount -t "${fstype}" -o ro,noatime,nodiratime "${fromdev}" "${tomount}"
                        cp -a "${tomount}"/* ${todir}
                        umount "${tomount}"
                else
@@ -853,13 +858,13 @@ setup_unionfs ()
        then
                for IMAGE in $(cat ${image_directory}/filesystem.${MODULE}.module)
                do
-                       image_string="${image_string} ${image_directory}/${image}"
+                       image_string="${image_string} ${image_directory}/${IMAGE}"
                done
        elif [ -e "${image_directory}/${MODULE}.module" ]
        then
                for IMAGE in $(cat ${image_directory}/${MODULE}.module)
                do
-                       image_string="${image_string} ${image_directory}/${image}"
+                       image_string="${image_string} ${image_directory}/${IMAGE}"
                done
        else
                # ${MODULE}.module does not exist, create a list of images
@@ -903,7 +908,7 @@ setup_unionfs ()
 
                        mkdir -p "${croot}/${imagename}"
                        echo "debug: Can not mount backdev ${backdev} (image = ${image}) on croot/imagename ${croot}/${imagename}"
-                       mount -t "${fstype}" -o ro "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
+                       mount -t "${fstype}" -o ro,noatime,nodiratime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
                fi
        done
 
@@ -927,9 +932,9 @@ setup_unionfs ()
                fi
        fi
 
-       mount ${cowdevice} -t ${cow_fstype} -o rw /cow || panic "Can not mount ${cowdevice} on /cow"
+       mount ${cowdevice} -t ${cow_fstype} -o rw,noatime,nodiratime /cow || panic "Can not mount ${cowdevice} on /cow"
 
-       mount -t ${UNIONTYPE} -o dirs=/cow=rw:${rofsstring} ${UNIONTYPE} "${rootmnt}" || panic "${UNIONTYPE} mount failed"
+       mount -t ${UNIONTYPE} -o noatime,nodiratime,dirs=/cow=rw:${rofsstring} ${UNIONTYPE} "${rootmnt}" || panic "${UNIONTYPE} mount failed"
 
        # Adding other custom mounts
        if [ -n "${PERSISTENT}" ]
@@ -940,7 +945,7 @@ setup_unionfs ()
 
                if [ -b "${homecow}" ]
                then
-                       mount -t $(get_fstype "${homecow}") -o rw "${homecow}" "${rootmnt}/home"
+                       mount -t $(get_fstype "${homecow}") -o rw,noatime,nodiratime "${homecow}" "${rootmnt}/home"
                        export HOMEMOUNTED=1 # used to proper calculate free space in do_snap_copy()
                else
                        [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent home medium"
@@ -971,7 +976,7 @@ setup_unionfs ()
 
        # shows cow fs on /cow for use by live-snapshot
        mkdir -p "${rootmnt}/live/cow"
-       mount -o bind /cow "${rootmnt}/live/cow"
+       mount -o move /cow "${rootmnt}/live/cow"
 }
 
 check_dev ()
@@ -994,7 +999,7 @@ check_dev ()
 
        if is_supported_fs ${fstype}
        then
-               mount -t ${fstype} -o ro "${devname}" ${mountpoint} || continue
+               mount -t ${fstype} -o ro,noatime,nodiratime "${devname}" ${mountpoint} || continue
 
                if is_live_path ${mountpoint}
                then