ext2 formatted ext-sd mounting - Motorola Droid Bionic

I'm attempting to format my external sdcard to ext2, just one single partition (no apps2sd magic).
The reasons are to have the ability to store >4GB files on the card, faster read times, and not needing compatibility with any M$ systems/PCs/Junk, journaling (>ext2) is not needed.
At the moment, I'm running a CM based ROM (cyanfox) and will likely try this out on a moto/stock based ROM after.
Here is my progress so far :
I'm able to mount the SD manually, though with some hoops being involved. The bionic will not mount it automatically, and is constantly telling me that it is unsupported/empty/needs to be formatted in the storage menu, and a permanent notification.
In a terminal shell, I can mount the device (/dev/block/vold/179:97) by specifying the type only as ext4. This is definitely not ideal, but I get errors when the type is specified as ext2 or ext3. (error : mount: Operation not supported on transport endpoint ).
At the moment, I've made an init script to mount the sd at /storage/sdcard1 but this doesn't cause android to think that the actual sd is mounted properly (empty sd notification still exists). Though it is at least mounted.
And I have edited the fstab file at root to change the sd type from vfat to ext2, but this file rewrites itself at boot. Unfortunately I'm not able to set an immutable bit on the file.. (android is not a type writer).
The ext2 filesystem has been checked for errors, does have files written to it, and is able to be read/written to in android after manually mounting it. Android just insists on a fat partition though.
Any help/tips would be appreciated. I'll update this thread in case anyone else would like to apply this as well.
Also, if I'm missing something blatantly obvious, please let me know

Related

error mounting sdcard after moving apps to sdcard

on GDXv25 abd alfv8a have all the extra goodies for vold and all that. I change my SDCARD to a bigger one. format a partition for ext4 and leave the rest as default. On moving old stuffs back to it it seems to behave very well. Then I decide to move some of the apps to offload internal storage. The moving seems totally ok but after reboot my sdcard seems not be able to mount anymore. Go into CWM recovery and try to mount my sdcard. It says error mounting /sdcard yet I could succesfully mount my ext4 partition. At this point should I go ahead and re-format the sdcard again? What happens to those apps that I offload to the sdcard? are they toasted?
I'd to get some opinion before I re-format it since it will bring me over the point of no return. I still have no clue why all of a sudden after the moving of my apps that the partition won't mount anymore
On my linux I try to mount it via USB... it gives an error saying can't mount coz it can't read superblock. I gather some operations must have wiped into superblock. Sh*t hits the fan so to speak
by the way it is a new sdcard ... I dun think i damage it. But from CWM I can't even go ahead and format it because it says error mounting the partition.
I am amazed - I thought you don't need to mount before you can format. what's the deal here? I can't mount and I can't format?
vientito said:
On my linux I try to mount it via USB... it gives an error saying can't mount coz it can't read superblock. I gather some operations must have wiped into superblock. Sh*t hits the fan so to speak
Click to expand...
Click to collapse
That error message simply means that the ext filesystem in the sd-ext partition is kaputt and needs to be repaired (for example, manually restore a copy of the superblock) or formatted.
And that's your reason why you ran into problems ... something went wrong as you moved your old stuff onto the new card, and the next app you put onto the sd-ext finally triggered the problem.
Of course there's also the slight chance that the phone doesn't like the SD card.
finally I am able to format that sdcard by inserting into my kodak video playsport camera and format that from there! It's ridiculous that under CWM I am not able to do something as simple as formatting. That should not be a "feature" at all! Error mounting the card I could accept that but not able to format a card with screwed up superblock that's not acceptable.
With this exercise, I realize how valuable a backup it is. With all those apps xferred to the sdcard, I practically cross a bridge. Even with old usable card re-insert into phone those apps are gone and are no longer available. Only a backup (of course on a usable putaway MMC card) could have saved me all the trouble.
I still dunno what have gone wrong in the first place. Perhaps there's something I dun quite understand about moving apps to xternal storage.

[Q JB on i9000] Phone does not mount internal sdcard at boot

