Using multi partition external SD card [solved] - HTC Flyer, EVO View 4G

I am sharing this in this forum. Hope this is the right place.
I have been trying to re-partition my external SD card using one vfat partition and a bigger ext4 partition. Then my intention was to mount ext4 through an init.d script.
Partitioning (with gparted under Linux) was of course not a problem.
However, the system does not recognize the multi partition external SD card.
I am using Leedroid's HC (but I don't think that matter so much).
After system has fully started it says "SD card is damaged", do you want to format it.
So yes ... I formatted it. Then mounted it again under Ubuntu.
Back into gparted ... and ... now there is no partition table any more !
The android formatting has just written a vfat file system over the whole device without using a partition table.
So ... no luck.
Then I looked at the volume manager. In the file /etc/vold.fstab we can see:
dev_mount sdcard /mnt/sdcard 33 /devices/platform/msm_sdcc.2/mmc_host/mmc0
dev_mount sdcard2 /mnt/sdcard/ext_sd auto /devices/platform/msm_sdcc.4/mmc_host/mmc2
dev_mount usb /mnt/sdcard/usb auto /devices/platform/msm_hsusb_host.0
So, I re-formatted the SD card with a vfat and ext4 partition and changed the vold.fstab to:
dev_mount sdcard /mnt/sdcard 33 /devices/platform/msm_sdcc.2/mmc_host/mmc0
dev_mount sdcard2 /mnt/sdcard/ext_sd 1 /devices/platform/msm_sdcc.4/mmc_host/mmc2
dev_mount usb /mnt/sdcard/usb auto /devices/platform/msm_hsusb_host.0
(so I changed "auto" into "1" in the second line)
Well after booting ... no good! System still thinks SD card is damaged and proposed to re-format it.
I am guessing there must be a way tricking the vold daemon into using the first partition (vfat) as file system instead of the whole device block ... but I have not found it yet.
Maybe I am missing something very simple here so any help would be appreciated.

Normally questions go in the Q&A section.
Never really checked into this but I don't think the Android framework has capability to handle more than one partition per device even if you supply the mount points.
On the color nook it works as you described because the primary boot device was the SD card. You might try searching through the Nook forum

DigitalMD said:
Normally questions go in the Q&A section.
Never really checked into this but I don't think the Android framework has capability to handle more than one partition per device even if you supply the mount points.
On the color nook it works as you described because the primary boot device was the SD card. You might try searching through the Nook forum
Click to expand...
Click to collapse
Well, I have multiple partitions on external SD card on my HTC Desire phone. They appear under /dev/block/mmcblkXp1 and /dev/block/mmcblkXp2. However, on the flyer I only see /dev/block/mmcblkYp1 (which is the first partition of the internal memory mounted on /sdcard). There is a different mechanism for the mount of /sdcard2 (external SD card). No entries in /dev/block are created for it.
I will have a look at Nook forum tonight. Thanks for response.

foobar66 said:
Well, I have multiple partitions on external SD card on my HTC Desire phone. They appear under /dev/block/mmcblkXp1 and /dev/block/mmcblkXp2. However, on the flyer I only see /dev/block/mmcblkYp1 (which is the first partition of the internal memory mounted on /sdcard). There is a different mechanism for the mount of /sdcard2 (external SD card). No entries in /dev/block are created for it.
I will have a look at Nook forum tonight. Thanks for response.
Click to expand...
Click to collapse
Android system needs first partition of sdcard to be vfat
Sent from my LT15i using XDA App

DooMLoRD said:
Android system needs first partition of sdcard to be vfat
Sent from my LT15i using XDA App
Click to expand...
Click to collapse
Well, OK ... but it does not work if there is a partition table !
So 2 partitions (1 VFAT and 1 ext4 does not work).
It only works when the whole block device just contains a VFAT file system (without partition table).

OK, I figured it out (kinda).
Apparently, when I create 2 partitions (1 VFAT and 1 ext4) via gparted under Ubuntu then the Flyer won't properly recognize the partition table (that is my guess). Don't know why ...
I created 2 partitions via CWM ... and now it is working fine.
So I have:
/dev/block/mmcblk1p1 -> VFAT
/dev/block/mmcblk1p2 -> EXT4

hi, just found this is SOLVE (congrats) and wondered whether this allows SD > supported 256GB on (G900f) S5.
Can you create many partitions on the SD (maybe up to 256) on a 1 TB microSD?
thanks

Related

[Q] Use a multi-partition sdcard ext4

