[Q] Format SD Card Ext2/3 - Defy General

Hi all
First of all, I am not talking about an A2SD partition or similar. What I would like to do is use an SD card formatted using Ext2/3 as normal "user storage" on my Defy.
Looking into it, people have tried and failed at this before. I believe there may be something inside the android code which expects FAT32. If so, I think this is a bad design. It can mount and use ext2/3, so why could I not use it for my data?
I am just backing up my SD card at the moment so I can experiment. I see no real reason it should not work (unless, as I said, it is hard-coded) so long as the permissions are dealt with correctly. Before I start, though, I was wondering if
anyone has managed to get this to work, and
does anyone have any thoughts?
Thanks all

drmouse81 I assume the ext2/3 SD CARD partition won't be loaded automatically since the partition type is set to VFAT (/dev/block/mmcblk0p1) in /etc/fstab. Therefore you'll have to format your SDCARD first and then you'll have to update the entry in your fstab file. In theory it should work, but I haven't tested.

Related

Android on Kaiser: The difference between SD/NAND/EXT2?

In short:
Is there a thread somewhere stating the pro's and con's of running Android from different types of "media" (SD, NAND, EXT2)?
If there is, please provide a link, I can't seem to find anything that isn't an unanswered question or small comments.
If there isn't, let this be a starting point for those looking for the answer to this question.
Longer:
I've seen this question pop up once and again but it might be that the topic is totally exhausted and people have stopped commenting on it. I can't seem to find an answer though; What are the pro's and con's of using NAND, EXT2, FAT32 or any combination of it?
I see a couple of installation alternatives and some I have been able to conclude myself but others not.
* Running from SD-card using HaRET
This option is the slowest in terms of Android performance. It has the added value of easily getting back to Windows Mobile by rebooting the phone, gaining easy access to the SD card and manipulation options.
* Running the system AND data on NAND
This option has in my view the fastest Android experience. Access to files on the SD card is a bit more cumbersome (there is the SD card split widget APK available but I have yet to see it working) and access to files for manipulation I can't comment on (haven't gotten to that yet).
* Running the system from NAND and data on EXT2
The performance seems almost as fast as the system+data on NAND. I have no idea about the added value of running anything from an EXT2-partition in the SD card but I'm guessing it will be slower. I have no idea if file access for manipulation is easier or not compared to the other options.
* Running the system AND data from EXT2
I have not tried this yet and cannot comment on it. Something tells me it will be slower than NAND because of SD card overhead.
* Running the system from EXT2 and data on NAND
I have not tried this yet and cannot comment on it.
Now, I've missed out on several of the installation options but I'll edit this post as soon as I get to investigating it further.
Any comments/experience/knowledge in this is greatly appreciated, as it can make things clearer as to what options to choose.
Well these are very good question and wanted to start a thread on this matter as well. I also could not find a strait answer anywhere.
I also want to know if there is an advantage using ext2 over fat32.
So, people out there having knowledge about this matter please share it.
Ext2 and Fat32 are both types of filesystem used on various different types of media, including SD card, Hard drives etc.
EXT2 is (one) of the native linux filesystems, and is fully supported in kernel, and is usually faster and more stable in that OS
FAT32 is the 32bit version of the old MSdos filesystem, used up to Windows 98, and still supported by windows machines, but slower and less stable than the native NTFS filesystem used by XP and above.
Nand is actually the type of flash ROM used by our devices, and not a filesystem as such, and running Android in Nand refers to where the information is stored, rather than the filesystem used to store it.
It's equally valid to say that we run WM in Nand also.
I think that in the case of Android EXT2 should be faster and more stable than fat32 since it's designed for Linux, and works better in that OS.
Zenity ik would like to thank you very much as this answers mij questions.
And i think this would many others aswell.
Don't forget - if you format your MicroSD to just EXT2 then you will make it very awkward to transfer files to/from the card on a Microsoft Windows based system.
This may, or may not be a problem for you.
Ultimately, the current ideal situation (IMHO) is to run your OS from NAND, and to store your data (music / movies / documents) on a FAT32 format MicroSD - as this enables you to swap the MicroSD card without turning off the device, and provides best cross-platform usability of the MicroSD for the purposes of transferring data to/from it.
Thank you all!
Thank you all for commenting! I will add your comments to the Android-wiki I'm building as this question could come back repeatedly from newcomers (and old ones who forgot )!
boli99 said:
Don't forget - if you format your MicroSD to just EXT2 then you will make it very awkward to transfer files to/from the card on a Microsoft Windows based system.
This may, or may not be a problem for you.
Ultimately, the current ideal situation (IMHO) is to run your OS from NAND, and to store your data (music / movies / documents) on a FAT32 format MicroSD - as this enables you to swap the MicroSD card without turning off the device, and provides best cross-platform usability of the MicroSD for the purposes of transferring data to/from it.
Click to expand...
Click to collapse
There is a program for allowing the mounting of EXT2 file systems on windows, however they are not signed. This is more problematic in Windows that are 64bit. The program is called 'ext2fsd' and you can get it from source forge. EXT2 is a better file system, and does not have the 4GB file size limit, and does not fragment (although on a SD card, this should not be an issue). EXT2 also has file permissions that Linux understands. Fat32 has no Access control file permissions.
I have just recently got polymod's eclair running with both system and data on ext2 partitions.
my question is...
I am just wondering what the boot order is...
and where(if possible) can it be changed?
system.img in the andboot folder VS system on partition.
I know it can be set in the installer. but lets say I had installed system on ext2 partition. and then later placed a system.img in the andboot folder.
can I swap between the two?
OK...
I figured it out myself,
You can use the installer to select boot options (Not just options to install)
so I have a system and data on partitons. (currently using)
and I also have a second build installed to .img files in the andboot folder. (for failsafe backup)
if I want to swap from one into the other
I enter installer and change the settings for the system and data to
their respective locations and then just QUIT.
I also still have a donut build in the android folder. as well as still running winmo.
quad boot system on my phone...LOL
Now thats a neat use of the installer, I think this find deserves it's own thread in fact, I'm certain others will find it useful
Tanks !
binlabin said:
* Running the system from NAND and data on EXT2
The performance seems almost as fast as the system+data on NAND. I have no idea about the added value of running anything from an EXT2-partition in the SD card but I'm guessing it will be slower. I have no idea if file access for manipulation is easier or not compared to the other options.
Click to expand...
Click to collapse
I've done some tries with this doing the partitioning from within android and then formatting the FAT32 partition from Windows 7 but the FAT32 partition doesn't work very well afterward. Really slow and sometimes crashes the explorer. Propably something to do with my SD-card. May try doing the partitioning and formatting from Linux to see if it works better.
Seems to me the main advantage of this option is to increase the size of available data storage which i suspect can become a limitation sooner or later in a pure NAND install.
EDIT: Now I've done it and gone NAND-System + EXT2-Data... Partitioned the SD-card from Ubuntu with gparted. Resized the FAT32 partition and created 3 primary EXT2 partitions. only the second (partition 3) should be used though with the setup I am using. It's charging right now so I haven't tried it out much yet but I will later on. However I noticed that I now have 171Mb free phone storage instead of 30-something that I had before (same apps installed).
EDIT2: Ran gparted again and shrinked the unused partition (partition 2) and expanded the data partition (partition 3) so I now have 369Mb free "Internal phone storage". Haven't noticed any speed differences between this and when I had data on NAND.
nand
By then one question:
If im install android in the NAND is more fast ready? But this process erase WM6?
Because now android work good in my HTC TYNT II but the camera and bluetooth not work and have one or two performance problems and for this dont like delete WM6 of my phone, and for this im use Android from my SD.
But look the NAND option because have a problems with the time live of my battery only lasts 5hours with android and SD.
Thanks for your help and cooperation
excellent thread which answers some questions that I had. Thanks to everyone who contributed. The only question remaining though and I have posted this elsewhere without getting an answer:
I partitioned a 2 gb sdcard with ~1.6gb Fat32 and the rest as a single Ext2. I selected system on nand and data on ext2 in the installer. After installation, it does show alot more memory for data as compared to data on nand, BUT I also have a data.img in andboot which is in the Fat32 partition, with a size around 250mb. The question is, is the data in that file or on ext2? If I backup data from installer, it creates a databackup.img in andboot with the same size as data.img. Seems to me the ext2 partition is just taking up space and not being used. Can anyone more knowledgeable shed some light on this? Thanks.
Not quite sure what is going on there, seems very counter-intuitive, I would have assumed that system on Nand, data on EXT2 would have installed the data partition to EXT2 on SD. This would seem not to be the case in this instance.
There are a few experiments you could try, if you are brave enough, since you may cause problems by trying any of these suggestions, which could mean a reinstall, I leave it to your judgement how to proceed
Ok firstly I assume you have a card reader, since you managed to partition and format the SD card in the first place. Remove the SD card, insert in card reader, delete the andboot folder, or the contents of the folder, ( may be wise to have a spare SD with either a winmo or android install handy at this point, just in case things go horribly wrong ).
Now with the cleaned SD, put it in the phone and boot, it should boot fine, IF the data is truly on the EXT2 partition.
That at least will answer one question, namely, where the heck is my data?
If this works fine, then I'd just put it down to some inner weirdness of android on non-native devices, if it fails then I'm wondering if your EXT2 partition may have problems, forcing the phone to dump it on the first available good partition, namely the FAT32 one.
Oh and if it does fail, you will have to reinstall, since your data will be toast.
Finally, good luck, I await with interest
As I recall, the install has the FAT32/Ext2 options incorrectly swapped. It has been this way for a while.
zenity said:
Not quite sure what is going on there, seems very counter-intuitive, I would have assumed that system on Nand, data on EXT2 would have installed the data partition to EXT2 on SD. This would seem not to be the case in this instance.
There are a few experiments you could try, if you are brave enough, since you may cause problems by trying any of these suggestions, which could mean a reinstall, I leave it to your judgement how to proceed
Ok firstly I assume you have a card reader, since you managed to partition and format the SD card in the first place. Remove the SD card, insert in card reader, delete the andboot folder, or the contents of the folder, ( may be wise to have a spare SD with either a winmo or android install handy at this point, just in case things go horribly wrong ).
Now with the cleaned SD, put it in the phone and boot, it should boot fine, IF the data is truly on the EXT2 partition.
That at least will answer one question, namely, where the heck is my data?
If this works fine, then I'd just put it down to some inner weirdness of android on non-native devices, if it fails then I'm wondering if your EXT2 partition may have problems, forcing the phone to dump it on the first available good partition, namely the FAT32 one.
Oh and if it does fail, you will have to reinstall, since your data will be toast.
Finally, good luck, I await with interest
Click to expand...
Click to collapse
Great idea, I'll try this on the weekend. I wont delete data though, I'll just rename andboot and backup data for good measure, because I want to be able to go back to the data by renaming it back if it doesn't work. I was also thinking if there is any way to get to the ext2 partition and read it... I'm on xp so I cant do it on my pc, and on the phone, I've looked around in astro n other file managers but cant see anything. But if the case is as golfnz34me points out, then I should just backup the data, and change the option to Fat32 in install and restore data. That should do the trick.
golfnz34me said:
As I recall, the install has the FAT32/Ext2 options incorrectly swapped. It has been this way for a while.
Click to expand...
Click to collapse
Thanks, will check this out. If its true, then great, more speed for my /data! I wonder how I missed this, been going through these forums regularly...
Ok I checked it out, and golfnz34me is correct it seems.
But now I found a new problem. I backed up data, and in the installer, set the data to SDCard, and tried to restore data. It gives various errors like
Code:
cannot determine filesystem size
failed
failed to format
...some other lines...
losetup: /dev/block/loop2: no such device or address
I created the partition with Paragon partition manager, and after getting this error I rechecked in PPM. I reformated the partition, but still get the error. In PPM the partition drive letter isnt assigned. Or, the partition isnt the active partition. Can one of those be the problem? The volume name is Ext2. Im not very experienced in partitioning etc, apart from normal ntfs partition for new hds in windows, so I didnt play with any options. I dont have a linux system either. Any got any ideas? Any help would be appreciated alot!
Not sure about using partition managers other than gparted, afaik most people are using the Gparted live cd if they don't have a linux install handy.
The errors all point to some sort of problem with the EXT2 partition, or it's formatting.
Also EXT2 partitions do not have drive letters, nor do they have to be active partitions.
Apps and data on SD card.
I cant seem to figure out how to make all the apps and other stuff install to the SD card. Do I have to partition the card into two partitions? or is there a way to install the system to Nand and make all the apps and data go to the SD card? Ive tried setting it to System on nand and data on SD partition but it says no partitions to install to or something.