Hi,
I already asked for this issue in the this Thread, but didn't got any answer.
I tested these three JB ROMS: CM10, HellyBean and SlimBean.
All of them work nice, except that my internal sdcard does not mount at boot time.
I have to do it manually every time boot up my phone by choosing System Settings --> Storage --> Mount SD card
Anyone have the same issue?
Does anyone have a solution?
Thanks
Same here! Google found this post, perhaps it will find us an answer
xalo2k said:
Hi,
I already asked for this issue in the this Thread, but didn't got any answer.
I tested these three JB ROMS: CM10, HellyBean and SlimBean.
All of them work nice, except that my internal sdcard does not mount at boot time.
I have to do it manually every time boot up my phone by choosing System Settings --> Storage --> Mount SD card
Anyone have the same issue?
Does anyone have a solution?
Thanks
Click to expand...
Click to collapse
toddmworth said:
Same here! Google found this post, perhaps it will find us an answer
Click to expand...
Click to collapse
I have the same issue with my I9000.
Any JB with different kernels makes the internal SD eventually be unmounted. When install a JB ROM the phone works very well but suddenly, the internal SD (phone's SD) is unmounted.
In CWM both SD are mounted and read without any problem. With ICS ROMs the phone works flawlessly.
In my case, the external SD is functioning as expected.(I have a 32 GB micro sd)
The installation language is Spahish - Spain.
No matter which method of cleaning and wiping I use, the result is the same.
Also, starting from GB stock firmware (JVU) flashed with Odin, followed by installing the nightly Cianogen CM10.1 and finally flashing the desired JB ROM works.
I tested Helly Bean, Slim Bean, C-ROM Mix and Baked Blacjbean7 obtaining the same behaviour.
Important: I'm restoring around 54 apk using Titanium backup (games, applications and utilities) in every case. I did not tested the ROMs without these restorations.
marcelogabriel said:
I have the same issue with my I9000.
Any JB with different kernels makes the internal SD eventually be unmounted. When install a JB ROM the phone works very well but suddenly, the internal SD (phone's SD) is unmounted.
In CWM both SD are mounted and read without any problem. With ICS ROMs the phone works flawlessly.
In my case, the external SD is functioning as expected.(I have a 32 GB micro sd)
The installation language is Spahish - Spain.
No matter which method of cleaning and wiping I use, the result is the same.
Also, starting from GB stock firmware (JVU) flashed with Odin, followed by installing the nightly Cianogen CM10.1 and finally flashing the desired JB ROM works.
I tested Helly Bean, Slim Bean, C-ROM Mix and Baked Blacjbean7 obtaining the same behaviour.
Important: I'm restoring around 54 apk using Titanium backup (games, applications and utilities) in every case. I did not tested the ROMs without these restorations.
Click to expand...
Click to collapse
This is the problem I am having. I can see internal sd card on CWM.
But on booting in android, whatever the rom is , does not mount internal sd card on booting android.
Please help to solve this.
Same here
TheMask007 said:
This is the problem I am having. I can see internal sd card on CWM.
But on booting in android, whatever the rom is , does not mount internal sd card on booting android.
Please help to solve this.
Click to expand...
Click to collapse
I have been reading/researching about this issue for about a week (on and off) trying various fixes because this is driving me bonkers.
I have tried:
1) Reduced the amount of used space on my SD Card (Samsung 16gb SDHC) to half
2) Moved as many apps as I can to SD (Noticed more frequent unmounts after this)
3) Removed my Nandroid Back-up from my SD
4) Reflashed CM 10.1
The last thing I am going to try is wiping/reformatting my SD card. If that fails then im suspecting something else is happening at OS/kernel level. I have read in other forums where people have tried a full wipe and restore apps slowly but still get the same unmount. One user has tried another SD card (smaller 4GB one) which seemed to solve their issue?? Weird.
Anyway, I will report back if I have any joy.
In your kernel settings you have the option to mount/unmount system and more or you could write/download a script that mounts the sd card automatically.
Maybe this could help: http://forum.xda-developers.com/showthread.php?t=1971689
I give up.
cixty said:
In your kernel settings you have the option to mount/unmount system and more or you could write/download a script that mounts the sd card automatically.
Maybe this could help: http://forum.xda-developers.com/showthread.php?t=1971689
Click to expand...
Click to collapse
I tried it and no good. It seems as though the Internal SD is mounted, but some error is causing it to operate/display as unmounted via OS.
I completed more testing (extreme):
Wiped Internal SD
Wiped External SD
Try other kernel
Try other CM based ROM
The issue still occurred.
I then reinstalled Stock (XXJVT) via ODIN (Pit 512) and Semaphore kernel to see if its a hardware thing.
Nope.
This combo works amazingly. Infact its faster, smoother and easier to use (along with additional tweaks in Semaphore) than CM10 so I wont be going back to Jelly Bean on this phone. Ever.
Gingerbread for the win!
Hi,
I am using PAC-ROM v22.2 (Jelly Bean) and have the same problem: 80% boot don't mount the internal sdcard (I have no problem with the external sdcard). I can't even mount it manually as xalo2k does, cause I have no "Mount SD Card" menu under Settings/storage.
I spent many hours trying to search for a fix on google, xda, and others with no success. I found a lot of "litterature" on how to mount the sdcard on the PC, or how to swap internal and external cards. However, I don't care about mouting my sdcard on the PC, and I don't want to make believe Android that my external sdcard is the internal one, as I would not like to loose the internal 8GB that the phone is supposed to provide.
In Terminal Emulator, I can do:
> su
> mount -r -w -t vfat /dev/block/mmcblk0p1 /storage/sdcard0
> cd /sdcard
> ls -l
There I can see my files. However, if I exit root, the files don't appear anymore. Hence this looks like a permission problem.
Unfortunately ESExplorer still tells me sdcard0 is not mounted, and my apps (i.e. the camera) aren't able to access it. Additionnaly, the apps I had moved to the sdcard are'nt accessible...
So I tried to fix the permissions. Going under /storage as root, I can see:
drwx------ root root 1970-01-01 01:00 sdcard0
d---rwxr-x system sdcard_rw 1970-01-01 01:00 sdcard1
Si I try:
> busybox chown -R system:sdcard_rw sdcard0
But I get "Operation not permitted" for each dir/file in sdcard0
How comes that an operation is not permitted to the root user ???
Did anyone fix this problem ?
Edit: "You can't chown or chmod a vfat partition let alone a directory within it. You can only change ownership and permissions in fstab and it will apply to all directories and files. So to change ownership of the entire mount point you would change your fstab entry" (see http://ubuntuforums.org/showthread.php?t=1646849)
Thanks and regards
OK guys, I finally found a solution.
Thanks to http://ubuntuforums.org/showthread.php?t=1646849 I mentionned just above, I decided to write an fstab file (the name is important) and placed it under /etc:
/dev/block/mmcblk0p1 /storage/sdcard0 auto rw,uid=1000,gid=1015,fmask=0702,dmask=0702 0 0
/dev/block/vold/179:1 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
Basically, this script is the result of the terminal command (you need to be root):
mount | grep sdcard0 > /etc/fstab
... which I ran after I could get the sdcard mounted (after a mount on PC and eject). But it first failed with errors on options, so I removed a few of them until I kept the lines above.
Then I wrote a little script which I place on my external sdcard which does not have a mount problem at boot:
busybox mount -a
and placed a shortcut to this script on my desktop with SManager.
I just have to click on this shortcut after boot and the internal sdcard gets mounted.
I tried to place this script under /etc/init.d with the hope it would be launched automatically at boot, but this did not mount the sdcard. If anyone knows why ???
Hope this helps !
Well... still having troubles with my sdcard... With the above fstab script I can mount it, access the files, etc...
However, the camera still asks me to insert a sdcard... Is this a permission issue ? Which permissions (owner, group, etc...) does the camera need ? My DCIM dir has the following permissions:
d---rwxr-x system sdcard8RW 2013-06-04 10:36 DCIM
Thanks and regards
- Regis

[Q] Please help - can't boot into recovery mount error

(Please let me know if this is the correct forum!)
I have a Motorola Milestone 1 (A853) with Open Recovery 1.46 on a 16GB card. I've been using this to try new roms for over 2 years now. Everything was fine until I tried to create an ext 2 partition using MiniTool Partition Wizard, but things went sideways. Needless to say I wiped the card, created a new 10GB Primary Partition on it and a 4 GB ext2 for further usage. Then, I restored backup items on the card (pictures etc.) plus a fresh new version of Open Recovery. Now, every time I am at the Recovery menu and try to apply sdcard:update.zip I get this message:
E:Can't open cache/recovery/command (<-- this is nothing new - seen it many times before but still able to boot into open recovery)
-- Install from sdcard...
Finding update package...
E:Can't mount /dev/block/mmcblk0p1 (or /dev/block/mmcblk0)
(Invalid argument)
E:Can't mount SDCARD:update.zip
Installation aborted
.. any ideas what to do?
It seems like your phone dont mount the sdcard properly.
Try out a 2ndboot OR. (there is one from kabaldan and one from FuFu)
get a proper sdcard, and unzip to the root OpenRecovery from this url: http://forum.xda-developers.com/showthread.php?t=1897048
And voila! :good:
Thanks for the assistance guys.
The card is fine, It is seen in Windows perfectly with the 2 new partitions, but the phone is not seeing it. I was following MrTapa's guide here before the trouble started: http://forum.xda-developers.com/showthread.php?t=1750888 . When the card worked before, it was formatted using NTFS and both Windows and the phone could see it. Now, the 10 GB partition is NTFS and it has the additional 4 GB ext2 partition. Windows sees it, the phone does not.
Does Skrilax_CZ's note have anything to do with it? "If file "/system/etc/install-recovery.sh" exists on your Milestone, delete it (prior to flashing the SBF)" <-- from http://modmymobile.com/forums/563-m.../531599-open-recovery-v1-46-11-21-2010-a.html
lezztor said:
Thanks for the assistance guys.
The card is fine, It is seen in Windows perfectly with the 2 new partitions, but the phone is not seeing it. I was following MrTapa's guide here before the trouble started: http://forum.xda-developers.com/showthread.php?t=1750888 . When the card worked before, it was formatted using NTFS and both Windows and the phone could see it. Now, the 10 GB partition is NTFS and it has the additional 4 GB ext2 partition. Windows sees it, the phone does not.
Does Skrilax_CZ's note have anything to do with it? "If file "/system/etc/install-recovery.sh" exists on your Milestone, delete it (prior to flashing the SBF)" <-- from http://modmymobile.com/forums/563-m.../531599-open-recovery-v1-46-11-21-2010-a.html
Click to expand...
Click to collapse
NTFS?
Replace it with FAT32. Then it should work.
In the link you provided check step 9 (though FAT32 should work fine even with 2GB cards)
Ok - so reformatted 10GB partition to Fat32 and loaded OpenRecovery again to root of sd card - same error. I might also mention that I tried Fat32 on another smaller (2GB) card with an ext2 partition and it gave the same error. I'm beginning to believe that this phone has a problem with multi-partition sd cards?
Just tried the original way - one partition using NTFS ... same error. Frustrating .. over 3 days on this now ...
NTFS and Android can not work.
Unless someone included ntfs-3g into the kernel - but that would be a madman's work...
Delete every partition off your sd card, boot up Android, it will prompt you to format it, do it.
Copy recovery (OpenRecovery directory + update.zip) to sd card, try booting to recovery.
If it works resize FAT partition created by android to make space for an ext partition, boot Android again to see if it's ok with the changes.
Solved - if anyone is trying create an additional ext2 partition remember that BOTH the FAT32 and EXT2 must be created as PRIMARY. The app I was using defaulted to logical ...

[CMW, Init.d Script] Swap IntenalSD<->ExternalSD

Hello,
Sorry, not working like on sgs 3 and galaxy note 10.1. Dont apply now. I m working on a fix with vold.fstab, but format changes with jellybean.
Ported from scripts created originally for Galaxy S 3.
This script swaps internal and external sd storage from init.d.
- You must have a JellyBean Stock or Stock Based ROM
- Must be rooted to flash.
Attached to this post, you will find the CWM flashable zip.
This have zero chance to brick your device, but I cannot say if your SD card doesn't have any issues etc... so don't blame me for data loss or anything.
This script will NOT COPY DATA from your sd, so you will have missing data after you restart the phone.
The data is still on the original internal SD, so you'll have to copy it back to your bigger sdcard's root.
Code:
#!/system/bin/sh
#extsd2internalsd is a modification that allows to switch internal sd to external sd and viceversa. With this you can use default internal sd only for app storage #and the external sd to store all apps resource and all others stuff. The resut is a very big increase of installable apps on gs3
#All credits to Mattiadj of xda forum for the idea and script and to mike1986 for the cmw zip.
#Script Modified for SgNote N7000 by aureusz
sleep 5
busybox mount -o remount,rw /
#Tries to mount as vfat
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
#Tries to mount as exfat
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
#If Sd has been mounted, mount internal SD as extSdCard, if not, do nothing, Android should mount it back as internal.
if busybox mount | busybox grep vold/179:9; then
busybox mount -t vfat -o umask=0000 /dev/block/mmcblk0p11 /mnt/extSdCard
fi
Only problem is, if you use usb mass storage connexion, instead of mtp, it will swap back sd cards.
If you want to remove the script, simply delete the file 11extsd2internalsd from /etc/init.d/ with root explorer or a similar app.
Restart the phone and the problem should disappear.
I'll look into a fix for this.
Strange stuff happenning after first reboot (app2sd make apps disappear). Removing file and placing warning back
Aureusz.
Or you can simply switch mount points in vold.fstab
neobuddy89 said:
Or you can simply switch mount points in vold.fstab
Click to expand...
Click to collapse
The problem with this method is that, if you remove SDCARD, the phone will not mount internal SD back to it's place.
With this script, the internal SD will remount back to internal sd path.
I'm not sure, but that's how I understood it when I read the thread where they talked about this method.
Correct me if I'm wrong, I pretty much a noob at this.
aureusz said:
The problem with this method is that, if you remove SDCARD, the phone will not mount internal SD back to it's place.
With this script, the internal SD will remount back to internal sd path.
I'm not sure, but that's how I understood it when I read the thread where they talked about this method.
Correct me if I'm wrong, I pretty much a noob at this.
Click to expand...
Click to collapse
The solution to that can be decompiling framework-res.apk and editing file storage.xml
Make removable flag true for both storage.
This may or may not work but worth a try.
neobuddy89 said:
The solution to that can be decompiling framework-res.apk and editing file storage.xml
Make removable flag true for both storage.
This may or may not work but worth a try.
Click to expand...
Click to collapse
I'm definitely interested in all options regarding this issue, this has been a big hurdle for me on android with sd card slots, so I took to myself to fix it. I know it's easy to do in ASOP roms but, I missed some S-pen features.
Until now, people used bindings for some directories, for large games data, but this proved not to work for some apps, while this solution works for every app.
Spotify for example lost its synced library, because I think the service would check the synchro of the playlist at device startup, and the folders were not yet mounted... etc.. now, it's flawless.
EDIT : not so flawless, looking into modding fstab as suggested by neobuddy89
neobuddy89 said:
Or you can simply switch mount points in vold.fstab
Click to expand...
Click to collapse
Is it possible that you post the vold.fstab where the mount point is switched for internal and external SDcard? Thanks.
Re: [CMW, Init.d Script] Swap IntenalSD<->ExternalSD
any updates here?
Sent from my GT-N7000 using xda premium

[Q] Missing /sdcard mount (milaq nightly)

Hey folks,
I have recently replaced my older Evervolv on the Touchpad with a current Milaq Nightly, and for some reason it doesn't mount the internal SDcard partition (worked fine with Evervolv).
When I 'mount -t vfat /dev/mapper/store-media /sdcard' manually, it works fine and I can see the files in there, so the file system apparently is intact, but Android doesn't seem to recognize it as usable SDcard storage (i.e. no "move to SD" option in the app manager etc). The mount doesn't persist across reboots either, and adding an entry to /fstab.tenderloin is equally pointless.
Any hints on what could it be that prevents my device from automounting this partition?
WooShell said:
Hey folks,
I have recently replaced my older Evervolv on the Touchpad with a current Milaq Nightly, and for some reason it doesn't mount the internal SDcard partition (worked fine with Evervolv).
When I 'mount -t vfat /dev/mapper/store-media /sdcard' manually, it works fine and I can see the files in there, so the file system apparently is intact, but Android doesn't seem to recognize it as usable SDcard storage (i.e. no "move to SD" option in the app manager etc). The mount doesn't persist across reboots either, and adding an entry to /fstab.tenderloin is equally pointless.
Any hints on what could it be that prevents my device from automounting this partition?
Click to expand...
Click to collapse
It's not simply a matter of flashing the newer datamedia builds over an older, probably non-DM build. It requires restructuring the internal storage of the TP. Explicit directions are here. Use the newer version of the tool.
shumash said:
It's not simply a matter of flashing the newer datamedia builds over an older, probably non-DM build. It requires restructuring the internal storage of the TP. Explicit directions are here. Use the newer version of the tool.
Click to expand...
Click to collapse
The Evervolv before already was a datamedia build, and I have adjusted the partition sizes accordingly.
It worked correctly after the EW->Milaq migration about two weeks ago, and broke when I flashed a new Nightly over it last weekend.
(I did the whole cleanup via CWM before flashing the new nightly, just to avoid that question.)

Categories

Resources