Neil Schemenauer's Web Log

[Archives]

April 03, 2012

Samsung Galaxy S (I9000) partitioning scheme

I had trouble finding details about how flash memory is partitioned on this device, here's what I learned in case it helps others. The device has two built-in flash memory devices: 8 or 16GB NAND and flash memory connected directly to the processor chip (MMC).

The MMC can be partitioned using different schemes. The stock ROMs use a scheme called BML. Most open source ROMs use a more flexible scheme called MTD. When you first install CyanogenMod 7, for example, the MMC is converted to use MTD partitioning. The MMC partitions are as follows:

If you are familiar with the Heimdall or Odin tools, these names will be familiar. Odin and Heimdall use the PIT file to control the partitioning of the MMC (e.g. s1_odin_20100512.pit).

The NAND device is partitioned into two parts: /data and /mnt/sdcard. The partition mounted on /mnt/sdcard is referred to as the internal SD card. If you put a SD card in the external slot, it is mounted as /emmc (at least in CM9).

For reference, here is the NAND partition information for my i9000m phone.

klonk:~$ adb shell
shell@android:/ $ su
shell@android:/ # fdisk /dev/block/mmcblk0

The number of cylinders for this disk is set to 1953792.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/block/mmcblk0: 16.0 GB, 16005464064 bytes
1 heads, 16 sectors/track, 1953792 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1               5     1708032    13664224   c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2         1708033     1953792     1966080   c Win95 FAT32 (LBA)
Partition 2 does not end on cylinder boundary

Command (m for help): 

On my phone /data is formatted as ext4 and /mnt/sdcard as vfat. One other thing, if you connect your phone to a computer with USB, the mass storage devices that are visible correspond to /mnt/sdcard and /emmc (i.e. one partition of the NAND and the external SD card). The other devices are not visible.

[comments]