[Q] Format /sdcard and /emmc as ext3?

Has anyone successfully reformatted either /sdcard or /sdcard/external_sd/ /emmc as ext3? I'm not talking about an Apps2SD partition, I'm talking about reformatting the whole volume as one partition, transparent to apps. I do not use Windows so I do not need interoperability, I am fine with ext filesystems.
My goal is to be able to use symlinks (not to mention a more robust filesystem) to redirect certain hard-coded items to store on a different storage volume than it defaults to, but symlinks are not permitted on vfat (FAT32) filesystems.
Thanks!
Anything that I look an answer for, is just not answered. :-(
I am looking for the same information. Wonder why the native ext file systems are not allowed, given that its a Linux kernel running.
You could format it to ext3 and see how it works. Worst case scenario is your phone will tell that sdcard to fu*k off. Given that our phones can and do read the ext format I'm sure you can do it. I'm just not sure how well it will work as far as mounting and such.
On top of that, Windows can read ext formats. You just need a program to do it. I use it all the time.
Thanks for reviving this thread. Surely there must be someone out there who has tried this, and I was hoping to hear from them before I gave it a go, but looks like I'll just have to give it a shot myself.
When I find the time to backup & wipe my sdcard to try and reformat & mount it, I'll report back here.
With my Galaxy Note N7000 I can format a USB Stick to EXT3, and the phone uses it perfectly well as USB Storage...
(rooted, w/w SpeedMod kernel)

Link2SD & Partitioning Help

Hey everyone. I'm going nuts trying to figure out how to use Link2SD. I partitioned my 32G SD card using Mini Partition Tool. I made a 1 gig partition. I've tried FAT32 and EXT2. After partitioning, i rebooted and tried Link2SD. I keep getting the error "Mount script cannot be created. [1] Segmentation fault mount ..."
Is there any solution for the xperia play? I manually moved my apps but still ran out of space keeping system tools like Titanium Backup on the internal. Maybe I should make them System Apps?
I use the following on mine setup:
64gb Card (Fat32 - Primary)
5GB for EXT4 partition (Make sure when you partition it to set it as primary.)
300mb Swap Partition
I had an issue with Link2SD too ad it was because I was not setting the EXT partition as primary, oncei formatted it again as primary Link2SD had not issue with it. Try that.
ozzmanj1 said:
I use the following on mine setup:
64gb Card (Fat32 - Primary)
5GB for EXT4 partition (Make sure when you partition it to set it as primary.)
300mb Swap Partition
I had an issue with Link2SD too ad it was because I was not setting the EXT partition as primary, oncei formatted it again as primary Link2SD had not issue with it. Try that.
Click to expand...
Click to collapse
Hey thanks for the reply. Just tried what you said. My FAT32, ext4, and Swap are all Primary and sill no go. I get the same error (segmentation fault mount -t ext4...). When Link2SD opens I've tried selecting all the options for the parition type too and none of them work.
Anything else I can try? Does the order of the partitions make any difference? Right now I am Primary, ext4, Swap.
echardcore said:
Hey thanks for the reply. Just tried what you said. My FAT32, ext4, and Swap are all Primary and sill no go. I get the same error. When Link2SD opens I've tried selecting all the options for the parition type too and none of them work.
Anything else I can try? Does the order of the partitions make any difference? Right now I am Primary, ext4, Swap.
Click to expand...
Click to collapse
Ah.... okay, I should have clarified this, only the fat32 and EXT partition are set to Primary. Swap Partition is set to logical, setting all three to primary causes issues.
Reformat only the swap and format to logical. Then in Link2SD force it to reinstall the scripting and see if that fixes it.
ozzmanj1 said:
Ah.... okay, I should have clarified this, only the fat32 and EXT partition are set to Primary. Swap Partition is set to logical, setting all three to primary causes issues.
Reformat only the swap and format to logical. Then in Link2SD force it to reinstall the scripting and see if that fixes it.
Click to expand...
Click to collapse
Okay then. New problem. Now Link2SD says "No SD card present" and android doesn't mount it either.
This is killing me slowly.
I'll try to reformat the whole card via a reader...
Didnt work. SD card still not recognized.
echardcore said:
Okay then. New problem. Now Link2SD says "No SD card present" and android doesn't mount it either.
This is killing me slowly.
I'll try to reformat the whole card via a reader...
Didnt work. SD card still not recognized.
Click to expand...
Click to collapse
OK. If your willing, lets start fresh. I am guessing you have your SDcard files backed up. Using Minitool partition delete all partitions and format as FAT32. Then create another partition of your size and format it as EXT (I prefer 4, EXT4) and set it to EXT(2,3,4,etc) and Primary. Then just for kicks, do not make a swap partition. I read that its not necessary, however I always do it..... well necessary only if you use a swap manager. So after the fat32 and ext partitions are made and minitool has created them. Take out the card, put it back into your pc and see if windows sees the fat32 partition. If good place it back into your phone and see if it upon bootup sees your sdcard.
Just in case as a reference here is the tutorial from the developer of Link2SD on how to set it up.
http://www.link2sd.info/description
ozzmanj1 said:
OK. If your willing, lets start fresh. I am guessing you have your SDcard files backed up. Using Minitool partition delete all partitions and format as FAT32. Then create another partition of your size and format it as EXT (I prefer 4, EXT4) and set it to EXT(2,3,4,etc) and Primary. Then just for kicks, do not make a swap partition. I read that its not necessary, however I always do it..... well necessary only if you use a swap manager. So after the fat32 and ext partitions are made and minitool has created them. Take out the card, put it back into your pc and see if windows sees the fat32 partition. If good place it back into your phone and see if it upon bootup sees your sdcard.
Just in case as a reference here is the tutorial from the developer of Link2SD on how to set it up.
http://www.link2sd.info/description
Click to expand...
Click to collapse
PC sees the FAT32. Phone sees the card now. Link2SD shows the partition but cant mount it and create the script for it. Also tried as ext2. Thanks for your help. I am going to try to update the ROM.
After updating the ROM to 2.4.0 and waiting 10 mins and rebooting as usual. was able to successfully link the partition! Thanks for your help!
No problem. Glad you got it working.
Sent from my R800at using xda premium
Got all my apps installed! Woot! Also, something must have been messed up with my previous flash.. I wasn't able to restore apps the newer way from titanium backup. I had to do it the old way one by one.
phone is going to make a great gaming alternative to my SGSII.

[PROOF OF CONCEPT] Full swap SD card for Xperia M/M Dual

Hi all,
After searching on the net and a bit of thinking, I have an idea about fully swapping the SD card with internal storage.
In my concept, I will divide the SD card into 2 partitions:
- 1 FAT32 partition for compatibility with other apps and the device itself
- 1 EXT4 partition for swapping
Then, I will inject a small code to the system to run during boot (I think I will use init.d) to unmount /data partition (I don't know if it's necessary) and remount it to the EXT4 partition.
The best part of this method is it's simple, more efficient than Link2SD (since it makes the /data partition gets fully hooked into SD card in no time) and also makes boot up progress faster (no apps check and relink)
If someone can help improving the concept or even turn it into a prototype or a real stuff, leave your ideas at the comments.
Thanks.
too good if this can really be implemented... if someone knows how to do it...please comment
Instead of mounting the sdcard as Data Partition, i would instead Turn of the sdcard Emulation, since the sdcard has lower rw Speed what would slow Down the Phone.
adi2500 said:
Instead of mounting the sdcard as Data Partition, i would instead Turn of the sdcard Emulation, since the sdcard has lower rw Speed what would slow Down the Phone.
Click to expand...
Click to collapse
In fact, the internal EMMC storage is even slower than a SD card. Plus the sdcard emulation is a function implemented into Android kernel itself, while I'm just adding the code. And this is NOT for speed, it's for storage.

Link2SD, Apps2SD not working on rooted H440 Marshmallow. Solution: ext3 format.

Since the unlocked bootloader and TWRP recovery made possible to root marshmallow on H440 and its variants I got interested in doing it myself.
Last weekend I did it and started to reconfigure the device with my preferred apps and one of them is Link2SD, since I have lots of apps.
The first thing that I noticed was that Link2SD giving an error of not being able to write on the second partition (ext4). I came to a guide from techmagus, that partially solved my problem. I used Apps2SD, partitioned my card, it worked, I could move apks to the second partition, but always I would get a message about "corrupted SD card" and on camera the option to record pictures and movies to the SD card wasn't available.
From the guide:
Q: Can I partition in Linux or Windows?
Yes. However, there is a chance that Marshmallow will show a “corrupted SD card” message. It is not corrupted, the SD card detection algorithm of Marshmallow is stricter (or different) than the previous Android versions. When it reads an SD card, it was expecting something but found it not. Continue as usual, the ext4 partition is working as intended.
Yes, the partitions are ok, but not working as I would like.
Looking for more info I found that the new feature of marshmallow, adopted storage, uses an encrypted ext4 partition to give more memory to install apks, a little like Link2SD and Apps2SD would work.
So I thought that before MM the ext4 partition was "invisible" to android and now, since it can use ext4 for it's own purposes, it's not invisible any more. Since the partition isn't encrypted, an error is flagged.
If I could hide my partition it would be a solution. I just don't know how to do it or even if it is possible. The next option? Format the second partition to an "invisible" format. The H440n can use ext2, ext3 and ext4 for partitioning, so let's try ext3 and... problem solved
Using ext3 for the second partition Apps2SD could create it's scripts, the “corrupted SD card” message is gone and the camera re-enabled the option to store pictures on the SD card. Since Link2SD appears to have troubles writing the startup scripts (people are instructing to use Apps2SD to first install the scripts then using Link2SD after that...) on MM I didn't tested it, but it should work as intended.

Categories

Resources