sd partitioning code, initial relocation to sd-ext work