Hi everyone,
I have project in mind but all i did to realize it didn't work.
my project is: i want to use the sdcard with 1st primary partition for saving Roms and updates to work with cwm (fat or fat32), 2nd prim. part. for my data aka "/mnt/sdcard" (ext4), 3rd prim.part. for apps using Link2SD (ext4) and last, optionally, 4th prim. part as SWAP (swap).
this is because i want to use ext4 for /mnt/sdcard but cwm can not read ext4 to backup/restore roms. i tried something with vold.fstab, and init.local.rc, init.rc, /etc/init.d/ but i couldn't achieved the goal.
can anyone help me achieve this?
thx
i'm using CM7 (CyanogenMod-7.1.0-MADTEAM Gingerbread 2.3.7) SD 8GB
512 MB (FAT/FAT32)
6 GB (EXT4)
1GB (EXT4)
128MB (SWAP)
i found a manner to make the first primary partition visible only to cwm: i made it hidden fat.
so android looking for the first usable partition of my sd to mount as sdcard. also by a script i can make swapable the last partition, but this is an option as it is not always wise to have a swap partition.
but some problems remain:
-android forces mount in fat32 for sdcard
-link2sd forces to mount the 2nd partition for its purposes, and it cant because the partition is already mounted as sdcard in fat32. link2sd has to mount the third partition for linked apps.

[Q+A] Mounting ext3 SD card

On my Archos 101IT I formatted the (removable) SD card as ext3. This was required for TitaniumBackup. When UrukDroid is booted, it mounts the file system as:
/dev/block/vold/179:17 on /mnt/storage/sdcard type ext3 (rw,nosuid,nodev,noexec,noatime,nodiratime,fmode=0 666,dmode=0777,errors=continue,data=ordered)
I do not want the fmode/dmode since these make it impossible to protect files on the storage (again, as required by TitaniumBackup).
Where can I change what to have this file system mounted with the right options on reboot?
ANSWER:
Urukdroid has a special script, /system/bin/mount_sdcard.sh, that mounts the SD card upon boot. This script understands (V)FAT and EXT4. Anything else is left to the vold automounter. Archos modded vold so it could do a bit more than stock A 2.1 vold, e.g., mount EXT3 file systems.
I upgraded the file system on the SD card to EXT4, and now mount_sdcard.sh mounts the SD card upon boot with the correct mount options.
Thanks to $aur0n for helping me solve this.
Upgrading an EXT2 or EXT3 file system to EXT4 is easy, see https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Converting_an_ext3_filesystem_to_ext4 .

[Q] Mounting a third partition for use with Link2SD

So ran out of storage in /data partition, decided to create 2 partitions in my external SD and i created it using Gparted, one is ext4 and the other is fat32, now the phone refuses to mount the ext4 partition from Link2SD.
Looking at the vold.fstab file and sysfs paths(/devices/platform/mtk-msdc.0) , it seems that our phone can mount only 2 (+1 otg) partitions ? (or is it just 2 sd cards ?)
is it even possible to mount the second partiton ?? (No /devices/platform/msm_sdcc )
I do know of the EMMC method, i don't like it ;p
A block for the second partiton is present in /dev/block,(mmcblk1p2) gonna mount and see what happens
gowtham121 said:
So ran out of storage in /data partition, decided to create 2 partitions in my external SD and i created it using Gparted, one is ext4 and the other is fat32, now the phone refuses to mount the ext4 partition from Link2SD.
Looking at the vold.fstab file and sysfs paths(/devices/platform/mtk-msdc.0) , it seems that our phone can mount only 2 (+1 otg) partitions ? (or is it just 2 sd cards ?)
is it even possible to mount the second partiton ?? (No /devices/platform/msm_sdcc )
I do know of the EMMC method, i don't like it ;p
A block for the second partiton is present in /dev/block,(mmcblk1p2) gonna mount and see what happens
Click to expand...
Click to collapse
hi, gowtham121
ROOT your phone first,
create 2 partitions as fat32 on sdcard
its work on my chd:fingers-crossed:

[Q] Problem creating 2nd partition on Spreadtrunm phone's SD card.

I followed this guide to create a second partition (in order to save internal space). But the problem is, Link2Sd won't work on it saying /data/sdext2 mount is not found (whilst /data/sdext2 exists). I also selected and tried the following : Ext2 and ext4. At this moment, I'm not sure if Fat32 or ext3 will work anymore.

help format internal sdcard (24gb) to ext4?

