Desire X partition table

by pimple   Last Updated April 16, 2018 11:11 AM

I want to tweak my partitions, so to have more space for apps. In particular, the idea is reducing the internal user storage, while enlarging /data.
As I tried to use parted, I got the classical error:

/dev/block # parted /dev/block/mmcblk0 unit s print
Error: Can't have overlapping partitions.

So I tried using fdisk, wondering there were two partitions with overlapping limits, and it got me something strange:

/dev/block # fdisk -l -u /dev/block/mmcblk0
Warning: deleting partitions after 60

Disk /dev/block/mmcblk0: 3959 MB, 3959422976 bytes
1 heads, 16 sectors/track, 483328 cylinders, total 7733248 sectors
Units = sectors of 1 * 512 = 512 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1   *           1          40          20  4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2              41        1128         544  45 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3            1129       10128        4500  46 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4           10129     7733246     3861559   5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5           10130       70129       30000  49 Unknown
/dev/block/mmcblk0p6           70131       95130       12500  50 Unknown
/dev/block/mmcblk0p7           95132       99227        2048  51 Unknown
/dev/block/mmcblk0p8           99229      105372        3072  52 Unknown
/dev/block/mmcblk0p9          105374      109469        2048  53 Unknown
/dev/block/mmcblk0p10         109471      111518        1024  54 Unknown
/dev/block/mmcblk0p11         111520      113567        1024  56 Unknown
/dev/block/mmcblk0p12         113569      131071        8751+ 55 Unknown
/dev/block/mmcblk0p13         131073      139264        4096  4a Unknown
/dev/block/mmcblk0p14         139266      147457        4096  4b Unknown
/dev/block/mmcblk0p15         147459      149506        1024  74 Unknown
/dev/block/mmcblk0p16         149508      163326        6909+ 75 Unknown
/dev/block/mmcblk0p17         163328      163839         256  76 Unknown
/dev/block/mmcblk0p18         163841      165888        1024  47 Unknown
/dev/block/mmcblk0p19         165890      167937        1024  34 Unknown
/dev/block/mmcblk0p20         167939      170498        1280  36 Unknown
/dev/block/mmcblk0p21         170500      196094       12797+ 71 Unknown
/dev/block/mmcblk0p22         196096      196607         256  73 Unknown
/dev/block/mmcblk0p23         196609      200702        2047  26 Unknown
/dev/block/mmcblk0p24         200704     2162686      980991+ 83 Linux
/dev/block/mmcblk0p25        2162688     4685822     1261567+ 83 Linux
/dev/block/mmcblk0p26        4685824     5177343      245760  83 Linux
/dev/block/mmcblk0p27        5177345     5210110       16383  48 Unknown
/dev/block/mmcblk0p28        5210112     5258606       24247+ 19 Unknown
/dev/block/mmcblk0p29        5258608     5258749          71  90 Unknown
/dev/block/mmcblk0p30        5258751     5259262         256  23 Unknown
/dev/block/mmcblk0p31        5259264     7569407     1155072   c Win95 FAT32 (LBA)
/dev/block/mmcblk0p32          10130       70129       30000  49 Unknown
/dev/block/mmcblk0p33          70131       95130       12500  50 Unknown
/dev/block/mmcblk0p34          95132       99227        2048  51 Unknown
/dev/block/mmcblk0p35          99229      105372        3072  52 Unknown
/dev/block/mmcblk0p36         105374      109469        2048  53 Unknown
/dev/block/mmcblk0p37         109471      111518        1024  54 Unknown
/dev/block/mmcblk0p38         111520      113567        1024  56 Unknown
/dev/block/mmcblk0p39         113569      131071        8751+ 55 Unknown
/dev/block/mmcblk0p40         131073      139264        4096  4a Unknown
/dev/block/mmcblk0p41         139266      147457        4096  4b Unknown
/dev/block/mmcblk0p42         147459      149506        1024  74 Unknown
/dev/block/mmcblk0p43         149508      163326        6909+ 75 Unknown
/dev/block/mmcblk0p44         163328      163839         256  76 Unknown
/dev/block/mmcblk0p45         163841      165888        1024  47 Unknown
/dev/block/mmcblk0p46         165890      167937        1024  34 Unknown
/dev/block/mmcblk0p47         167939      170498        1280  36 Unknown
/dev/block/mmcblk0p48         170500      196094       12797+ 71 Unknown
/dev/block/mmcblk0p49         196096      196607         256  73 Unknown
/dev/block/mmcblk0p50         196609      200702        2047  26 Unknown
/dev/block/mmcblk0p51         200704     2162686      980991+ 83 Linux
/dev/block/mmcblk0p52        2162688     4685822     1261567+ 83 Linux
/dev/block/mmcblk0p53        4685824     5177343      245760  83 Linux
/dev/block/mmcblk0p54        5177345     5210110       16383  48 Unknown
/dev/block/mmcblk0p55        5210112     5258606       24247+ 19 Unknown
/dev/block/mmcblk0p56        5258608     5258749          71  90 Unknown
/dev/block/mmcblk0p57        5258751     5259262         256  23 Unknown
/dev/block/mmcblk0p58        5259264     7569407     1155072   c Win95 FAT32 (LBA)
/dev/block/mmcblk0p59          10130       70129       30000  49 Unknown
/dev/block/mmcblk0p60          70131       95130       12500  50 Unknown

