[HTC Pico (Explorer)] dhrumangajjar:
SD-System SD-Data DIY 4 newbies

If you want to mount SD-SYSTEM, SD-DATA as well as SD-CACHE Follow the procedure:

You will need 3 SD-card partitions for this

1.

Fat32

> 2.

Ext3/4 (For System)

> 3.

Ext3/4 (For Data)

What we are going do in this method is we are just changing the mounting points from the kernel and will mount the 2nd sdcard partition (i.e. Ext3/4) as system and 3rd sdcard partition as Data partition

So first start with the change in the updater script,

Why we need to make changes in updater script?

Because while flashing the recovery mounts the partitions maintioned in the updater-script, so by default the updater-script will mount the internal system partition which is in NAND. So first we will have to mount the 2nd Sd-card partition as system

For this:

1. Open up the zip

2. Navigate to META_INF/com/google/android inside that zip. you will find mostly 2 files i.e. 1. updater-script 2. update-binary

3. Now Open the updater-script in your fav text editor

4. Find the line

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

followed by the line

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

5. Replace that with

run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/system");

Now its time for some kernel level changes in ramdisk to change the mount points

For this we will have to unpack boot.img and extract its ramdisk

after extracting ramdisk, we will have to change the mount points inside

init.pico.rc

for KK ROMs and for older ROMs the mount points are in

init.rc

So lets change the mount points

1. Find this line in init.pico.rc

mount yaffs2 mtd@system /system
mount yaffs2 mtd@system /system ro remount

2. Replace them with

# Mount SD-SYSTEM
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
mount ext4 /dev/block/mmcblk0p2 /system noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue
# Mount SD-SYSTEM RO
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
mount ext4 /dev/block/mmcblk0p2 /system noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue ro remount

this piece of code will mount 2nd sd partition as system partition and will remount it as read-only afterwards.

3. Find this line in the file

mount yaffs2 mtd@userdata /data nosuid nodev

4. Replace it with

# Mount SD-DATA
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
mount ext4 /dev/block/mmcblk0p3 /data nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue

this piece of code will mount the 3rd partition as data partition

5. If you have 4th SD-EXT partition and you want to mount that as cache partition, than continue the process or it will mount the NAND cache partition as cache partition.

find this line

mount yaffs2 mtd@cache /cache nosuid nodev

6. Replace that with

# Mount SD-CACHE
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
mount ext4 /dev/block/mmcblk0p4 /cache nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue

At last, if you re on KK ROM, than you have to change the

fstab.pico

as well

The reason behind editing the fstab.pico is Explained Here by [MENTION=4869275]thewisenerd[/MENTION]

chage the fstab.pico's lines from this:

/dev/block/mtdblock3 /system yaffs2 ro,barrier=1 wait
/dev/block/mtdblock4 /cache yaffs2 nosuid,nodev,barrier=1 wait,check
/dev/block/mtdblock5 /data yaffs2 nosuid,nodev,noauto_da_alloc,barrier=1 wait,check

to this:

/dev/block/mmcblk0p2 /system ext4 ro,barrier=1 wait
/dev/block/mmcblk0p4 /cache ext4 nosuid,nodev,barrier=1 wait,check
/dev/block/mmcblk0p3 /data ext4 nosuid,nodev,noauto_da_alloc,barrier=1 wait,check

The reason behind this and all other things are well explained by [MENTION=4869275]thewisenerd[/MENTION] there.

Thats it,

Now repack Ramdisk and Repack the boot.img with new ramdisk and replace the existing boot.img in zip with this new one

Flash the zip and you are good to go....

Note:

Whenever you flash a new zip after this, whether it is Gaaps than everytime you'll have to change the updater-script as said.

Read updater-script and if it mounts data as well than you'll have to change that line too with

run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p3", "/data");