[Nexus 7 Q&A, Help & Troubleshooting] Omega Kaos:
hi this is part of my updater-script

#Updater-script
set_progress(0.00);
ui_print("Checking Model ID");
assert(getprop("ro.product.device") == "grouper" || getprop("ro.build.product") == "grouper" || getprop("ro.product.board") == "grouper");
ui_print("Success!");
ui_print("Model ID - grouper");
ui_print("Ok to proceed");
ui_print("Now flashing Kaos Droid");
ifelse(is_mounted("/system") == "/system", unmount("/system"));
ifelse(is_mounted("/data") == "/data", unmount("/data"));
ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));

set_progress(0.01);
############################## OPTIONAL FULL WIPE ##############################
if
file_getprop("/tmp/aroma-data/wipe.prop","selected.0") == "2"
then

set_progress(0.01);
ui_print("@Executing Full Wipe");
ui_print("--Erasing & formatting /cache as EXT4");
run_program("/sbin/erase_image", "cache");
format("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/CAC");
run_program("/sbin/sleep", "2");

set_progress(0.02);
ui_print("-- Erasing & formatting /system as EXT4");
run_program("/sbin/erase_image", "system");
format("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP");
run_program("/sbin/sleep", "2");

set_progress(0.03);
ui_print("-- Erasing & formatting /data as EXT4");
delete_recursive("/data/app-asec");
delete_recursive("/data/app-private");
delete_recursive("/data/backup");
delete_recursive("/data/data");
delete_recursive("/data/dalvikcache");
delete_recursive("/data/dontpanic");
delete_recursive("/data/drm");
delete_recursive("/data/gps");
delete_recursive("/data/lightsensor");
delete_recursive("/data/local");
delete_recursive("/data/lost+found");
delete_recursive("/data/misc");
delete_recursive("/data/property");
delete_recursive("/data/resource-cache");
delete_recursive("/data/sensors");
delete_recursive("/data/ssh");
delete_recursive("/data/system");
delete_recursive("/data/tf");
delete_recursive("/data/user");
run_program("/sbin/sleep", "2");

set_progress(0.05);
ui_print("-- Removing system files from SD Card");
delete_recursive("/sdcard/.android_secure");
delete_recursive("/sdcard/.bookmark_thumb1");
delete_recursive("/sdcard/Android/data/com.google.android.apps.maps");
delete_recursive("/sdcard/LazyList");
delete_recursive("/sdcard/LOST.DIR");
delete_recursive("/sdcard/.android_secure");
run_program("/sbin/sleep", "2");
ui_print("Wipe Complete");

set_progress(0.06);
ui_print("Checking filesystems for errors");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/UDA");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/CAC");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/sdhci-tegra.3/by-name/APP");
run_program("/sbin/sleep", "2");

endif;

set_progress(0.07);
show_progress(0.07, 9);

ui_print("@Installing ROM");
ui_print(" ");
ui_print("--Writing System");
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/UDA", "/data");
run_program("/sbin/sleep", "2");
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
run_program("/sbin/sleep", "2");
package_extract_dir("system", "/system");
run_program("/sbin/sleep", "2");

Now obviously if i format /data i loose every thing on my sdcard however when this script runs it hangs on boot screen (colourful X) but if i # out the lines with /data/some_folder it boots fine just wondered why this would be and is there a way to get around this issue now i understand i could # out 1 line 1 by 1 but this would take a lot of time and when i find out which line(s) it would not help me understand why this is doing what it is plus other devs wouldn't be aware of this issue

Hoping someone could shed some light Thanks in advance

edit: when i adb shell in recover it shows /system as empty however /data is full

format("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/UDA"); so this removes everything in /data which includes our sd card partition but if you use

format("ext4", "EMMC", "data"); it seems like it leaves /data/media untouched (sdcard) but seems to still cuse the boot loop this is very strange imo

if i reflash the rom without seletcing full wip ie format("ext4", "EMMC", "data"); it works fine no boot loop