HowTo a2sd in dsixda's 2.3.3 rom - Nexus One Q&A, Help & Troubleshooting

I have installed dsixda's 2.3.3 gingerbread rom and wanted to get it working with a2sd. How ever when I partitioned my sdcard using clockworkmod recovery, instead of getting more space, I started getting errors saying "Insufficient storage" even when my internal storage has 20MB free. I searched around and found out more about a2sd.
running "a2sd check" told me that it can not mount the ext partition.
a2sd partlist showed that the rom supports ext2 and ext3 but not ext4.
I don't know how to check the filesystem of a partition on android. So, I popped out the sdcard and loaded it in my gentoo laptop ( ubuntu works too).
Sure enough "mount" command showed me that the partition is ext4.
"umount /dev/mmcblk0p2 && mkfs.ext3 /dev/mmcblk0p2" reformatted the partition to ext3(if you are worried about write cycles used by the journaling on flash memory use mkfs.ext2)
when I brought it back to my n1, it still didn't work and "a2sd check" told me to "a2sd reinstall" and that actually did the trick.
PS: This probably serves better in the thread but I'm not allowed to post in the sub-forum

Related

[MOD] data and dalvik to SD (ext partition)

OK, I'm going to stop polluting other threads with my stuff.
This should help make sure I can keep up on the discussions and provide support for people trying to use my ZIPs and/or scripts.
NOTE: This version requires JACs kernel and init.d mods. Flash his stuff, then flash mine. All this will be integrated at some point and any other dev is welcome to integrate my stuff with theirs.
In addition to the JAC kernel, you need an ext partition on the EXTERNAL SD card. DO NOT USE ROM MANAGER TO PARTITION. You will get into a boot loop and will have to Odin back to stock. For partitioning, you may use "adb shell" in clockwork recovery, an old G1/Mytouch with Amon-Ra/Clockwork, a computer with a card reader and GPartd, Paragon, etc.. If you do it with fdisk, don't forget to format the partitions, here are some sample commands.
This will format an ext2 partition.
Code:
/system/bin/mke2fs /dev/block/mmcblk1p2
Convert from ext2 to ext3
Code:
/system/bin/tune2fs -j /dev/block/mmcblk1p2
Convert ext3 to ext4
Code:
/system/bin/tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk1p2
fsck, any ext version. Do this when you are done converting between types.
Code:
/system/bin/e2fsck -fpDC0 /dev/block/mmcblk1p2
For all of the above, make sure the partition isn't mounted with "mount". You also have to have already flashed either this ZIP, or my e2fsprogs-ext4 ZIP for the files to be installed in /system/bin.
This version will clean up older versions that I know about. It will remove any use of the playlogos hack, and the older version of my script that JAC included in his kernel.
Quadrant - 1722. I have also not seen any lag from this change. I've tried some apps that make heavy use of the database, and so far it's performing quite well. If you do see problems, I suggest fsck on the ext partition, and perhaps formatting it, to ensure it's nice and clean.
Please note that benchmark results will vary based on a large number of factors beyond my control. Try with a clean phone, no background apps. A faster SD card will help as well. I am using an older Transcend 8GB Class 6 that I used to use on my G1. It doesn't help that the free Quadrant tests lots of stuff, not just activity on /data/data and such.
To see if it's working, open a shell and type "mount". You should see entries like this:
Code:
/dev/block/mmcblk1p2 on /sd-ext type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/dalvik-cache type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/data type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
Added data-only ZIP and the disable/revert ZIP.
Added auto-partition ZIP to create 1GB ext3 partition automatically. Note that this will delete ALL SD contents.
Added old-style enable-dc2sd for users of the auto-partition script. Do not use for JAC kernels, use the current dc2sd instead.
Changelog:
8/9/2010: Added loopback style version, should find prior versions and remove them, copying your data from the /sd-ext partition.
v2.
Compatibility fix for JAC -6 kernel.
v1.
Added e2fsprogs w/ext4 support to the ZIP
Better integration with init.d layout
On boot fsck to ensure that the ext partition is kept clean
Automatically copy files if /data has larger directories than /sd-ext
Test versions that should fix busybox to work with the newer JAC kernels. -loop uses the loopback filesystem method (RyanZA style). The other one is for an ext partition on the external SD card.
Feel free to post direct links or links to the kernel thread.
For some reason, the convetr to ext4 command isnt working for me.
Just says "Tune2fs 1.41.6" then back at # prompt
GREAT RESOURCE - Deserves a sticky just for the conversion syntax
EDIT: Maybe not, it said mounted as an ext3 before, now it says ext4
EDIT2: SUCCESS!!!!! EXT4 gives a major boost to the Quadrant score - 1531. WAY better than the~1100 i was getting before. Stupid G1 didnt actually convert ext3 to ext4, even though it said it did. Thanks!
Not that I'm stressin over Quadrant scores, but I just dropped ~100 (previous was 1497) after flashing this. Ah well.
Hmmm, before applying this script, I was just using JAC's v5 kernel, which worked fine, but after applying the OP's script, I cant backup in Clockwork (again lol).
It doesnt seem to mount /data and /datadata, as it only backs up /system and errors out on the other two. Any idea why?
EDIT: The error is really random, Ive now had 2 successful backups, 2-3 that failed due to mount issues, and 2-3 that failed due to MD5 issues. I would like to narrow down the possibilities, and I attempted a restore to stock, rooted, and then used JAC's kernel, same issue occurs (did not use your newest script). That being said, I dont think its your script. (stumped)
When converting to ext4 it said "please run e2fsck on the filesystem"
EDIT: Ran "mount" and it shows same messages you do. So it worked
LovellKid said:
When converting to ext4 it said "please run e2fsck on the filesystem"
EDIT: Ran "mount" and it shows same messages you do. So it worked
Click to expand...
Click to collapse
It's supposed to say that. Do it.
Glad it's working for some of you. As for nandroid, no idea. I'll install jac latest and check it out. Can't think of much I could have done to it though, I can't mod the ramdisk this way.
+1 on the nandroid, I went back and tried and couldnt. Also, tried to flash anamolous deodexed ROM and wouldnt. Gave errors e: cant mount /dev/block etc and failed. Could this be related?
LovellKid said:
+1 on the nandroid, I went back and tried and couldnt. Also, tried to flash anamolous deodexed ROM and wouldnt. Gave errors e: cant mount /dev/block etc and failed. Could this be related?
Click to expand...
Click to collapse
I doubt it, my stuff doesn't run in recovery, at least I don't think it will. I've never seen it run. I'll look into it, but it sounds like the jac mod might have an issue with nandroid right now.
There was a similar issue on the g1 with cm6. I wonder if that fix will work here...
Could you also post the Just DATA, and revert scripts in this thread please
Also, what would be the proper flashing order for just data?
1. JAC init.d
2. reverse
3. Just data
Or do I have to flash init.d, apply kernel, then reboot and flash reverse then just data?
The_Chrome_Coyote said:
Could you also post the Just DATA, and revert scripts in this thread please
Also, what would be the proper flashing order for just data?
1. JAC init.d
2. reverse
3. Just data
Or do I have to flash init.d, apply kernel, then reboot and flash reverse then just data?
Click to expand...
Click to collapse
Added revert and data-only to the OP.
If you don't have any sd-ext hack installed right now:
1. JAC init.d
2. data-only ZIP
3. reboot to download mode and flash the JAC kernel
If you already have dc2sd installed:
1. Revert ZIP
2. JAC init.d ZIP
3. Data-only ZIP
4. reboot to download mode and flash the JAC kernel
If you already have the kernel and the JAC init.d:
1. Revert ZIP
2. Data-only ZIP
I am trying to revert this fix, so I can try the new hack involving a virtual EXT2 partition. I tried the revert, and I manually deleted the a2sd and dc2sd files in init.d, but it rebuilds data when I reboot. ANy ideas?
zimphishmonger said:
I am trying to revert this fix, so I can try the new hack involving a virtual EXT2 partition. I tried the revert, and I manually deleted the a2sd and dc2sd files in init.d, but it rebuilds data when I reboot. ANy ideas?
Click to expand...
Click to collapse
You likely have a script in /system/etc/init.d doing it, or you didn't clean the old playlogos stuff up.
FWIW, I'm working on a similar way of doing it, but with ext4 and a proper init script. I don't like using ext2 for this stuff, too easy to corrupt it.
Does your new loop script require an sdcard with ext 4 partition or does it use the internal sd card?
ttabbal said:
You likely have a script in /system/etc/init.d doing it, or you didn't clean the old playlogos stuff up.
FWIW, I'm working on a similar way of doing it, but with ext4 and a proper init script. I don't like using ext2 for this stuff, too easy to corrupt it.
Click to expand...
Click to collapse
Thanks for your work! I found your dc2-loop-v1 script. Will play w/ that until you come out w/ something better. Is EXT2 really that fragile in terms of corruption when it is virtualized within a journaled file system (which I believe RFS is)
frank707 said:
Does your new loop script require an sdcard with ext 4 partition or does it use the internal sd card?
Click to expand...
Click to collapse
This loop version doesn't use an ext partition. Just the loopback mount. It will copy the files from an ext partition if you have applied that hack.
zimphishmonger said:
Thanks for your work! I found your dc2-loop-v1 script. Will play w/ that until you come out w/ something better. Is EXT2 really that fragile in terms of corruption when it is virtualized within a journaled file system (which I believe RFS is)
Click to expand...
Click to collapse
Most file system journals don't help with the data just the structure. Rfs rides on vfat, so I doubt it's worth much that way.
Gave the dc2-loop script a shot, to convert from the /SD-EXT method to this new ext4 container method. It creates the container correctly, but never seems to copy everything over. All my apps act as if i've never started them up, so Data isnt getting copied over correctly.
EDIT: Tried again, the dc2-loop script def doesnt work, and I have no idea why. It looks perfect (code-wise), but for whatever reason doesnt end up working properly
can't get your loop script working. every other one i have been able to run flawlessly. i just flashed the oc kernel by jac. any further instructions or pre reqs?

