Find Your Device:
Or Continue to Thread: [TUT]How to Create Partition i…
26th January 2013, 08:32 AM |#2  
pepoluan's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 1,011
 
More
Great tutorial!

If I may, I'd like to add some tips:
  • When making the very first partition (from an empty-card condition), make sure:
    • It's Aligned to MB instead of Cylinder
    • There's a 1 MB 'gap' in front of the partition
  • Also, make sure that all partitions' sizes (in sectors) are divisible by 256 (or, in other words, the partition size is a multiple of 128 KiB).
    .
    The reason for this is that some SD cards allocate their storage capacity in 'blocks', and the largest known block size is 128 KiB (128 * 1024 bytes). 256 sectors = 128 KiB. By ensuring that all partitions' sizes are divisible by 256, you are ensuring that no block is split between two partitions, thus keeping performance high (as the SD card no longer need to read a block and perform a seek just to find the beginning of a partition), and help lengthening the life of your SD card.
    .
    (Other SD cards might have smaller block sizes, but all a binary fraction of 128 KiB, i.e., 64 KiB or 32 KiB or 16 KiB or 8 KiB or 4 KiB. Thus, if partitions are multiples of 128 KiB, they are certainly multiples of the smaller block sizes.)

To ensure that partitions are divisible by 256, just before you click on the "Apply" button, do the following for each partition created:
  1. Right-click on the partition
  2. Choose Properties (the bottom option)
  3. Click on "Partition Info" tab
  4. The size of partition (in sectors) is "Last Physical Sector" - "First Physical Sector" + 1

For example, in my case (see the attached image), the "Last Physical Sector" is 29003775, while the "First Physical Sector" is 2048. Thus, the size of the partition is 29003775 - 2048 + 1 = 29001728. Divide 29001728 by 256 and you have the nice integer value of 113288, meaning that the partition is an exact multiple of 128 KiB.

As for the filesystem type for the second partition, I myself prefer ext2 because I reasoned:
  • This is an SD Card; employing journaling (implemented by ext3 / ext4) will result in too much writing -- shortening SD Card life
  • Writes are (nearly) instantaneous anyways; journaling are helpful if writes take some time to finish (e.g., writing to a spinning disk, which needs the track-seek and sector-seek plus track-shift plus ECC generation)
  • The only way a write to SD Card can get interrupted is if power was removed immediately. Aside from dropping your phone and inadvertently ejecting the battery (in which case, SD Card corruption should be the least of your concern), smartphones can't suddenly lose power. When power gets too low, Android performs an orderly shutdown ensuring that all buffers are flushed
  • ext2 code in the kernel is simple, making reads & writes faster, and less intrusive to foreground apps (no need to generate/manipulate a checksummed journal)



--- Posted from Opera on Lenovo T420 ---
Attached Thumbnails
Click image for larger version

Name:	Example_Partition_Size.png
Views:	2263
Size:	12.7 KB
ID:	1677473  
The Following 6 Users Say Thank You to pepoluan For This Useful Post: [ View ] Gift pepoluan Ad-Free