Using 2 Ext4 partitions on SD instead of one Ext+fat32 - Optimus One, P500, V General

My sdcard(class 4 8gb sandisk) is causing problems with fat32 fs...i use debian all the time and wud like to have a much advanced fs like ext4 for saving my music,videos,pictures etc instead of fat32...how can i achieve taht...Does android use a fstab or something for mounting on boot ???

I'm quite sure android uses fstab for mounting, you just need to set the proper mounting option on your FS to force it to check fstab options. I have one question(since I don't use a linux machine), can you access your ext(2nd) partition(if you have one) when you connect your phone to the PC using debian?

Yep,Android uses fstab to mount all.

anybody interested in setting it up i dont have the requisite knowhow

I have not toyed with fstab myself... but I did find this page which seems to have want your looking for.
http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/
It isn't exactly what your explaining, BUT seems to go through the commands needed for what you are wanting to try.
Just remember to back up! Good luck!
Sent from my LG-P500 using XDA App

Instructions:
-Suggested at least fat32 partition to be 1gig and the rest to your ext partition. Also, try to use root explorer for everything else. Must have init.d support.
1. On your SD card, make a folder to serve as a door/portal to access your ext partition files.(When testing this, I just used the default "/sdcard/media" folder)
2. Make a blank text file and name it as "11usext"
3. Using root explorer, edit the file and add this line inside it:
Code:
#!/system/bin/sh
busybox mount -t auto /dev/block/mmcblk0p2 /mnt/sdcard/media
change media to the folder that you just made on step 1. Exit and save.
4. Using root explorer move this file to /system/etc/init.d
5. Again using root explorer, change the permission to "rwxrwxrwx"
6. Reboot and play. This would allow you to access your ext partition through the /media or the folder that you have created.
If this does not work, then you should give more details on what setup you are running.

ungaze said:
Instructions:
-Suggested at least fat32 partition to be 1gig and the rest to your ext partition. Also, try to use root explorer for everything else. Must have init.d support.
1. On your SD card, make a folder to serve as a door/portal to access your ext partition files.(When testing this, I just used the default "/sdcard/media" folder)
2. Make a blank text file and name it as "11usext"
3. Using root explorer, edit the file and add this line inside it:
Code:
#!/system/bin/sh
busybox mount -t auto /dev/block/mmcblk0p2 /mnt/sdcard/media
change media to the folder that you just made on step 1. Exit and save.
4. Using root explorer move this file to /system/etc/init.d
5. Again using root explorer, change the permission to "rwxrwxrwx"
6. Reboot and play. This would allow you to access your ext partition through the /media or the folder that you have created.
If this does not work, then you should give more details on what setup you are running.
Click to expand...
Click to collapse
That's a quite dirty implementation. All he want's is an ext4 partition mounted as /sdcard. I want to do the same, but right now I'm messing with the internal fs. I'll look into it.

