Help with mounting a ext2 partition on 2.2.2

Jota

Member
May 25, 2011
106
9
Hello!

With Android 2.1 I have 2 partitions on the 8Gb internal sdcard:

1) fat32
2) ext2

I don't use Apps2sd, just have the ext2 partition to do some backups.
I mount with:

mount -t ext2 /dev/block/mmcblk0p2 /data/sd-ext

and it works ok.

Now, the problem:
Installed Froyo (2.2.2 Sweden) and I can not anymore mount the ext2 partition:

#
# mount -t ext2 /dev/block/mmcblk0p2 /data/sd-ext
mount: Invalid argument
#

I'm trying to find a solution, but nothing seems to work...
any help??
Thanks.
 

tri_zet

Senior Member
Developer
Mar 1, 2011
197
94
Hello!

With Android 2.1 I have 2 partitions on the 8Gb internal sdcard:

1) fat32
2) ext2

I don't use Apps2sd, just have the ext2 partition to do some backups.
I mount with:

mount -t ext2 /dev/block/mmcblk0p2 /data/sd-ext

and it works ok.

Now, the problem:
Installed Froyo (2.2.2 Sweden) and I can not anymore mount the ext2 partition:

#
# mount -t ext2 /dev/block/mmcblk0p2 /data/sd-ext
mount: Invalid argument
#

I'm trying to find a solution, but nothing seems to work...
any help??
Thanks.

what about : mount -t ext2 /dev/block/vold/179:2 /data/sd-ext
 

Jota

Member
May 25, 2011
106
9
what about : mount -t ext2 /dev/block/vold/179:2 /data/sd-ext

Yes, I've tried that... same result!
In 2.1 both commands work...

I think 2.2 handles the sdcard in diferent way... could it be?
Ok, next try is to install recovery, and hope I can mount at boot...??
Now I must find fastboot for Linux... :)
(thanks for the tip!)
 

tri_zet

Senior Member
Developer
Mar 1, 2011
197
94
mount at boot time for sure it will work, i use it for data2ext with modified init.rc
 

Jota

Member
May 25, 2011
106
9
mount at boot time for sure it will work, i use it for data2ext with modified init.rc


Well...
I'm new to Android, so I'm learning...
I thought that the recovery will give me a shell where I could do the mount, but no sir... and, even adb does not work in this recovery... so, still can not get to my ext2 partition!

I also managed to edit init.rc and do the mount in there, but after reboot what I get is the original init.rc, so my changes does not persist and are lost.
Any ideas??
 

tri_zet

Senior Member
Developer
Mar 1, 2011
197
94
Well...
I'm new to Android, so I'm learning...
I thought that the recovery will give me a shell where I could do the mount, but no sir... and, even adb does not work in this recovery... so, still can not get to my ext2 partition!

I also managed to edit init.rc and do the mount in there, but after reboot what I get is the original init.rc, so my changes does not persist and are lost.
Any ideas??

you have to unpack boot.img
edit your neccessary init.rc
rapacked your boot.img
then flash your boot.img to boot partition using fastboot.

good example and all necessary tools can be found here : Boot an Android device from SD card
 

Jota

Member
May 25, 2011
106
9
Ahh, the problem is solved, but not in the way I would like to...!!
As I mentioned in another thread, I had flashed your most recent Rom, and as you know, your rom has taken over my partition, wipe it and use it for the "data".

So I lost all my precious files and work... :mad:
I hate you and your Rom Tri_zet!

No, really, just kidding, there were just backups and some music files...
nothing important was lost, so no problem. :)
And, now I have a ext4 partition, mounted as "data" to play with...
(as long I don't do a "factory reset", right?)

One question... why the mount command shows "data" mounted twice?:

# mount
...
/dev/block/mtdblock4 /data yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mmcblk0p2 /data ext4 rw,nosuid,nodev,relatime,barrier=1,data=ordered 0 0

 

tri_zet

Senior Member
Developer
Mar 1, 2011
197
94
You can do factory reset with no problem now. Factory reset will erase mtd@data and format 2nd partition as ext4.

Don't ask me why, huawei made it. I pull it from slim boot.img :)

On first boot (after factory reset) it will not mount mmcblk0p2 yet only mtd@data. so mtd@data have all minimum files to run the tablet.
on second boot it mount both, so all the change afterward will keep at mmcblk0p2, while the "minimum files" stay at mtd@data.

I guess this is for preventive, in case it the 2nd partition damage (formatted/deleted/corrupted) it will not got boot loop, but run with 160 MB internal storage only with minimum files just like after factory reset.

I think you need mmcblk0p3 now, or perhaps mmcblk0p30 to make sure nothing will touch it lol.

Sent from my IDEOS S7 Slim using Tapatalk
 
Last edited:
Top