Partition table entries are not in disk order

As you can see, partitions from mmcblk0p32 to mmcblk0p58 are a repetition of partitions mmcblk0p5-mmcblk0p31, and it all starts over at mmcblk0p59. All of them lie inside mmcblk0p4 (extended).
This, associated to the fact that fdisk fails to detect the type for most of them, makes me think there's some corrupted information in the partition table.

Anyway, /proc/partitions stops at mmcblk0p31 (all and only these partitions have file descriptors in /dev/block):

~ # cat /proc/partitions
major minor  #blocks  name

 179        0    3866624 mmcblk0
 179        1         20 mmcblk0p1
 179        2        544 mmcblk0p2
 179        3       4500 mmcblk0p3
 179        4          1 mmcblk0p4
 179        5      30000 mmcblk0p5
 179        6      12500 mmcblk0p6
 179        7       2048 mmcblk0p7
 179        8       3072 mmcblk0p8
 179        9       2048 mmcblk0p9
 179       10       1024 mmcblk0p10
 179       11       1024 mmcblk0p11
 179       12       8751 mmcblk0p12
 179       13       4096 mmcblk0p13
 179       14       4096 mmcblk0p14
 179       15       1024 mmcblk0p15
 179       16       6909 mmcblk0p16
 179       17        256 mmcblk0p17
 179       18       1024 mmcblk0p18
 179       19       1024 mmcblk0p19
 179       20       1280 mmcblk0p20
 179       21      12797 mmcblk0p21
 179       22        256 mmcblk0p22
 179       23       2047 mmcblk0p23
 179       24     980991 mmcblk0p24
 179       25    1261567 mmcblk0p25
 179       26     245760 mmcblk0p26
 179       27      16383 mmcblk0p27
 179       28      24247 mmcblk0p28
 179       29         71 mmcblk0p29
 179       30        256 mmcblk0p30
 179       31    1155072 mmcblk0p31

While these are the ones listed in fstab

~ # cat /etc/fstab
/dev/block/mmcblk0p26 /cache ext4 rw
/dev/block/mmcblk0p25 /data ext4 rw
/dev/block/mmcblk0p31 /emmc vfat rw
/dev/block/mmcblk0p24 /system ext4 rw
/dev/block/mmcblk1p1 /sdcard vfat rw

~ # cat /etc/recovery.fstab
# mount point   fstype      device          [device2]
/recovery       emmc        /dev/block/mmcblk0p21
/boot           emmc        /dev/block/mmcblk0p27
/cache          ext4        /dev/block/mmcblk0p26
/data           ext4        /dev/block/mmcblk0p25
/sdcard         vfat        /dev/block/mmcblk1p1    /dev/block/mmcblk1
/system         ext4        /dev/block/mmcblk0p24
/misc           emmc        /dev/block/mmcblk0p17
/devlog         ext4        /dev/block/mmcblk0p28
/emmc           vfat        /dev/block/mmcblk0p31

How could I possibly clean up the schema?
How do I fix those Unknown detections?



Related Questions



BRAND NEW HTC Desire 816 Headphone Jack Issue

Updated July 16, 2015 13:05 PM


HTC desire 816 continued vibrate problem

Updated August 11, 2017 00:11 AM

No 3G connection in HTC Desire 500

Updated April 09, 2015 22:04 PM