user755 user755 - 6 months ago 20
Linux Question

how to identify names of the partitions

From below partitions how know which partitions is boot and which one is system. Is there any different command I need to execute to read the partitions names.

# cat /proc/partitions
major minor #blocks name

253 0 409600 zram0
179 0 15388672 mmcblk0
179 1 12772 mmcblk0p1
179 2 52764 mmcblk0p2
179 3 128 mmcblk0p3
179 4 256 mmcblk0p4
179 5 512 mmcblk0p5
179 6 2048 mmcblk0p6
179 7 512 mmcblk0p7
179 8 512 mmcblk0p8
179 9 16896 mmcblk0p9
179 10 13952 mmcblk0p10
179 11 3072 mmcblk0p11
179 12 3072 mmcblk0p12
179 13 780 mmcblk0p13
179 14 780 mmcblk0p14
179 15 780 mmcblk0p15
179 16 2826240 mmcblk0p16
179 17 8192 mmcblk0p17
179 18 2119680 mmcblk0p18
179 19 6144 mmcblk0p19
179 20 10240 mmcblk0p20
179 21 10240 mmcblk0p21
179 22 10240 mmcblk0p22
179 23 6144 mmcblk0p23
179 24 3072 mmcblk0p24
179 25 8 mmcblk0p25
179 26 9216 mmcblk0p26
179 27 512000 mmcblk0p27
179 28 20480 mmcblk0p28
179 29 9728000 mmcblk0p29
179 32 1921024 mmcblk1
179 33 1920000 mmcblk1p1


with
df
command

root@android:/ # df
Filesystem Size Used Free Blksize
/dev 910M 80.0K 910M 4096
/mnt/secure 910M 0.00K 910M 4096
/mnt/asec 910M 0.00K 910M 4096
/mnt/obb 910M 0.00K 910M 4096
/persdata/absolute 8.82M 4.26M 4.57M 4096
/system 2.66G 2.25G 417M 4096
/data 9.25G 6.92G 2.33G 4096
/cache 1.99G 39.0M 1.95G 4096
/firmware 86.0M 8.75M 77.2M 16384
/firmware-mdm 86.0M 49.8M 36.2M 16384
/efs 13.4M 4.23M 9.21M 4096
/mnt/shell/emulated 9.15G 6.92G 2.23G 4096
/mnt/shell/container 9.15G 6.92G 2.23G 4096
/storage/extSdCard 1.83G 758M 1.09G 32768

Answer

You can use df command. This will display something like that:

# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 46.9M 0 46.9M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock1 87.5M 87.5M 0 100% /system
/dev/block/mtdblock2 1.3M 1.1M 120.0k 91% /userdata
/dev/block/mmcblk0p1 944.9M 130.4M 804.9M 14% /data
/dev/block/mtdblock5 35.8M 1.6M 34.2M 4% /dbdata
/dev/block/mtdblock4 87.5M 4.9M 82.6M 6% /cache
/dev/block/vold/180:2
6.6G 2.7G 3.8G 41% /sdcard
/dev/block/vold/179:9
7.6G 1.5G 6.1G 19% /sdcard/sd

The second option would be to read the /proc/self/mountinfo file.