[Q] SD Card will not mount after ext4 part. - Nexus S Q&A, Help & Troubleshooting

Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S (US, T-Mobile, manufactured Dec. '10)
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've tried all the recommended procedures garnered from the first 10 or so pages in google, xda, cyanogem forum, etc:
Restore from nandroid: Not possible, can't mount the SD,
Wipe/Reset: can't wipe /media as sd card won't mount,
partition sd card from within Clockwork: indicates success but does nothing,
format from within clockwork: unable to mount,
repartition using adb: works, parted can see them, I can move files to from, but the phone will not mount,
clearing fstab: no effect,
Fastboot works, but I don't have the proper images. ADB works, as do the installed utilities. Have not tried ODIN as again, I don't have the proper images. Should I attempt to compile my own images from source?
Update: SOLVED, Microsoft Windows. To whom it may concern: I was able to mount the /dev/block/platform/s3c-sdhci.0/by-name/media from two different laptops running OSX and Fedora/Ubuntu then successfully been able to partition them with fat32 as the ClockworkMod (and maybe Cyanogen?) expect with 0 progress. Then I pulled out an old Windows machine, installed the JDK/ADK's +tools and performed the same procedure and that time it worked. I'm uncertain as to what particular quality a 'genuine' Windows formatting provides, but either this phone or the particular software combination I'm running require it. I was able to mount & re-partition the /sdcard in Clockwork, then manually remove rebuild them and upgrade to ext4 using tune2fs as usual. In the interim for work and such, I had to find a surrogate (for the SIM) and could only find and old k750i (which still had a full charge and worked flawlessly all day, btw). Wow phones used to be small.
I think I was missing something about the way ClockworkMod handles fstab, because everytime I would modify it specifically to the specs I passed to parted while creating the partitions with mkpartfs, it would either ignore or overwrite them. So be careful messing with the sd-card, the S's aren't like the One's in the sense that if you screw it (the sd-card) up or it goes bad you can't just take it out and format it in another machine/phone, you have to appeal to ClockworkMod. ODIN $ucks by the way, I found fastboot to be much more effective.

If you format the sd partition ext4, then you should change the fstab too.
from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
to from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard ext4 rw
or from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard auto rw
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Of course, I don't know, whether the recovery has the vfat type in fstab. You might have to change it there too. On my linux box auto works very well in fstab.
Of course, if you partition your sd partition ext4, you won't be able to use it as usb memory from windows. (At least I am pretty sure you can't, haven't tried)

Well of course I couldn't let it die, I went back and started tinkering again now that I have a way back. I can't change the fstab it seems, whatever I change it to gets over written everytime either Clockwork or the Rom starts. It's weird, I know I'm missing something and I don't know much about CWMod. (had Amon_Ra on the N1, which had the nifty fsupgrade script)
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Click to expand...
Click to collapse
I'm quite familiar with unix style fs and fstab, it's the stubbornness I'm not used to. I'm also spoiled by vi and nano. CW has some nice scripts built in as well though.

Related

[Q] SD Card will not mount in Nexus S

Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've attempted all: wipe/reset, format using clockwork, partition using clockwork, partition using adb, changing fstab, etc etc.
All topics I've found on the net end up being resolved by taking out the sd-card and formatting externally or using different card. i've had a N1 for well over a year and done far worse without problems, this phone seems to be very fragile for a 'developer' phone.
Jacks0n said:
Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've attempted all: wipe/reset, format using clockwork, partition using clockwork, partition using adb, changing fstab, etc etc.
All topics I've found on the net end up being resolved by taking out the sd-card and formatting externally or using different card. i've had a N1 for well over a year and done far worse without problems, this phone seems to be very fragile for a 'developer' phone.
Click to expand...
Click to collapse
Are you able to go with ADB through the directories?
and yeah, false Section! Q&A would be better
I am having the same issue. I actually just got my phone back from Samsung support (which is real ****ty) because the SD card started having I/O issues.
According to the ticket information they replaced the PCB.
Anyway, I immediately installed Clockwork recovery and transferred the latest Blandroid rom to the root of the SD card. No matter what I do I cannot mount the SD card from the recovery menu or format it from the recovery menu. Mounting USB storage works fine, though.
Hiya I got the same problem
Any salutation yet ?
Yeah. Don't format the internal storage with clockworkmod etc.
I have that issue I cant even open phone now
albundy2010 said:
Yeah. Don't format the internal storage with clockworkmod etc.
Click to expand...
Click to collapse
Hi The phone just stuck in boot logo I can patch iso file from adb though but I cant mount or even wipe devlink cache I dont know what to do ?
Did you ever get this resolved? If so, can you tell me how you did it?
Jouten said:
Did you ever get this resolved? If so, can you tell me how you did it?
Click to expand...
Click to collapse
1.power off...on it back...test it
2.plug your usb cable, boot into recovery..will heard usb sound from your PC, if does not work, try several times plug the usb untill you get usb sound...unplug, then reboot...
3.fresh install ROM...
Yeah, don't mess with the internal memory. I semi-bricked a Droid Incredible one time doing that. It ended up making all the internal partitions FAT. Took me hours to fix it. Be careful. I am afraid to even do it on my crespo4g. When I mount it in gparted running Linux Mint, the internal sd card showed up as not partitioned. I didn't even think about trying to partition it thinking back on the Incredible.
A solution, at least, for flashing/updating roms
Just happened to me, using CM9 after enabling the encryption I can't access the /data /sdcard paths. It would be nice to be able to read them but for me the biggest problem was how to update to the latest CM9 nighty.
In the end I've tricked the clockwork recovery to think the cache partition is the sdcard. I'll post the method in case someone find it useful.
1. Tranfer the update to the cache partition.
- Normally big enough, wipe it from the cwm if there is not enough space
adb push update-cm-9-20120305-NIGHTLY-crespo-signed.zip /cache/update.zip
2. Log into the phone and mount cache to sdcard.
adb shell
mount /dev/block/mtdblock4 /sdcard
3. Go into the cwm option to flash the uploaded package, it wont give you the mount error as we already mounted /sdcard
4. After the update log again and clear the update package, and unmount /sdcard
adb shell
rm /cache/update.zip
umount /sdcard
As long as you don't have to wipe you can continue updating and using your encrypted storage without much trouble
Help, internal storage not showing
Hi,
I wanted to go back from CM9 to Stock rom, but now I did something wrong (don't know what exactly) and my device is still on CM, but unable to access the internal storage. I cannot even take pictures or access it through CWM.
Any thoughts?
Hi i flash locky another CWR AND IT'S FIX LUCKY ME B^)
Sent from my Nexus S using xda app-developers app
getting SD card back
rellivisit said:
Hi,
I wanted to go back from CM9 to Stock rom, but now I did something wrong (don't know what exactly) and my device is still on CM, but unable to access the internal storage. I cannot even take pictures or access it through CWM.
Any thoughts?
Click to expand...
Click to collapse
I have had no luck using multiple methods to partition sd card with Nexus S. Each time I can view the modified fat32 partition from windows, add files etc, but cannot be recognised from within CWM recovery.
Left me unable to reflash roms etc.
The only thing which has worked for me is to use mini tool for windows and mount usb storage from recovery. Do a refresh from mini tool and it should come up in the list of drives. delete the partition(s) you find there (not your notebook ones of course), and reformat it as fat 32.
CWM>Advanced>Reboot recovery, move over your rom to the sd card, then try to find it in CWM, should now show up :fingers-crossed:

fstab.qcom modification

I just got my first Android Device (Moto E) and tried to get around the small internal memory by using the sdcard instead of the internal memory for /data. As the KitKat mounting procedure does not seem to be based on vold.fstab anymore, the usual guides to doing that don't apply.
So my idea was to format the sdcard with ext4 and modify the /fstab.qcom file to mount the sdcard as /data instead of the internal data partition. But here's where I don't know how to proceed, as adb shell don't seem to have access to the proper partition during flashboot (though having mounted the rootfs parition which should contain those files?) and is unable to write to the file once the system is running.
I'd appreciate if anyone can point me in the right direction on how to do that.
lunaticat said:
I just got my first Android Device (Moto E) and tried to get around the small internal memory by using the sdcard instead of the internal memory for /data. As the KitKat mounting procedure does not seem to be based on vold.fstab anymore, the usual guides to doing that don't apply.
So my idea was to format the sdcard with ext4 and modify the /fstab.qcom file to mount the sdcard as /data instead of the internal data partition. But here's where I don't know how to proceed, as adb shell don't seem to have access to the proper partition during flashboot (though having mounted the rootfs parition which should contain those files?) and is unable to write to the file once the system is running.
I'd appreciate if anyone can point me in the right direction on how to do that.
Click to expand...
Click to collapse
A little late in the game (I am trying to do the same), but I come across this:
http://forum.xda-developers.com/showthread.php?t=443994
boot partition populates the rootfs. So hack the boot.img (unpack to analyze), and you may find your answer. Hope this helps.
I will give it a shot in the next week.

Encryption Unsuccesful

Hello!
Recently I recevied "Encryption Unseccesful" message on my phone. I tried to restore backup, but twrp says: "failed to mount /data". So, internal storage is dead. Found this. But cant find "repartition" menu in the cwm.
Questions is:
1. Do I need older versions of cwm to repartition sdcard? (If you have one, please share )
2. Is there any ways of recovering phone?
Thanks in advance!
no, just go to TWRP, Wipe, Format internal sdcard
sandpox said:
no, just go to TWRP, Wipe, Format internal sdcard
Click to expand...
Click to collapse
tried this, but I think internal storage is corrupted. Is there a way to use sdcard as internal storage?
you can use sd card for apps and other stuff, but as I knoe cannot be used for system files
I made 2 partitions on sd:
4gb fat32
4gb ext4
But I cant bind /data to this ext4 partition. Can you help, please?
What i did:
With TWRP's terminal:
Code:
mount -t ext4 /dev/block/mmcblk1p2 /data
- Invalid argument (dunno why)
Code:
ln -s /dev/block/mmcblk1p2 /data
- but on phone boot i receive same "encryption unsuccesful" screen.
Edited /etc/fstab - same result.
Files and mount after reboot turn back to its previous condition.
Also installed stock ROM - same message screen.
[/QUOTE]
I got advice that i must do this things with init.d scripts. How can I do this? Already tried "xda's app2sd scripts" but they works if phone completely boots in OS.
remosam said:
you can use sd card for apps and other stuff, but as I knoe cannot be used for system files
Click to expand...
Click to collapse
Why not? I want only mount /data on sd without booting in OS. Other partitions like /system surprisingly work right, because i can flash ROM (stock, CM), but always receive - "cant mount /data"
blind_aquila said:
Why not? I want only mount /data on sd without booting in OS. Other partitions like /system surprisingly work right, because i can flash ROM (stock, CM), but always receive - "cant mount /data"
Click to expand...
Click to collapse
asked sostk or noname
@blind_aquila
try to flash stock rom with odin

method to set 0123-4567 as mount point for removable sdcard

This is a very annoying issue but I have not found any thread about it.
I'm trying to upgrade my external/removable sdcard for an android 6 device.
The new sdcard gets mounted to /mnt/media_rw/XXXX-XXXX (i.e. not 0123-4567), so no app works as files can't be found.
The linux way (ln) wont work. Simply creating /mnt/media/0123-4567 causes bad bootloop on my device. This suggests that FolderMount app or Magisk modules such as fbind are a bad idea. selinux is enforcing.
It appears that Android assigns different mount points are to different sdcards and the first sdcard always gets 0123-4567. It that's right, Android probably stores sdcards' identifiers so as to know which mount point to use at boot time. So, deleting the identifiers database would probably mean that the next card inserted would get 0123-4567 as mount point.
I have looked at the data of com.android.externalstorage, but there is nothing there. I don't see other obvious candidate apps.
Where is this ext sdcard data stored?
I was wrong. Android sets mount points matching sdcard uuid
How to change vfat partition UUID?
How do I change the UUID of a vfat partition? For ext2 / ext3 / ext4, this is done with a simple: tune2fs -U <new-uuid> /dev/<partition> Is there a similar command for vfat partitions?
superuser.com

Unable to create second partition on SD card

I've been trying to partition my SD card, but all steps I take to try and diagnose why I am unable to partition the card is getting me nowhere.
Initially, I used gparted on my laptop to partition the SD card with a v-fat partition and a f2fs partition, both primary partitiond. This was when I found out that no matter what I do the second partition on the SD card, it doesn't seem like the format actually takes. Whatever tool I use complete the partitioning and formatting steps successfully by all appearances but it doesn't seem like the partition is ever actually formatted. What I mean by that is that no matter what the second partition is it never mounts. I get an invalid argument error or bad super blocks and so forth. I can make the first partition anything I want: fat, v-fat, f2fs, ext4 and so forth and that will mount in my terminal without issue, but no matter what I do the 2nd partition always fails to mount. I've also noticed that blkid never has any fs info for the second partition. It gives me the partition UUID and that's all, while the first partition has both part UUID & fs UUID.
I've even gone so far as to just recently get a brand new SD card thinking that perhaps the first SD card was corrupted but I'm still getting the exact same behavior. Also of note is that in gparted when I try to create a secondary partition, I'm unable to mount the second partition so I don't think it has anything to do with my device. I've tried using fdisk, gdisk, parted in the terminal and I've tried using extended partitions and logical partitions and only primary partitions. I've done this before in the past so I know that it is possible.
It almost seems like the SD cards that I have are simply not capable of being partitioned in any way but it's strange that I now have two 512 GB SD cards and they're both giving the exact same behavior so I'm thinking that I'm missing something obvious. Any help anyone could provide as far as trying to figure this out or debug what's going on what I'm doing wrong would be greatly appreciated.
Thanks,
Ryan
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
aIecxs said:
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
Click to expand...
Click to collapse
I don't need anything to mount automatically. I'm saying I can't manually mount these partitions. I also don't need f2fs, that was just an example. I've tried multiple partitions that are just fat, ext4 and many other combinations. Under no partition scheme can I get anything other than the first partition to mount--using the mount command as root.
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
aIecxs said:
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
Click to expand...
Click to collapse
I have tried with gdisk but I can try with that specific version and report back. I understand we can create imaged file systems, but one of the main reasons I do this is that I find fat partitions are fickle and can easily be corrupted where the whole partition requires wiped. By having a non fat partition I use that as a better backup option where I find it's easier to recover data in case of corruption or other issues. For such use, being tied to the fat FS would still incur the possibility of data loss so that doesn't work for my purpose.
Thanks and I'll report back,
Ryan
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
alecxs said:
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
Click to expand...
Click to collapse
Thanks for the suggestion to use gdisk. I downloaded the version you linked, but I still get the same behavior. I believe it is related to the fact that only the first partition gets a filesystem UUID in blkid. I'm not sure what this means, but it seems clear that the second filesystem isn't being properly created no matter what I do.
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
I'll give that a try and report back
alecxs said:
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
Click to expand...
Click to collapse
Yeah I'm able to create an image, partition it into a vfat & ext4, then mount both of those partitions.
can you dd the file into mmcblk1 for testing purposes?
alecxs said:
can you dd the file into mmcblk1 for testing purposes?
Click to expand...
Click to collapse
Sorry this isn't clear to me. What am I using to dd into the partition, and do you mean mmcblk1p1/2? As mmcblk1 is the whole disk.
Thanks,
Ryan
yes, I meant the whole disk you created a test file that contains MBR or GPT and two partitions including UUIDs and file systems? If you dd it into the mmcblk1 it should create 1:1 copy of that disk image with two partitions including partition table.
Well I'll be:
Code:
/dev/block/mmcblk1p2 on /data/data/com.termux/files/home/i2 type ext4 (rw,relatime,seclabel) /dev/block/mmcblk1p1 on /data/data/com.termux/files/home/i2 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Code:
/dev/block/mmcblk1p2 23M 46K 23M 1% /data/data/com.termux/files/home/i2 /dev/block/mmcblk1p1 4.9M 0 4.9M 0% /data/data/com.termux/files/home/i1
I can possibly use gparted to just resize those! Any thoughts on what was going on, why this method worked? Hrmm looks like resizing fat could be a challenge, but this certainly gets me closer!
there is also parted binary you can use on phone
I have it and I'm playing around with it, thanks for all your help

Categories

Resources