I had really slow performance when using an a2sd ROM - (which redirected the /data/app, /data/app-private, and /data/dalvik-cache to /system/sd)
The issue was that clockwork recovery had formatted my sd card with a 1024 block size. Re-formatting it with a standard block size (4096) resulted in much better speeds for me..
(I re-formatted by running an ubuntu livecd, mounting and copying the contents of /dev/sda2, running mkfs.ext3 against /dev/sda2 (which was the second partition for my sd card..) - re-formatting it with a more standard block size of 4096, then copying the data back..)
Thought this might help somebody. You can see the block size of /system/sd (if you're using apps2sd with an external sd card partitioned..) by running 'adb df /system/sd' - if it shows (block size 4096) - you're good.. anything lower.. you might want to consider re-doing your setup..
-mark
PS - it might actually have been RA that formatted with the 1096 block size.. I honestly can't remember now which recovery I used to partition initially..
Related
Hello
I am trying to align my FAT32 partition on my SD card as per:
dubdubdub.patriotmemory.com/forums/showthread.php?3696-HOWTO-Increase-write-speed-by-aligning-FAT32
I'm having issues completing the process because my SD card has a FAT32 partition followed by an EXT4 one, whereas the guide formats the entire SD as FAT32. I've tried heaps of different things to get it working, even doing it successfully on a 4GB flash drive which was fully FAT32, but I'm convinced having the EXT4 partition after is causing problems.
When I go to (W)rite the heads/sector changes to the partition I get this error:
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
No changes are made, not even after rebooting Linux.
Has anyone else had success with aligning their FAT32 partition with an EXT4 following it? I could try doing the entire SD card as FAT32, align it, resize it, and create an EXT4 after aligning it, but wasn't sure if this would work. I'll give it a try and see how I go.
I know its not helpful, but I was planning on doing this next time I flash a new ROM but haven't got around to it yet...
However, the link above which is clickable is here: http://www.patriotmemory.com/forums/showthread.php?3696-HOWTO-Increase-write-speed-by-aligning-FAT32
I imagine you need to change this bit:
Create a new partition that starts at cylinder 1 and ends at the end of the disk
to
Create a new partition that starts at cylinder 1 and ends at x from the end of the disk
where x is the size of the EXT partition you want to create
sadly it doesnt give the commands and i can't read the help here at work at the moment
I don't believe in such alignment.
Remove all partitions from gparted or windows disk management.
Download SD Formater utility from SD Card Association. And format your card. Full format.
Boot into gparted and shrink fat32 partition. Take note that there is 4MB in front of fat partition. Make sure it stay that way. In free space create ext partition. Use MB alignment in gparted.
That's all.
vr5411 said:
Use MB alignment in gparted.
Click to expand...
Click to collapse
I don't remember seeing that option?
what about the flashable ext alignment zip's?
Quick summary:
Recently got new SanDisk 16GB MicroSD and used CWM 5.0.2.0 to create a 1024mb ext partition. It says "successful" but I don't think it really did successfully create the ext partition. Tried to partition manually using 'parted' with no luck.
Any ideas/suggestions on how to partition properly?
Gory details...
Using HTC Desire GSM that is already S-OFF-ed and running InsertCoin 1.0.8 (on old 2GB sd card).
With arrival of new SD card I thought great, upgrade to InsertCoin 1.1.1 (was going to go for 1.1.3 but saw that it had a couple of problems)
Done it all before, easy enough I thought...
* Swap SD Cards
* Format SD with 1024mb ext, 0mb swap via CWM (originally using older than v5)
* Wipe settings, wipe cache, wipe dalvik cache
* Put Insertcoin zip onto sd card
* Install & reboot
Then it hung...forever on reboot (forever being 30min+)
Tried the above couple of times (eg. upgrade CWM) etc... and even tried putting the old 1.0.8 on - but still nothing just hung on boot screen. Put old SD card back in, and everything worked again (lost settings etc, but it booted up into Android)
So I started investigating and ended up looking into the partitioning of the new SD card....
Here is the output of "print" from "parted"
Code:
Model: SD (sd/mmc)
Disk /dev/block/mmcblk0: 16.3GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 15.3GB 15.3GB primary fat32 lba
2 15.3GB 16.3GB 1024MB primary
(note the missing 'ext3' under file system for partition 2)
So I then upgraded to latest CWM (as per their website) then tried the partition again... same result as above.
Then I went and followed manual partitioning tutorials (eg. http://forum.xda-developers.com/showthread.php?t=534714, and a couple of others on the web) and still "print" gave the above output.
With the manual partitioning, I thought, maybe it's just silently not showing ext2 but it really is ext2, will just upgrade it to ext3 and see if it'll show ext3...
So I ran "sdparted --upgradefs ext3" (for some reason upgrade_fs could not be found)... and that failed, giving:
Code:
checking script requirements...done
unmounting all partitions...done
you have chosen to upgrade /dev/block/mmcblk0p2 to ext3.
this action will NOT delete any data from sdcard.
do you want to continue? (Y/n) Y
adding journaling to /dev/block/mmcblk0p2.../sbin/e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
/sbin/tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
Couldn't find valid filesystem superblock.
done
So, now all I can think of is for whatever reason, the ext partition isn't being created properly on my sd card, thus the reason it is hanging on boot screen (read somewhere that if you don't have an ext partition, it will never get past boot screen).
Reason I believe the ext partition isn't being created properly is because in all tutorials they all have "ext2 or ext3" in the output. Even more so, checking my old SD card I get the following:
Code:
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 2003MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 979MB 979MB primary fat32 lba
2 979MB 2003MB 1024MB primary ext3
(Note: old SD card has ext3... this was partitioned using CWM)
Am I missing something super obvious? or doing something wrong?
How am I meant properly create an ext3 partition (and make sure it has been created) on the SD card?
Any help would be greatly appreciated!!!
Thanks!!!
pyko
ps. not sure if this fits in this forum... but it is a question regarding my htc desire...
Try using Gparted, not parted.
gparted as in: http://gparted.sourceforge.net/
ie. a standalone application to partition the sdcard?
Indeed
10char
Or you can use this: http://www.partitionwizard.com/free-partition-manager.html You can create EXT4 partition without changing cluster size (which is why I ditched EaseUS).
Terepin said:
Or you can use this: <URL Removed for the sake of Humanity> You can create EXT4 partition without changing cluster size (which is why I ditched EaseUS).
Click to expand...
Click to collapse
or you can read my Sig
Gparted is the way forward, never fails ;-)
Sent from my HTC Desire using Tapatalk
Ok, it seems like using gparted failed
* Downloaded ISO, burnt to cd, booted up into gparted
* deleted all partitions on sd card
* allocated partition 1 as primary, fat32 (15gb)
* allocated partition 2 as primary, ext3 (1gb)
* apply
gparted went along it's merry way and said everything was created etc - but afterwards it shows a yellow triangle/exclamation "warning" icon next to ext3 partition.
Doing a check fails (error shows the same magic number problem as above) and that partition then becomes "unknown".
I tried formatting to each (ext2, ext3, ext4) but going back to parted and checking via 'print' none of them showed 'ext2/3/4 in the FileSystem column'
Note... ext3/4 both showed yellow warning icon, ext2 didn't (it seemed fine, but still didn't show up as ext2 in parted->print)
Any more ideas what is going on?
ps. using a mac, so can't use partitionwizard.
pps. took a screenshot whilst in gparted... but can't find the screenshot!
If you had a Windows pc I would recommend using h2testw.exe to run tests on the card. It would ascertain if there is a fault on it. I dont know if mac users have a wine equivelant to run .exe's?
Pulled out my old dell laptop and ran the check..
Indeed it seems like the disk is corrupted
Code:
The media is likely to be defective.
1.8 GByte OK (3808784 sectors)
13.3 GByte DATA LOST (28072432 sectors)
Details:56 KByte overwritten (112 sectors)
0 KByte slightly changed (< 8 bit/sector, 0 sectors)
13.3 GByte corrupted (28072320 sectors)
56 KByte aliased memory (112 sectors)
First error at offset: 0x00000000743c2000
Expected: 0x00000000743c2000
Found: 0x00000003ccef0000
H2testw version 1.3
Writing speed: 5.24 MByte/s
Reading speed: 6.27 MByte/s
H2testw v1.4
Is there a way I can fix it? This is a new disk btw
Where did you buy it?
That result to me makes me think its a fake. That its really a 2GB card rebranded and faked to look like a 16GB.
I ordered it from: http://www.crazysales.com.au/
In fact, sometime last year, I ordered both my HTC Desire and a 16GB SD card from them and both worked fine. Until couple months back the SD card suddenly died (completely dead - nothing would recognise it) so I asked for warranty.
After ~1mth, finally got the new replacement card (ie the one discussed in this thread). I guess so far, it seems to be a fake...
ps. the new replacement that they sent to me was not in its original packaging - it was simply placed in the case that I used to send the dead card.
I use 4EXTRecovery and works fine from recovery, easy and fast.
Not sure if that will help me unfortunately I do believe rootSU is right - it is actually a 2GB card made to look like a 16GB card.. the tests seem to indicate that, and I pulled in ~4GB worth of data to the card, the first ~1.8GB worked just fine and then afterwards all the files were corrupt.
Sent an email to crazysales ... now just waiting to see their response...
That is why you always should buy from trustworthy retailers.
Hello!
While trying to install S2E i managed to partially ruin the functionality of my phone. I have an HTC Desire (GSM) running Cyanogenmod 7.1 stable release. I have S-off, root and ClockworkMod Recovery v5.0.2.0.
(I wanted to install a new SD card. In the process I managed to loose all my previous SD card data and I only have a 2 months old back-up from when I was running a different android version, so that will not be very helpful at recuperating many things, but even without the old SD card my phone was still operating correctly besides being unable to run the apps installed on the card. I presume this issue is unrelated to my current problem.)
Here is how I've think I've broken the phone:
- I used Gparted to format a new 8 GB microSD card (class 6) with 1 GB ext4 partition and a FAT32 partition.
- I installed S2E and checked all the options for the OS to use the external storage on the SD card partition.
- It turned out that my partition was not correctly identified by the OS (probably the issue was with using the built-in card reader of the laptop and not a stand alone USB card reader).
- I booted into Recovery Mode and re-formated the SD card with 1 GB of ext3, 32 GB of Swap and the rest as fat.
- After the restart the boot process took a very long time. When the OS finally booted I practically had a fresh install with none of my old settings available (shortcuts, wallpaper, apps etc.). Even the apps stored on the local memory disappeared (S2E, ROM manager, gmail, market etc.) and my home button no longer works. I am unable to receive phone calls since the phone automatically rejects incoming calls. I see incoming calls in the call log and I can make outgoing calls.
I presumed the issue is with mounting the sd-ext partition, but even if I tried to manually mount it after boot I see no change.
I followed these guides to install parted and use 32fsck to see if the partitions are corrupt. I think I have no problems.
Here are the code reports of running parted:
Code:
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 7965MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 6909MB 6909MB primary fat32 lba
2 6909MB 7933MB 1024MB primary ext3
3 7933MB 7965MB 32.0MB primary linux-swap(v1)
and e2fsck:
Code:
e2fsck /dev/block/mmcblk0p2
e2fsck 1.41.6 (30-May-2009)
sd-ext: clean, 1091/499712 files, 129331/999425 blocks
Here is my fstab as well:
Code:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/mtdblock5 /data yaffs2 rw
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mmcblk0p1 /sdcard vfat rw
/dev/block/mmcblk0p2 /sd-ext ext3 rw
I presume that a fresh OS install will fix the issues. However I hope I can recover the settings stored on the ROM if I fix the sd-ext partition issue.
I will appreciate any suggestions you might have.
ps: adb push and fstab pull is working only when phone is in Recovery. If the CM7.1 is booted there is no fstab in /etc.
Had a similar issue sometime ago. Sorry to say couldn't fix it. In fact I would say the amount of time you spend trying to fix that issue will outway a fresh install.
If you can do a full backup still and save it to your pc you could do a fresh install and work on the issue without loss of phone functionality. Just my thoughts...
Thanks for your advice!
I ended up going for a fresh install with CM7.1 and S2E.
Thinks are ok now the only problem I have is that I don't see the 1 GB of available space reported correctly. Something like 152 MB is free and a negative value is reported as the used space. The CM option of using expanded internal storage is dimmed but I am not sure if that should be different.
mindcsrusher said:
Thanks for your advice!
I ended up going for a fresh install with CM7.1 and S2E.
Thinks are ok now the only problem I have is that I don't see the 1 GB of available space reported correctly. Something like 152 MB is free and a negative value is reported as the used space. The CM option of using expanded internal storage is dimmed but I am not sure if that should be different.
Click to expand...
Click to collapse
No problem. Glad you sorted the issue.
I know with a2sd using standard settings won't show the true size of the parition wont be reported. Something to do with the way it works. If it's working well and letting you install apps with no problems I wouldn't worry too much about
I upgraded from the latest ClockworkMod Touch to 4EXT Recovery, backed up my system and re-partitioned the SD Card with a sd-ext of 2GB, sd-ext2 of 768MB and a SWAP of 256MB
However when I boot into the phone and check free-m I only see the 96MB data swap in the buffer area, and not the 96 + 256 combined.
Any particular reason for this? I'm using the ROM in the signature.
N/M I fixed it by reformatting the card in recovery and skipping sd-ext2, I guess the rom doesn't support more than one sd-ext partitions as such affects it finding the swap partition automatically.
The SD card was removed while the device was running.
The device is running CM 7.2 and the SD card was partitioned to extend the internal memory.
Now, everything is out of whack.
The call log is gone, the texts are gone, I have no contacts, I have no favorites.
The widgets are gone, the home screen icons are gone.
Actually it'd be better to say what's still there: The apps themselves and some file content (pictures, videos, downloads) are there.
How do I rectify this and safe my data. I wouldn't mind migrating it to a new device as I have a new device.
Please advice if you can
what method did you use to partition your card ? some leave user data on internal memory some move that too on to external. i don't know if there's any PC software that can see your 2nd partition if you put your SDcard into a card reader on a PC for backing up.
3mel said:
what method did you use to partition your card ? some leave user data on internal memory some move that too on to external.
Click to expand...
Click to collapse
I don't know for sure but I think it was Data2SD from the package Data2sdV2withA2sdremover_by_jikantaru.zip
It is a 2 GB SD card and the phone shows an internal storage of 473 MB and 1,39 GB on the SD card.
3mel said:
i don't know if there's any PC software that can see your 2nd partition if you put your SDcard into a card reader on a PC for backing up.
Click to expand...
Click to collapse
I inserted it in a Ubuntu computer and got some output.
This is the relevant output from Ubuntu
Code:
[email protected]:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p1 1.4G 1.4G 21M 99% /media/ubuntu/F031-5199
/dev/mmcblk0p2 465M 393M 73M 85% /media/ubuntu/userdata
Code:
[email protected]:~$ sudo fdisk -l
Disk /dev/mmcblk0: 1.9 GiB, 2002780160 bytes, 3911680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000ccb88
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 1 2912109 2912109 1.4G c W95 FAT32 (LBA)
/dev/mmcblk0p2 2912256 3911679 999424 488M 83 Linux
Code:
[email protected]:~$ sudo ls /media/ubuntu/F031-5199
AI Factory Stats LOST.DIR Safety Guide
Android media ScanToPDF_Free
aScreenshot miniclipId.txt SmsContactsBackup
busybox-stericson My Documents svox
clockworkmod My files System Volume Information
data Notifications TitaniumBackup
data2whateverlog.txt Pictures tmp
DCIM Quick Start Guide toolbox-stericson
download reboot-stericson User Manual
ezPDFReader Ringtones
kindle rosie_scroll
[email protected]:~$ sudo tail /media/ubuntu/F031-5199/data
Code:
[email protected]:~$ sudo lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
mmcblk0
├─mmcblk0p1 vfat F031-5199 /media/ubu
└─mmcblk0p2 ext3 userdata 6f6684d8-78c2-40b6-ae72-d9b089f623a1
Both partitions are still there and accessible. I did run fsck but it did not help with the lost thing (texts, etc.)
somebody else had trouble with that method a cm10.1 thread. I would have said try flashing it again but I don't know that method...