Mounting storage manually - Droid Incredible General

With no questions asked ask to why I'm asking, I need to know how to manually mount the sd card so my device can use it while booted.
The following works via adb shell to mount the internal storage on /emmc at boot:
echo "" >> /system/bin/sysinit
echo mount /dev/block/mmcblk0p3 /emmc >> /system/bin/sysinit
Perhaps it's as simple as figuring out which partition on /dev/block is the sd card? Any help is greatly appreciated.

While booted using the device normally, the sdcard should already be mounted rw without doing anything.

xvenom89 said:
Perhaps it's as simple as figuring out which partition on /dev/block is the sd card? Any help is greatly appreciated.
Click to expand...
Click to collapse
Noob here. So don't have a clue. However, I do know you can just run the mount command with no parms to get a list of the partions. Please ignore if that was already obvious.
________________________________
Unrevoked forever
SkyRaider 2.5.2 Sense
Hrdra kernel ocuv_ov_v10 (#2)

krelvinaz said:
While booted using the device normally, the sdcard should already be mounted rw without doing anything.
Click to expand...
Click to collapse
It doesn't, this is why:
http://forum.xda-developers.com/showthread.php?t=754929
It mounts fine on stock Eclair and did fine on the Froyo leaks, but after deleting the stupid VZW partition I'm left with this issue.

rigman said:
Noob here. So don't have a clue. However, I do know you can just run the mount command with no parms to get a list of the partions. Please ignore if that was already obvious.
________________________________
Unrevoked forever
SkyRaider 2.5.2 Sense
Hrdra kernel ocuv_ov_v10 (#2)
Click to expand...
Click to collapse
The partitions are as follows:
~ # ls /dev/block/
mmcblk0 mmcblk0p2 mmcblk1 mmcblk1p3 mtdblock1 mtdblock3 mtdblock5
mmcblk0p1 mmcblk0p3 mmcblk1p1 mtdblock0 mtdblock2 mtdblock4 mtdblock6
I just don't have a clue as to which is for what, except that mmcblk0p3 is for the phone's 8GB of internal storage.

Mount command shows
/dev/block/vold/179:9 /mnt/sdcard vfat
Does that help at all?
________________________________
Unrevoked forever
SkyRaider 2.5.2 Sense
Hrdra kernel ocuv_ov_v10 (#2)

Not yet, no. I'm trying to mount it and emmc from recovery and they are still listed as "unavailable" under settings. Could you upload your /system/bin/sysinit for me? Perhaps that is what I need.

xvenom89 said:
Not yet, no. I'm trying to mount it and emmc from recovery and they are still listed as "unavailable" under settings. Could you upload your /system/bin/sysinit for me? Perhaps that is what I need.
Click to expand...
Click to collapse
File /system/bin/sysinit doesn't exist. I searched /system and all subdirectories and no such file exists.
________________________________
Unrevoked forever
SkyRaider 2.5.2 Sense
Hrdra kernel ocuv_ov_v10 (#2)

Edit: Deleted text. It was a dumb comment. I understand now that I read your other post.
________________________________
Unrevoked forever
SkyRaider 2.5.2 Sense
Hrdra kernel ocuv_ov_v10 (#2)

rigman said:
From home screen when I go menu>settings>sd & phone storage, it shows my sd card total space and available space. Also gives an option to unmount the sd card. Which means it must be already mounted, right?
________________________________
Unrevoked forever
SkyRaider 2.5.2 Sense
Hrdra kernel ocuv_ov_v10 (#2)
Click to expand...
Click to collapse
Yes, that's what normally happens. The problem is described in my thread here; I can choose to mount them from the notification bar when connected to my computer, but they do not mount. From Menu -> Settings -> SD & Phone Storage, the SD Card and Internal Storage are listed as Unavailable and the options to Format and to Mount are grayed out. The SD Card mounts fine in Clockworkmod Recovery, but not when I boot the system.

Related

Remount EXT2

Hello all, I was wondering if anyone can help me. I recently installed JF 1.51US and was working on lucidrem's scripts. I installed the new SPL and everything went ok but now my EXT2 will not allow me to move apps and such. It is saying thismkdir failed for /system/sd/lost+found, read-only file system EXT2 Not Mounted Can anyone tell me how to remount EXT2? I spent the last hour searching and couldnt find an answer to my question.
Does anyone know by chance?
chrisrj28 said:
Hello all, I was wondering if anyone can help me. I recently installed JF 1.51US and was working on lucidrem's scripts. I installed the new SPL and everything went ok but now my EXT2 will not allow me to move apps and such. It is saying thismkdir failed for /system/sd/lost+found, read-only file system EXT2 Not Mounted Can anyone tell me how to remount EXT2? I spent the last hour searching and couldnt find an answer to my question.
Click to expand...
Click to collapse
on the JF1.51 it will mount the EXT2 automatically if it exists
Oh really. So then something must be wrong with my [email protected] then. I guess I will reformat and see. It's funny b/c it worked at first when I first rooted and then I did the spl update and went into bootloader, I had to wipe and re root and that's when it started saying the it wasn't mounted. Oh well, thanks for the info. Hopefully the format will work
Please let us know what happens
It would be useful info. thanks.
Can you post the output of
Code:
ls -l /dev/block/mmc*
from either an adb shell or terminal?
From what you've said it sounds like your ext2 partition is corrupt and that the format will fix this. Or if you're running linux, run e2fsck (or fsck.ext2) on the appropriate partition to repair it.
Kinslayer81 said:
Can you post the output of
Code:
ls -l /dev/block/mmc*
from either an adb shell or terminal?
From what you've said it sounds like your ext2 partition is corrupt and that the format will fix this. Or if you're running linux, run e2fsck (or fsck.ext2) on the appropriate partition to repair it.
Click to expand...
Click to collapse
I am having the same problem as chrisrj28, and my output is:
ls -l /dev/block/mmc*
brw------- 1 0 0 179, 0 May 26 20:39 /dev/block/mmcblk0
brw------- 1 0 0 179, 1 May 26 20:39 /dev/block/mmcblk0p1
brw------- 1 0 0 179, 2 May 26 20:39 /dev/block/mmcblk0p2
Click to expand...
Click to collapse
I think the filesystem just isn't set up (I had to manually format my fat partition after running sdsplit).
Sorry if this isn't the same problem chrisrj28.
Yeah I just manually formatted the ext partition in Paragon Partition Manager.
Works fine now. I guess I didn't run the make filesystem switch in sdsplit.
Yeah thanks for everyone that tried to help. I was able to get to a cpu and just formatted my EXT2 and it worked like a charm. Something I did when rooting must have made it read only. For anyone else with that issue just reformat your partition

DDMS Error

When i try to push or pull anything it says, e/ddms the file cannot be pushed because its a read-only file system. Any help?
Mdawg112 said:
When i try to push or pull anything it says, e/ddms the file cannot be pushed because its a read-only file system. Any help?
Click to expand...
Click to collapse
You have to remount the FS in read/write mode.
With adb it's 'adb remount'.
smw6180 said:
You have to remount the FS in read/write mode.
With adb it's 'adb remount'.
Click to expand...
Click to collapse
Ha, I feel stupid now.
Mdawg112 said:
Ha, I feel stupid now.
Click to expand...
Click to collapse
Happens to everyone at times. Don't sweat it
So what do you do, if you run adb remount
and it still say's read-only system when trying to push?
been dealing with it for a few days, looked all around the forums and didn't find anything that helped :-/
jubi23 said:
So what do you do, if you run adb remount
and it still say's read-only system when trying to push?
been dealing with it for a few days, looked all around the forums and didn't find anything that helped :-/
Click to expand...
Click to collapse
Good question. Unfortunately I have no idea. Never seen it fail. theoretically there's a command line you can run in adb shell to mount the FS read/write, but I can't remember it off the top of my head.
Something like mount -o rw /dev/m3blk (as I said I can't remember the exact filesystem name). I'd do a search for 'mount -o' on the forums. It's been posted more than once and I'm too lazy to find it for you
I believe you're refering to
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
if so, tried that too :-/ still nothing
i read someone had reformatted their card on xp vs 7, so tried that to and still nothing haha
i give up
thanks btw
Yeah, I'm having the same problem as you sometimes. Other times it works. It's very strange! It annoys me. Anyone have any idea on a fix?
jubi23 said:
I believe you're refering to
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
if so, tried that too :-/ still nothing
i read someone had reformatted their card on xp vs 7, so tried that to and still nothing haha
i give up
thanks btw
Click to expand...
Click to collapse
Yeah that's the one, thanks.
Have you tried that from recovery? Are you using a2sd and if so, what ext?
Are you able to mount the card as a disk drive? Are you sure the SD card isn't going bad on you?
Sounds like you've checked anything else I would have thought of...wish I could help.
Have you tried that from recovery? Are you using a2sd and if so, what ext?
Are you able to mount the card as a disk drive? Are you sure the SD card isn't going bad on you?
Click to expand...
Click to collapse
Well i'm actually trying to flash a new recovery (all in the pursuit of installing flipz new fresh rom with ext4 haha), so was doing it from the computer
I tried using a2sd but i'm pretty sure it didn't work, because i went to ext4 and to my knowledge fresh 2.0d can't use ext4, so yea, i fail
i am able to mount the card as a disk drive and can move things back and fourth via explorer, play music, everything except this seems to be fine, it's only a few weeks old, so i really hope it's not dying
jubi23 said:
Well i'm actually trying to flash a new recovery (all in the pursuit of installing flipz new fresh rom with ext4 haha), so was doing it from the computer
I tried using a2sd but i'm pretty sure it didn't work, because i went to ext4 and to my knowledge fresh 2.0d can't use ext4, so yea, i fail
i am able to mount the card as a disk drive and can move things back and fourth via explorer, play music, everything except this seems to be fine, it's only a few weeks old, so i really hope it's not dying
Click to expand...
Click to collapse
That could be it. ext4 doesn't play nicely with ext3 based stuff. It's 'semi' backward compatible (meaning you can mount ext4 as ext3) but it seems to have some serious inconsistencies that way. I'd recommend a re-partition and then upgrade ext3->ext4 AFTER you install the new ROM.
Heh. I had all KINDS of problems restoring an ext3 based nandroid after upgrading to ext4. Had to repartition and then restore the nandroid to get it to work.
well, loaded recovery, re-partitioned my sdcard, upgraded to ext3 and left it there, still nothing
the sd card wouldnt have any bearing on the ability to adb remount.
the /system partition is stored on the phone itself, so the mount -o ..yadda yadda
remounts the /system partition in this case /dev/block/mtdblock3.
the only reason a sd card would come to play is if youre runnign a2sd, in which case it makes symlinks (shortcuts) to the sdcard, if the sdcard is formatted improperly then a2sd will either cause a bootloop, or crash and then youre phone should boot normally but you wont have access to your ext4 partition (the partition with your apps).
im not sure how to fix a problem with adb remount, perhaps try a new version of the SDK or just a clean one.
good luck
I'm wondering if there is something wrong with my mounting
When i'm in the shell
if i cd /sdcard
then do a ls
nothing is returned
I've also directly copied the recovery image from my computer to the sdcard, and attempted to run the flash_image command and it says no such file or directory
I do have usb debugging enabled and am selected to mount the sdcard, is there some other step or something i'm missing?
nenn, i had actually just a little bit ago downloaded the latest sdk on a completely different machine and still same results
Alrite, so I was able to copy the image recovery from
explorer and flash from.terminal on my phone
Although I'd prefer to work from the pc, anyone have any other possible ideas?! I'm at a loss
-------------------------------------
Sent from my HERO200

[Q] How to use ext3-sdcard?

Hi all,
i formatted my sdcard with ext3, but CM7 doesn't mount it. I changed the 'vfat' in the fstab to 'ext3', but it still dosn't mount the card. I can manually mount it with 'mount /dev/block/mmcblk0p1 /sdcard', but then I can only access /sdcard via Terminal Emulator or the adb shell. Root explorer says that it is not mounted although it is mounted. Does anybody know how to fix that?
Mister Ypsilon said:
Hi all,
i formatted my sdcard with ext3, but CM7 doesn't mount it. I changed the 'vfat' in the fstab to 'ext3', but it still dosn't mount the card. I can manually mount it with 'mount /dev/block/mmcblk0p1 /sdcard', but then I can only access /sdcard via Terminal Emulator or the adb shell. Root explorer says that it is not mounted although it is mounted. Does anybody know how to fix that?
Click to expand...
Click to collapse
Hey dude, I feel ya. I wanted to ext3 all the way, but google thought Android users would rather use fat for their sdcards so we're bound to trying to work around it. You might want to look at your sdcard permissions, check that you have "X" permissions for user, group and other, or just go crazy and do "chmod -R 777 /sdcard".
You could look into what this guy did: http://android.modaco.com/topic/308568-how-can-i-bind-mount-eg-systemsdxxx-sdcardxxx/#entry1511967
but I backed out mainly because it looks too much like more trouble than its worth.
Good luck!

[Q] Why not a "11extsd2internalsd" mod for the M?

The "11extsd2internalsd" mod is flying on other phones.
The script works on "Avstralia Deodex Mod by ZaYAC for XT907" w/initd support but not on CM.
Search "11extsd2internalsd" "emulated":
http://forum.xda-developers.com/showthread.php?p=39530248
Hit on emulated http://forum.xda-developers.com/showthread.php?p=39530248
Can someone write a flash able zip for this script?
I will upload the one from ZaYAC's "ROM" (in zip format only for the upload to take) NOT A FLASH ABLE ZIP http://forum.xda-developers.com/showthread.php?p=43220186#post43220186
Why can't someone do this for other roms on the M?
Code from the upload:
#!/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.
#xda thread url at
#Script Modified for U.S. Galaxy S3s by Zedomax at GalaxyS3Root.com to be compatible when sdcard is not inserted.
busybox mount -o remount,rw /
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
if busybox mount | busybox grep vold/179:97; then
busybox mount -o bind /data/media /mnt/external1
fi
End code
OK. I got the swap working for these stock base roms w/ initd : Rage and Flying Jelly (Rzr forums). Though it is not really a swap, the emulated portion of internal memory is rendered useless and you delete everything there. Then all storage is on your external now seen as storage0.
The Settings/Storage will judge things incorrectly now.
Also for the Flying J I had to # (COMMENT) out If statment so the then would execute.
Edit: works w/ o edits now (??).
Just be sure all media is backed up before you reboot.
Now you have all internal memory for apps.
THIS IS GREAT!!!
Thanks for that, I've been trying to mod the file for use on an Galaxy Grand Duos. It was driving me nuts. Now all I had to change was:
/mnt/external1 to /mnt/extSdCard and
/dev/block/vold/179:97 to /dev/block/vold/179:9
After rebooting, it was all fixed.
Notes
TK: more on the SD swap. Tip: wipe Dalvik and Cache from TWRP (with the Sd back in place) to fix problems if you have previously booted w/o the extSD. Just get a BIG SDcard. Basically internal SD memory is disabled (rather now used by your apps) . And Storage info is skewed.
Rosbif said:
...
Click to expand...
Click to collapse
See above
aviwdoowks said:
And Storage info is skewed.
Click to expand...
Click to collapse
I've noticed that. On the Galaxy Grand Duos, there's only 4Gb available for apps and even though I appear to be installing to the SD card, it shows up as the internal storage, so it looks like I'm going to hit the 4Gb limit with come of my larger apps still.
Sigh. Back to the drawing board...
Rosbif said:
I've noticed that. On the Galaxy Grand Duos, there's only 4Gb available for apps and even though I appear to be installing to the SD card, it shows up as the internal storage, so it looks like I'm going to hit the 4Gb limit with come of my larger apps still.
Sigh. Back to the drawing board...
Click to expand...
Click to collapse
No no. All is good. Or as good as it's going to get. Ignore the storage info rely on rootexplorer.
aviwdoowks said:
No no. All is good. Or as good as it's going to get. Ignore the storage info rely on rootexplorer.
Click to expand...
Click to collapse
I'll hold you to that!
Rosbif said:
I'll hold you to that!
Click to expand...
Click to collapse
I tried FolderMount & this is better, no maintenance.
I DO NOT KNOW WHY THIS IS NOT CATCHING ON MORE.
Stock based roms only w/initd.

How to rename file in boot partition of sdcard

This may not be possible, but it would be good if it were
Attached below is the output of the "mount" command. The sdcard has four partitions:
(root--contains the boot information, u-boot.bin, uImage, mlo, etc.)--FAT32
system--ext3
cache--ext3
userdata--ext3
When the device boots from the card, the root or boot partition is invisible. I'd like to mount that partition while the ROM is running (if possible) and rename u-boot.bin to something else like u-boot.bin.bak. Or maybe the partition is already mounted and I just need to know how to access it.
I can't see in the mount output where to try this.
Is it possible?
nmyshkin said:
This may not be possible, but it would be good if it were
Click to expand...
Click to collapse
Huh? Why would you want to do that?
Code:
# mount -o rw,remount rootfs /
# mkdir /boot
# mount -t vfat /dev/block/mmcblk0p1 /boot
# ls -l boot
Renate NST said:
Huh? Why would you want to do that?
Code:
# mount -o rw,remount rootfs /
# mkdir /boot
# mount -t vfat /dev/block/mmcblk0p1 /boot
# ls -l boot
Click to expand...
Click to collapse
Oh so excellent! A simple mv command and the device will boot into the stock OS instead of the sd ROM!!! And from the stock OS, a simple rename of the u-boot.bin.bak file and the device will reboot into the sd ROM. A crude "boot menu" of sorts without removing the sdcard to effect the change. To be done by two little apps, one for each ROM.
That's why I would want to do that. Thank you!!
Hmm...is there any reason to unmount the rootfs before rebooting? And is the mkdir /boot permanent or does it need to be executed each time?
Edit: the answer to my second question seems to be "no" as after a reboot I had to execute the mkdir /boot command again.
But the desired effect is not achieved. After supposedly renaming u-boot.bin to u-boot.bin.bak a reboot resulted in the sdcard ROM booting up again. A check of the files in the boot partition (as above) shows u-boot.bin.bak so it should not have been able to find the file to boot from and therefore should have booted from the internal OS.
So...after powering down completely and removing the sdcard to take a look at the active (boot) partition, I find that u-boot.bin has NOT been renamed, even though the file listing showed it as such. That explains the reboot back into the sdcard ROM, but not much else.
Edit2: I see that a "boot" folder has been created in the root directory of the sdcard and it contains the files that are in the boot partition, plus a few I've not seen before. Even after a reboot this folder contains the renamed u-boot.bin file but it doesn't do me any good there.
So, I'm confused.
You have an SD card and the NST is booting from there, right?
You want to make it so you can select between SD card and internal?
The instructions I gave were for mounting the internal u-boot.bin
Since the SD card is preferred by the loader you want to rename the u-boot.bin on the SD card.
And you probably don't even want to do that.
The mlo is the first thing loaded, you probably want to incapacitate that instead.
This is for the SD card:
Code:
# mount -t vfat /dev/block/mmcblk1p1 /boot
Renate NST said:
The mlo is the first thing loaded, you probably want to incapacitate that instead.
This is for the SD card:
Code:
# mount -t vfat /dev/block/mmcblk1p1 /boot
Click to expand...
Click to collapse
Yes! Things were a little dicey at first because I had inadvertently incapacitated the stock OS during my fumbling around by renaming the internal u-boot.bin (oops). Fortunately the device was forgiving and allowed me to remove the sdcard without any apparent bad effects, rename u-boot.bin.bak again, reinsert the card and patiently try to force the power key to do it's stuff. I finally got a reboot to the card, fixed the internal boot issue and tried again.
It works!!!! But you knew it would
I agree, renaming MLO makes more sense (and works). I knew that was first in line but became a little fixated on u-boot.bin because my original search began with a dual boot scheme used for the Nook Color which involved patching a menu system into u-boot.bin. Way out of my league, but my mostly fruitless reading eventually led me to my rather more pedestrian idea.
In a way, it makes more sense in the context of the NST which most people don't turn off. As long as there is a way to move back and forth between the emmc and sdcard OSes without swapping cards or shutting down completely, that's what I was hoping for at a minimum. I think this will do nicely.
Thanks again for your help. Now back to work on this beast...

Categories

Resources