diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 58769a0ed..aaedac1f1 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -217,7 +217,11 @@ mount_partitions() { if [ -f /system/init.rc ]; then SYSTEM_ROOT=true setup_mntpoint /system_root - mount --move /system /system_root + if ! mount --move /system /system_root; then + umount /system + umount -l /system 2>/dev/null + mount_ro_ensure "system$SLOT app$SLOT" /system_root + fi mount -o bind /system_root/system /system else grep ' / ' /proc/mounts | grep -qv 'rootfs' || grep -q ' /system_root ' /proc/mounts \