[Optimus One, P500 Android Development] bigsupersquid:
I had that problem on the optimus v.

a bit cramped in /system too, really. That's only 157 MB on the smaller firmware for optimus s. 167 MB on the v.

With kitkat just changing the fstab.thunderc was enough to make it boot with /system and /data mounted to sd-ext partitions... which left way more space than I'll ever be able to use for either. Decent class 4 or better sd card benchmarks consistently faster than internal /system and /data as well.

here, cross-posting on multiple old devices.

A basic how-to if you're experimentally minded like me.

I've felt for a while that the various link2 methods are limited. You have to script them in init.d and now selinux doesn't seem to like them very much either on my device.

I'm going to share my method in case anyone's interested. Been using it, and sharing builds using it publicly, since January.

[MENTION=5569184]skinbark[/MENTION] named it OS2SD (operating system to SD)

I have a tiny little armv6 Optimus V with about 160MB /system and not much more /data.

For this to work, your sdcard has to be partitioned a little differently than standard.

You need two additional ext4 partitions after the VFAT and sd-ext partitions. Those are for, respectively, /system and /data.

I make them 512MB and 1024-2048MB.

You can do that in gparted or some similar tool. [MENTION=3127756]TechVendetta[/MENTION] modifed twrp for our device to simplify that. I forked and tweaked at his work too.

For kitkat, I changed the fstab.device (in my case fstab.thunderc) to mount EMMC instead of MTD.

Here, see:

Before:

# http://source.android.com/devices/tech/storage/index.html
#<src>	<mnt_point>	<type>	<mnt_flags and options>	<fs_mgr_flags>

cache	/cache	yaffs2	nosuid,nodev	recoveryonly
userdata	/data	yaffs2	nosuid,nodev	recoveryonly
system	/system	yaffs2	defaults	recoveryonly
boot	/boot	mtd	defaults	length=7340032
misc	/misc	mtd	defaults	length=524288
recovery	/recovery	mtd	defaults	length=7340032
/dev/block/mmcblk0p2	/sd-ext	ext4	defaults	recoveryonly
/devices/platform/msm_sdcc.1/mmc_host/mmc0	auto vfat	defaults	voldmanaged=sdcard0:auto,noemulatedsd

/dev/block/zram0 none swap defaults zramsize=67108864,swapprio=1

#/dev/block/zram0 none swap defaults zramsize=<size in bytes>,swapprio=<swap partition priority>

#mtd0: 00700000 00020000 "boot"
#mtd1: 07c20000 00020000 "cache"
#mtd2: 00700000 00020000 "recovery"
#mtd3: 00140000 00020000 "splash"
#mtd4: 00700000 00020000 "FOTA_ST"
#mtd5: 09e80000 00020000 "system"
#mtd6: 0a4e0000 00020000 "userdata"
#mtd7: 00080000 00020000 "misc"
#mtd8: 00180000 00020000 "persist"

#002c0000 00020000 "lgdrm"
#00180000 00020000 "FOTABIN"

After:

# http://source.android.com/devices/tech/storage/index.html
#<src>	<mnt_point>	<type>	<mnt_flags and options>	<fs_mgr_flags>

/dev/block/mtdblock1 /cache yaffs2	nosuid,nodev	recoveryonly
## flags from hammerhead and more
/dev/block/mmcblk0p4 /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic length=1056858112,check,wait
/dev/block/mmcblk0p3 /system ext4 ro,barrier=1	check,wait
boot	/boot	mtd	defaults	length=7340032
misc	/misc	mtd	defaults	length=524288
recovery	/recovery	mtd	defaults	length=7340032

#/dev/block/mmcblk0p2	/sd-ext	ext4	defaults	recoveryonly

/devices/platform/msm_sdcc.1/mmc_host/mmc0	auto	vfat	defaults	voldmanaged=sdcard0:auto,noemulatedsd,nonremovable
/dev/block/zram0 none swap defaults zramsize=67108864,swapprio=1

#/dev/block/zram0 none swap defaults zramsize=<size in bytes>,swapprio=<swap partition priority>

#mtd0: 00700000 00020000 "boot"
#mtd1: 07c20000 00020000 "cache"
#mtd2: 00700000 00020000 "recovery"
#mtd3: 00140000 00020000 "splash"
#mtd4: 00700000 00020000 "FOTA_ST"
#mtd5: 09e80000 00020000 "system"
#mtd6: 0a4e0000 00020000 "userdata"
#mtd7: 00080000 00020000 "misc"
#mtd8: 00180000 00020000 "persist"

#002c0000 00020000 "lgdrm"
#00180000 00020000 "FOTABIN"

same for recovery.fstab if you want your cwm recovery to be able to mount and wipe the ext system and data from the menus. twrp.fstab for twrp.

comment out the mount lines for /data and /system from your init.*.rc that do that

replace them with the new ones

before:

# mount yaffs2 mtd@system /system
# mount yaffs2 mtd@system /system ro remount
# mount yaffs2 mtd@userdata /data nosuid nodev
mount yaffs2 mtd@cache /cache nosuid nodev

after:

mount_all /fstab.thunderc
# mount yaffs2 mtd@system /system
# mount yaffs2 mtd@system /system ro remount
# mount yaffs2 mtd@userdata /data nosuid nodev
mount yaffs2 mtd@cache /cache nosuid nodev

You can flash it in an unmodified recovery.

edit updater-script in ROM zip.

Replace the format /system line

before:

format("yaffs2", "MTD", "system", "0", "/system");

after:

mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
run_program("/sbin/busybox", "sh", "-c", "busybox rm -rf /system/*.*;");
unmount("/system");

and replace all mount MTD lines with EMMC lines like so:

before:

mount("yaffs2", "MTD", "system", "/system");

after:

mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");

You can use flashable zip with busybox script to rm -rf files from the two ext partitions as a wipe tool.

You can also use flashable zip to change your boot.img ramdisk if you can't build the ROM. I have a template for my device here. You have to change the edit-ramdisk.sh and contents of the /kernel/ramdisk folder to match your device.

Feedbacks?

If it works out on a few devices, I may post a generic Android tut for older devices. Us folks with armv6 stuff and old MTD partition devices, which can still be tweaked into running kitkat by developers, still deserve to be able to use it even though it doesn't fit all happy-happy in the legacy device innards.