[Q] HELP! cannot convert EXT2 to EXT3

I have created EXT2 partition of 1024 GB, after that try to convert from recovery (Amon_RA) to EXT3 and got no errors.
On the nexus I see:
/dev/block/mmcblk0p2 on /sd-ext type ext2 (rw,noatime,nodiratime,barrier=1,data=
when try to convert using command shell - adb shell sdparted -ufs ext I got error that the partition is already EXT3
It's very possible that the partition is already EXT3, but the ROM you're using doesn't recognize it correctly.
What command did you use?
mount, im with MIUI rom but also had this with CM nightly
I use EXT2 and it works fine with MIUI or Darktremor Apps2sdext
britoso said:
I use EXT2 and it works fine with MIUI or Darktremor Apps2sdext
Click to expand...
Click to collapse
I know, everything works fine but my partition is EXT3 and recognized as EXT2 by the ROM
Try to take out the card and read by any Linux PC, check that the EXT3 is indeed valid.
If yes - disregard the mount message. Might be some Toolbox issues.
I've just checked my own report, and unsurprisingly, mount reports my EXT3 as EXT2. No ill effects, though. Using Apps2EXT for a long while now. And I'm on Enomther's, and just checked - Busybox 1.17 mount does the same (lack of) recognition.
Jack_R1 said:
Try to take out the card and read by any Linux PC, check that the EXT3 is indeed valid.
If yes - disregard the mount message. Might be some Toolbox issues.
I've just checked my own report, and unsurprisingly, mount reports my EXT3 as EXT2. No ill effects, though. Using Apps2EXT for a long while now. And I'm on Enomther's, and just checked - Busybox 1.17 mount does the same (lack of) recognition.
Click to expand...
Click to collapse
Will check this, thanks

Keep losing sd ext

I created an sdext with rom mgr and usaully take it from 2 to 3 with amon ra. Confirm ext 3 with partition tool.
Lately I have lost ext three times. Not sure why.
I have used DT and went to a rom that has auto a2sd and maybe that did it. Don't know if DT has been reinstalled off of one the roms I flash between. Next time I opened the Jave app to see a blank sdcard. Deleted that app. This time I opened Quick boot and and went into CWMod recovery and did a basic bu. Bu completed but could not boot, hung on X. Saw that sdext wont mount.
Restore seems to go ok, but at bottom of recovery screen it says:
E: Can't mount /dev/block/mmcblk0p2
(File exists)
Error mounting /sd-ext/!
Skipping format...
E: Can't mount /dev/block/mmcblk0p2
(File exists)
Can't mount /sd-ext/!
Third time now and wondering what might be causing it.
I have sdformatter and can make another ext 3 partition and copy sd backup from pc to phone. Did that last time. Maybe rom mgr has been having issues. I don't do anything with rm I always boot into recovery. May need to go to amon_ra 1.9a full time.
Maybe stop using sdext and try ModInstallLocation, but heard that was no longer in Market.
Under MyPhone with MIUI .5 it shows sdext, but empty
MIUI .5 did load, don't know why it did and MicroMod 2.10 didin't, maybe too much mem used in the desire rom.
Under Quick System it shows ext as 458 and 323 free. Makes no sense. Maybe just the last reading it had. Internal free 69mb.
Maybe I just need to mount thru adb: mount /dev/block/mmcblk0p2. Not sure exactly how to type the syntaxes on sdk stuff.
I am not at home so can't see if I can mount sd thru pc or recovery or open sdformatter and see what it says.
Frustrated!
Ken
Can run DT which is not supported on MicroMod, I believe. I thought when you wipe and flash the ext is formatted and restored so DT would be removed if there.
I ran DT zipalign and it was ok. That was the only option to do other than Dalvik to sd. So do I have an ext or not?
I am cconfused on DT with different roms. I like MM 2.10 and would like to use it.
BTW: TB does not show an sd-ext either
Well, I restored an MIUI .5 bu and it works. Did a bu and showed ext backed up. But TB and Root Explorer show no ext info, mem size.

ext2 formatted ext-sd mounting

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

stock rom and link2sd: can't mount ext4 partition

i have my ace running with a stock rom again since my wife is using it.
I have rooted the phone and flashed px recovery. After that, I wanted link2sd to mount the ext4 partition but whatever I try: nothing works.
when I try to mount ext 3 or ext 4 in link2sd I get this message: can't mount: no such device
when I try to mount ext2 I get this message: invalid argument
I have repartitioned and formatted both partitions already a dozen times. why can't link2sd mount this ext 4 partition?
i created the partitions using minitool partition wizard. After I placed the sd card back into my phone, I rebooted into px recovery, mount the sd-ext and formatted sd-ext, and after that, link2sd still gave the same errors.
How can I get Link2SD working?
DutchArjo said:
i have my ace running with a stock rom again since my wife is using it.
I have rooted the phone and flashed px recovery. After that, I wanted link2sd to mount the ext4 partition but whatever I try: nothing works.
when I try to mount ext 3 or ext 4 in link2sd I get this message: can't mount: no such device
when I try to mount ext2 I get this message: invalid argument
I have repartitioned and formatted both partitions already a dozen times. why can't link2sd mount this ext 4 partition?
i created the partitions using minitool partition wizard. After I placed the sd card back into my phone, I rebooted into px recovery, mount the sd-ext and formatted sd-ext, and after that, link2sd still gave the same errors.
How can I get Link2SD working?
Click to expand...
Click to collapse
I forgot that stock rom can't work with ext 4. Changing file system to ext2 worked for me and solved the problem (for now).
DutchArjo said:
I forgot that stock rom can't work with ext 4. Changing file system to ext2 worked for me and solved the problem (for now).
Click to expand...
Click to collapse
Are you sure Link2SD works well on stock rom? Because last time I checked it doesn't work well on roms without init.d support. I myself couldn't get it to work on stock rom. It crashed most of the time. Do post the result.

Categories

Resources