That's a quite dirty implementation.
Click to expand...
Click to collapse
Dirty it might be(I even tried a dirtier one), but that's all he's got at the moment. If you have a better solution(even just a rough plan), please do share. Maybe we can exchange knowledge on stuff like these.
Using 2 Ext4 partitions on SD instead of one Ext+fat32
Click to expand...
Click to collapse
Would mean that no Fat32 partition exist, and I've never heard of anything like that.
I have one question(since I don't use a linux machine), can you access your ext(2nd) partition(if you have one) when you connect your phone to the PC using debian?
Click to expand...
Click to collapse
And since no one answered this, I have no idea how you could transfer files to your phone without using card readers.

ungaze said:
Dirty it might be(I even tried a dirtier one), but that's all he's got at the moment. If you have a better solution(even just a rough plan), please do share. Maybe we can exchange knowledge on stuff like these.
Click to expand...
Click to collapse
Probably it involves messing with the init.rc (and I think that involves messing with boot and recovery images, but, I'm not sure) or init.d scripts or fstab. Anyway, I'm not sure, but it should be possible.
ungaze said:
Would mean that no Fat32 partition exist, and I've never heard of anything like that.
Click to expand...
Click to collapse
Yes. The /sdcard partition would exist, just not fat32 formatted.
ungaze said:
And since no one answered this, I have no idea how you could transfer files to your phone without using card readers.
Click to expand...
Click to collapse
Linux systems can read and write to ext4 partitions without problems. In fact, it's a linux filesystem. I had problems once when I had a sd_ext partition (for Apps2SD), because both partitions would get mounted when using mass storage mode, while Android only unmounts the /sdcard (fat32) partition, leading to file corruption (because of the same partition being mounted on both systems at once).

We could create the partitions using gparted or cfdisk on a pc. I'm not sure, but maybe simply mounting it with different params (like the filesystem type and other options) at /sdcard would do the trick. Everything else that follows would be easy.

I've been doing some testing and research.
On recovery side:
I've done a little modification in Mik's ClockWork recovery to make it accept ext4 and vfat as valid file systems for the first partition on sdcard. It involves just a little change on /etc/recovery.fstab file, but then you need to rebuild the recovery image.
This is working fine.
On the OS side:
It's not an easy mod. It involves patching the vold (volume manager) and recompiling. There are some proposed patches to Cyanogenmod, but I don't know if it's been accepted and if it made it to Miks CM7 port.
I'll do some tests and post results.

ilarrain said:
I've been doing some testing and research.
On recovery side:
I've done a little modification in Mik's ClockWork recovery to make it accept ext4 and vfat as valid file systems for the first partition on sdcard. It involves just a little change on /etc/recovery.fstab file, but then you need to rebuild the recovery image.
This is working fine.
On the OS side:
It's not an easy mod. It involves patching the vold (volume manager) and recompiling. There are some proposed patches to Cyanogenmod, but I don't know if it's been accepted and if it made it to Miks CM7 port.
I'll do some tests and post results.
Click to expand...
Click to collapse
This got my interest

Mik's CM7 (beta 6.2) recognizes and mounts the ext4 partition just fine.
BUT:
As vfat is a non posix fs, there wasn't any need for the OS to manage permissions, so it's a mess.
Applications on the SD card (I'm not using Apps2SD or Data2SD) don't load, internal applications can't be moved to SD, and many apps can't store data on the SD, even I've set read+write permissions on all files and directories (chmod -R 777 /sdcard/). I have no idea why. I'm stuck.

Related

[Kernel/OS] Firmware 2.1.04 on EXT4, Internal or SD, OC Kernel

I made this to tide myself over until $auron can finish UrukDroid 0.6. This is a combination of the stock Archos 2.1.04 firmware, Ardatdat's Overclocked Kernel, and a manual EXT4 Conversion. It is permanently rooted and includes SuperUser. My main reason for making it was to enable read/write access to the filesystem, which rooting DOES NOT do on the stock Archos firmware, as the squashfs will still be mounted read only by /etc/mountpoints. Also, EXT4 is much faster than the compressed squashfs Archos uses. Quadrant gives ~2200 with the data partition converted to EXT4 as well, ~1800 without conversion. I have already updated Busybox to a fully compiled version, 1.16, another thing Archos decided to "secure" despite the supposed Open Source status. I have NOT edited the .hosts file to block ads, as I believe the app developers deserve to make some money, you'd be amazed how little they make, but you can do it yourself without Archangel scripts now, as the filesystem will be read/write again.
I designed it on an A101it, but it should work on any Gen8 with internal flash storage. A70H users, I can't remember your block allocations, it may work fine, but I'll need someone to post the storage layout of /dev/block/ to be sure.
For the power users, here's a quick install outline: First, make a second partition on your storage/sdcard in EXT4, extract the rootfs.tar.gz to it, and flash the appropriate initramfs and zimage. Pretty easy.
For the rest of you(probably most of you):
There is only one short step in Linux, which is setting up an EXT4 partition on your Internal Storage or your SD Card. You must make it as a second partition, not 1st, 3rd, or anything else. This means you can still use it as a storage device as well as running Android. I find it incredibly simple, and can be done in less than 3 minutes, but I will be relying on you guys to tell me what you don't understand, and I will update the instructions as needed.
This can be run off the SD Card or the Internal Storage, both versions are included in the download. It will use the existing data partition if you already have the SDE installed and 2.1.04 firmware. Otherwise, you will need to flash the SDE, which erases your data, so please use Titanium Backup first if necessary.
Step 1:
Download my files:http://www.multiupload.com/HR6SRRR8P8
And install the SDE from Archos: http://www.archos.com/support/download/firm_dev/firmware_archos_android_gen8.aos.
Step 2: Boot into stock Android and connect to a Linux PC. If you do not have Linux, download Tuxboot and use it to create a GParted Live Disk:http://gparted.sourceforge.net/liveusb.php
Step 3:
Mount your Internal Storage/SD Card from the Archos. It should now show up in GParted on the Linux PC, make sure you have the correct device selected, it should be called Archos A101T(make note of the location, e.g. /dev/sdb). Resize your existing partition with GParted, leaving about 300MB at the end of the Internal Storage/SD Card. Make a new partition in the empty space, and select ext4 as filesystem. Apply Changes. Now open a terminal, elevate yourself to root by typing
Code:
sudo -s
and format the new partition by typing
Code:
mkfs.ext4 -O ^huge_file /dev/sdb2
Substitute "sdb" for whatever your device location was in GParted. The "2" on the end of "sdb" denotes that it is the second partition. Do NOT format "sdb1" or any other "sd"s. Mount the new partition by opening Nautilus or any other file manager and double clicking on the "300MB Filesystem" entry on the left. Untar the rootfs.tar.gz from my files with the Archive Manager, it works just like winzip or winrar, into the root of the new partition. Eject the device from Linux, then reboot into the Developer Menu by holding vol- or vol+ while booting.
Step 4:
Flash the initramfs.cpio.gz and the zimage from my files. Use the files from the "internal" folder if you are running from Internal Storage, or the files from "sdcard" if you are running from the SD Card.
Step 5:
Use the Dev Menu to boot into Developer Edition. Let me know about any bugs. After I removed the Android Boot option from the Dev Menu, I had a few strange loops of the Archos animation while booting, but it did boot, and function, just fine.
Thanks go to Ardatdat for the kernel, Archos for the crappy "securing" of the squashfs, and $auron for motivating me to get back into development.
Hi msticninja ,
I did it It seems so smooth. I used my internal storage. But linux steps were not so simple for me I used a Fedora 14 VMWare image.
I'm at work so I can't play with it but it seems stable and it can awake.
Quadrant (I know it's not accurate) score is about 1900 (internal and ext4).
I think that you should add some descriptions about linux steps (for noobs like me).
Thanks...
PS: Did I move my DATA partition to EXT4? (I did all steps you wrote). If no how can I do?
Nice work! I'll be trying to add more instructions for the Linux section for the next couple of days.
Your data partition is still EXT3, I haven't found a very easy way to convert it yet. Basically, I made another partition on the Internal Storage, copied the data partition there, and flashed a new initramfs to boot off the new data partition. Then you fdisk and format the original partition from a terminal in the Archos or ADB, copy everything back, and flash ANOTHER initramfs to use the original, now EXT4, partition.
So far, I don't think the performance gain for the data partition is worth all that work.
It works and installs well but your guide how to install it is not complete. For example, I had to manually maintain write permissions of the partition and sudo is needed by the mkfs.ext4 -O ^huge_file /dev/sdb2
Hondaracer said:
It works and installs well but your guide how to install it is not complete. For example, I had to manually maintain write permissions of the partition and sudo is needed by the mkfs.ext4 -O ^huge_file /dev/sdb2
Click to expand...
Click to collapse
Sorry, i automatically elevate permissions when I do stuff like this. I've added sudo to the instructions. As far as manually maintaining the partition permission, what did you have to do there?
msticninja said:
Sorry, i automatically elevate permissions when I do stuff like this. I've added sudo to the instructions. As far as manually maintaining the partition permission, what did you have to do there?
Click to expand...
Click to collapse
I had to type this: sudo chown -R username:usergroup /media By the way thanks for the work you've done
Hondaracer said:
I had to type this: sudo chown -R username:usergroup /media By the way thanks for the work you've done
Click to expand...
Click to collapse
If that was before using mkfs.ext4, then that is strange. After mkfs though, the owner should be root. I should point out that the rootfs.tar.gz should be extracted as root, which means you have to open the archive manager from a terminal. I need to find an easy process that will work on all distros, as I don't know how many have nautilus installed.
Thanks for your replies, this is much needed feedback.
msticninja said:
If that was before using mkfs.ext4, then that is strange. After mkfs though, the owner should be root. I should point out that the rootfs.tar.gz should be extracted as root, which means you have to open the archive manager from a terminal. I need to find an easy process that will work on all distros, as I don't know how many have nautilus installed.
Thanks for your replies, this is much needed feedback.
Click to expand...
Click to collapse
I had to do this to be able to write the rootfs to dev/sdb2. But I must say I did a reboot before I copied the files cause Ubuntu started to act very weird. And for the beginner I'd might be good to mention that you have to unmount in GParted.
I've tried it and feels slower than Uruk 0.6RC2 on Scandisk SDHC 8GB Class 4 (without OC).
Thank you for your great work!
chisco said:
I've tried it and feels slower than Uruk 0.6RC2 on Scandisk SDHC 8GB Class 4 (without OC).
Thank you for your great work!
Click to expand...
Click to collapse
I'm not surprised. This is the stock firmware with none of Uruk's enhancements, other than ext4 and a new kernel. As i said, this is to tide people over until the official Uruk thread gets 0.6. You're already on the beta 0.6, so there's not much need for my firmware.
I just wrote an automatic install script. All you have to do is copy a file to your internal storage or sd card, and flash the initramfs/zimage in the Dev Menu. This one will replace the current Archos partition so you won't lose any space on your storage device. Should be uploaded tonight.
I tried this method with last OC Kernel (11 FEB): very good... With this method, we use same data as for stock ROM, so no need to reinstall all apps...
Thanks.

[Q] Application/Data partition resize?

Hi.
I've rooted my A70s with chulri's kernel and it seems to work ok.
My next goal is to get more app room ... so I guess I need to resize the app/data partition.
I've thought that having my internal storage formatted on ext4, it would be possible to ln the /data folder to /storage/data without problems, but then I should create a boot script for that. The question is... can I do this with my current root status? What would be the way to do it? I'm don't know enough of linux os to make it on my own.
If the system can't be fooled with a ln, then is there any way to resize the data partition, even if I have to backup/restore my current data?
I don't want to use Urukdroid, since all the versions I tried were very unstable on my machine.
Cheers!!
search the forum: http://forum.xda-developers.com/showthread.php?p=14710945#post14710945
Follow chulri's method, or repartition your internal storage in Linux, mount it on the archos, and copy the data there. Then edit init.rc and change the data mount line. If it gets mounted in the kernel, you'll have to umount it first to remount it to the other partition.

[Q] ext4 pain

First - I'll explain why I want this - my SD Card is a mess. So I decided to reorganize the entire folder structure using symlinks. Unfortunately no version of FAT doesn't support symlinks - so I decided to change the file system to either NTFS or ext4. I have basic Linux knowledge so I'm not able to change anything in the kernel, but because Gingerbread supports ext4, I have found a way to mount an ext4 sdcard. I basically change the default file system in vold.fstab (I replace "auto" with "ext4"). All seems to be working fine, but when I restart the phone I am unable to mount the sdcard again - I don't even get prompted by Android, it just doesn't detect my card. But whenever I dual-mount my card (using Root Toolbox) Windows detects my card (and reads it using Ext2Fsd). I know it probably has something to do with init scripts, but I haven't found anything about file systems in the any of the scripts in the init.d folder. I have found that the modified official Gingerbread kernel supports ext4 sd cards, but I want to know how to use the card with other kernels.
original vold.fstab:
Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.1/mmc_host/mmc0
modified version:
Code:
dev_mount sdcard /mnt/sdcard ext4 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.1/mmc_host/mmc0
I am using CyanogenMod 7.1 (Mik's version, beta 6.6.1), Franciscofranko's latest 2.6.35.14 kernel (16 august version) and Franko's tweaks if that is of any difference.
Well, sorry... but... eh.
State what you are after wrt "organizing" and someone can suggest a saner way to do it.
NTFS in R/W is only doable in a reasonable way with a FUSE-based driver, not the in-kernel one; ext4 or whatever other ext on the other way is a stupid idea when your computer uses Windows.
dr.notor said:
ext4 or whatever other ext on the other way is a stupid idea when your computer uses Windows.
Click to expand...
Click to collapse
I know that, but I'm using the card on the phone, not on my computer. And by the way, I have a full-featured Ubuntu Server (on VMware Workstation) for everything that Windows isn't able to do.
It isn't much of a cataclysm that I can't mount ext4, but I'm trying to understand why doesn't my method work.
Ianis G. Vasilev said:
It isn't much of a cataclysm that I can't mount ext4, but I'm trying to understand why doesn't my method work.
Click to expand...
Click to collapse
The stuff using vold.fstab assumes that the partition is FAT and not a random other filesystem.
The old vold supports vfat/ext2/ext3 filesystem, but the new vold only supports vfat filesystem. This is because Android frameworks does not support sdcard mounted on other filesystems. Even we can forcely mount an ext2/ext3 filesystem as the sdcard, it doesn't work well in some situations. So we decide to stop supporting them unless AOSP changes.
Click to expand...
Click to collapse
http://www.android-x86.org/documents/sdcardhowto
N.B. "Old" there means pre-Froyo
In case you insist that partitioning the SD card to ext? is the right way of "organizing", you need to mount that stuff via some initscript and be prepared for random stuff to break.
Thanks for the reply

Mounting the second partition of SDCARD as internal memory

Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
My device is i9003 and it's running on MIUI at the moment. By default MIUI didn't detect my external SD or my internal SD but after editing "vold.fstab" I was able to mount the first partition of my external SDCARD as external memory and everything was good, I could finally use the camera and pretty much do everything else.
But I was still unable to mount the second partition of my external SDCARD as my internal memory which meant none of my messages could be saved and the phone would pretty much go back to factory settings after a reboot, this apparently is because the /data partition (present on the internal memory) stores all the user data such as the time, the theme I'm using, etc and not having a /data partition meant none of these settings were really saved.
Having no internal memory also means I cannot install any apps such as Link2SD.
Moving on, after many hours of googling I found out that it might not be possible to mount the internal memory using "vold.fstab" and the only way to do it could be by mounting the memory manually during init.
So here's what I want again, I want to use the second partition of my external SDCARD as internal memory, this is likely to solve all my problems and make my phone usable again.
Thanks for all the help, appreciate it.
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
kuisma said:
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
Click to expand...
Click to collapse
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
EDIT: would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img? In case it's the latter, I'm going to need help doing it.
PhantomPhreek said:
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
Click to expand...
Click to collapse
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
kuisma said:
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
Click to expand...
Click to collapse
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
PhantomPhreek said:
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
Click to expand...
Click to collapse
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
kuisma said:
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
Click to expand...
Click to collapse
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
EDIT: Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?
PhantomPhreek said:
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
Click to expand...
Click to collapse
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
kuisma said:
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
Click to expand...
Click to collapse
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
PhantomPhreek said:
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
Click to expand...
Click to collapse
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
kuisma said:
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
Click to expand...
Click to collapse
haha, I used CWM to create the partitions initially, but then I used a software called MiniTool, works well. Can I get you to to do it?
PhantomPhreek said:
Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
Click to expand...
Click to collapse
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
kuisma said:
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
Click to expand...
Click to collapse
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
PhantomPhreek said:
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
Click to expand...
Click to collapse
FAT32.
kuisma said:
FAT32.
Click to expand...
Click to collapse
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
PhantomPhreek said:
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
Click to expand...
Click to collapse
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
kuisma said:
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
Click to expand...
Click to collapse
What bugs me is the fact that the external SD is not detected, from what little knowledge I have, external SD is unrelated to the internal SD which I currently have problems with, meaning it should be detected without a problem.
Also I have to add, CWM doesn't detect my external SD right away, when I go to recovery and go over to "Choose zip from sdcard" it says "E:Can't mount /sdcard/". The solution I've found coincidentally is to go to "mounts & storage", mount "/emmc", pull the SDCARD out plug it in again and then "mount /sdcard" this works perfectly and I'm able to flash roms from the sdcard.
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
kuisma said:
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
Click to expand...
Click to collapse
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
PhantomPhreek said:
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
Click to expand...
Click to collapse
The files you mailed me does not correspond to the ROM you refereed.
The /etc/fstab show that /data is mounted as an rfs file system, not ext4. So either format partition #3 on the sdcard as rfs (Samsung proprietary), or edit /etc/fstab and change "rfs" to "ext4". I'd prefer the later, assuming your kernel supports ext4. Else use ext3.
Code:
/dev/block/mmcblk0p3 /data rfs rw
But you can't have flashed the ROM you told me you did. It excepted an ext4 file system ...

[Q] Space on SD card

Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
I believe you used a low level utility like dd or similar to flash an image onto a partition.
You need to run fsck on that partition, then run resize2fs to expand the ext2/3/4 partition.
Let's say your partition is /dev/block/mmcblk1p1
You would do (in a terminal):
adb reboot recovery
adb shell
# umount /dev/block/mmcblk1p1
# e2fsck /dev/block/mmcblk1p1
# resize2fs /dev/block/mmcblk1p1
After that, your partition will get expanded to whatever size you made it.
It takes a while so be patient. The larger the partition, the longer it will take.
Zenile said:
Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
Click to expand...
Click to collapse
if you got a prebaked image of a bootable cm card from somewhere, then it usually has 4 partitions on it that were set to the sizes the author of the card specified.
/boot
/system
/data
/sdcard
You would need to put the card in a PC, and use a disk partitioning utility to resize the partitions
some of the images include additional flash files that you install to expand the card's partitions for you. (succulent's), but
you have to do it as you install for the first time.
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
mikeataol said:
...
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
Click to expand...
Click to collapse
The write-up is also posted on XDA at http://forum.xda-developers.com/showthread.php?t=2098419. It was written back in the days of CM10.1, so to use it for CM10.2 or CM11:
Obtain the boot files: MLO, u-boot.bin, and flashing_boot.img -- as well as the files boot.img and recovery.img, from the /boot partition of the pre-made SD CM image. Make sure that MLO is the first file to copy to the freshly made /boot partition.
Substitute in the appropriate ROM and Gapps zip files corresponding to the particular CM build of interest.

Categories

Resources