I recently tried decompressing a file that was just under 4gb to the internal sdcard. the decompression stopped at 52% (about 2gb) Think it's a fat32 file sytem with 2gb file limit. . booting to recovery and using ubuntu I can only connect via mtp from the mounts menu. Gparted cannot see the device. I'm thinking gparted does not view mtp as a local block device. any ideas how to format the 24gb internal sdcard to ext4 or reasons why I shouldn't ? thanks.
rp201 said:
I recently tried decompressing a file that was just under 4gb to the internal sdcard. the decompression stopped at 52% (about 2gb) Think it's a fat32 file sytem with 2gb file limit. . booting to recovery and using ubuntu I can only connect via mtp from the mounts menu. Gparted cannot see the device. I'm thinking gparted does not view mtp as a local block device. any ideas how to format the 24gb internal sdcard to ext4 or reasons why I shouldn't ? thanks.
Click to expand...
Click to collapse
MTP is a real PITA, imho. I'm pretty sure that GParted would not recognize an MTP or PTP connected device as local block storage; the device handles its own disk management with these protocols.
How were you decompressing the file to the device? It might be better to decompress on your Ubuntu box, then transfer the file through MTP, ADB push, or cloud storage service.
Do you have enough storage available on the destination device to accommodate the decompressed file size? Try this in a terminal on the device:, look at the line for either /sdcard in TWRP or /data in the ROM, respectively.
Code:
df
Have you tried going into either an ADB shell or terminal session on the device to check the file system type?
If you are in TWRP, what is the output of the following in the device terminal?:
Code:
mount | grep /sdcard
Can you still get into a ROM? If you are there, what is the output of the following in an terminal or ADB shell?:
Code:
mount | grep /data
Thanks for responding. I can't say I diddn't think of decompressing on the pc and then transfering but I just felt like moving down the path of converting to ext2 for it's resiliency . as far as space available I had at least 12gb. Im also running multi-rom and I also kinda wanted to see how that was going to work out. The multirom directory contents are not visible from the internal rom they can only be seen from recovery and copied there.
rp201 said:
Thanks for responding. I can't say I diddn't think of decompressing on the pc and then transfering but I just felt like moving down the path of converting to ext2 for it's resiliency . as far as space available I had at least 12gb. Im also running multi-rom and I also kinda wanted to see how that was going to work out. The multirom directory contents are not visible from the internal rom they can only be seen from recovery and copied there.
Click to expand...
Click to collapse
Interesting... EXT2? The only application I have seen that for recently is a dual boot scenario where Win7 and Linux share a common data partition and you want to use something better than FAT or NTFS. EXT4 is journalled and is more the standard of late, for most partitions under Linux.
Not sure Android even supports EXT2 and even if it does, how would you go about formatting an internal sdcard partition to it. I have used Gparted to redo external cards in a card reader, but how would you do the internal partition, especially since it seems to be mounted at /data/media and /data is ext4?
epidenimus said:
Interesting... EXT2? The only application I have seen that for recently is a dual boot scenario where Win7 and Linux share a common data partition and you want to use something better than FAT or NTFS. EXT4 is journalled and is more the standard of late, for most partitions under Linux.
Not sure Android even supports EXT2 and even if it does, how would you go about formatting an internal sdcard partition to it. I have used Gparted to redo external cards in a card reader, but how would you do the internal partition, especially since it seems to be mounted at /data/media and /data is ext4?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2126363
netookska05 said:
http://forum.xda-developers.com/showthread.php?t=2126363
Click to expand...
Click to collapse
Right.... I am familiar with that...
Internal /sdcard/ is not a physical MicroSD card, nor is it mountable as USB storage media, to my knowledge, just as an MTP/PTP or ADB device through the ROM or TWRP, respectively. That is why I am asking why and how you might go about formatting it to ext2. Not that it's impossible, just don't see why you'd want to do that...
reason for formatting to ext4... (I mistakenly wrote ext2 instead of ext4 on my previous post)
1. to possibly solve file size limitations of 2gb for fat32,
2. ext4 (yes ext4 not ext2) is a journald file system
3. it would give my phone wings as if I poured redbull on it. (not really... I just needed a 3rd reason)
My phone is 32gb. I believe it is 8gb emmc and 24gb sdcard_internal. (I also have an Sdcard_external which is the removable micro sdcard but I'm not asking about that) Doing this ext4 formatting May be more of a hassle with permissions issues when running multiple roms anyways. if it can't be done then no biggie. I was wondering if twrp or philz had the capability
rp201 said:
reason for formatting to ext4... (I mistakenly wrote ext2 instead of ext4 on my previous post)
My phone is 32gb. I believe it is 8gb emmc and 24gb sdcard_internal. (I also have an Sdcard_external which is the removable micro sdcard but I'm not asking about that) Doing this ext4 formatting May be more of a hassle with permissions issues when running multiple roms anyways. if it can't be done then no biggie. I was wondering if twrp or philz had the capability
Click to expand...
Click to collapse
ext4 makes far more sense. Not that there isn't a part of me that now wants to figure out how to make it ext2, just for the exercise....
You still didn't answer my original troubleshooting questions though... What happens when you try the df and mount commands I referenced? This may be a moot point after that.
Here u go
Alright, this is telling me that the /data partition, where the internal SD card is mounted, is already ext4. It has 6 GB free.
I am unable to see the filesystem on the external SD card with this output, but it has just 3.5 GB free.
So again, I think you would need to decompress the file on the Ubuntu box, determine its uncompressed file size, then transfer. Depending on the compression ratio, you may be over the 6 GB. Either way, you are cutting very close and not allowing much room for new software or local files.
Can you guys speak in English please
Can I or can I not claim all of the 30 GB of storage
Thnx

Categories

Resources