That's because you should become root by using "root" (check extras) or R&D (not recommended), not by using sudo or su (which will not properly set the environment vars).
It makes no sense to "repartition" the internal flash (partition limits are hardcoded). It does overwrite the initfs (were drivers/kernel modules are) and the rootfs (rest of the system), but not the config area; I don't know if the config area hosts anything related with usb config.