This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: eMMC partitioning issue

Part Number: AM3358

Tool/software: Linux

I am using the Sitara Processor (AM3358) paired with a Micron 64GB NAND Flash (eMMC). I've been using NFS and SD Card file systems for development. For the final build I plan to run on the eMMC (Boot and Primary partitions) with SD Card optional. I am adding a feature to my system that will allow for field updates. I am taking advantage of my rather large storage to use an active OS Partition that I can ping pong boot between after successful updates. I am having issues with my partitioning:

This is my partition map

Device         Boot    Start       End  Sectors  Size Id Type

/dev/mmcblk1p1 *        2048    206847   204800  100M  c W95 FAT32 (LBA)

/dev/mmcblk1p2        206848  10692607 10485760    5G 83 Linux

/dev/mmcblk1p3      10692608  21178367 10485760    5G 83 Linux

/dev/mmcblk1p4      21178368 115605503 94427136   45G  5 Extended

/dev/mmcblk1p5      21180416  29569023  8388608    4G  c W95 FAT32 (LBA)

/dev/mmcblk1p6      29571072  42153983 12582912    6G 83 Linux

/dev/mmcblk1p7      42156032 115605503 73449472   35G 83 Linux

 

After making the above partitions with fdisk, I do a dd of the various blocks and do mkdos or mkext4

 

Then I start copying files to p2.

 

When I do I get this error ...

[   93.416306] EXT4-fs (mmcblk1p2): bad geometry: block count 13114112 exceeds size of device (1310720 blocks)

mount: wrong fs type, bad option, bad superblock on /dev/mmcblk1p2,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail or so.

 

After this error, the partition table is all messed up and no longer shows the above listing. 

Any support is appreciated.

Thanks,

Greg

  • Hello Greg,

    Can you post the output of this command?
    sfdisk -d /dev/mmcblk1

    Please, also revise your partitioning. You have 45G, later 35G which exceeds 64G.

    Best regards,
    Kemal

  • Important note : Since write to eMMC failed, I had to boot off of SD first. This makes SD as mmcblk0
    and eMMC as mmcblk1. So in the stats below, ignore mmcblk0 and look at mmcblk1. When booting off eMMC and no SD present, we will see mmcblk0 as the emmc.

    As for the partition map exceeding the 64GB the way I understand setting up my extended partitions is that my partition 4 is a superset of p5, p6, and p7 so the sizes added up from the table can be a little confusion but should not exceed my 64GB limit.

    root@Parrot-492966:~# sfdisk -d /dev/mmcblk0 <======= ignore this. this is SD
    label: dos
    label-id: 0xed4aa532
    device: /dev/mmcblk0
    unit: sectors
    /dev/mmcblk0p1 : start= 2048, size= 1202176, type=c, bootable
    /dev/mmcblk0p2 : start= 1204224, size= 6748160, type=83
    /dev/mmcblk0p3 : start= 7952384, size= 6746112, type=c
    /dev/mmcblk0p4 : start= 14698496, size= 929792, type=83

    root@Parrot-492966:~# sfdisk -d /dev/mmcblk1
    label: dos
    label-id: 0x12115f2d
    device: /dev/mmcblk1
    unit: sectors

    /dev/mmcblk1p1 : start= 2048, size= 204800, type=c, bootable
    /dev/mmcblk1p2 : start= 206848, size= 10485760, type=83
    /dev/mmcblk1p3 : start= 10692608, size= 10485760, type=83
    /dev/mmcblk1p4 : start= 21178368, size= 94427136, type=5
    /dev/mmcblk1p5 : start= 21180416, size= 8388608, type=c
    /dev/mmcblk1p6 : start= 29571072, size= 12582912, type=83
    /dev/mmcblk1p7 : start= 42156032, size= 73449472, type=83
  • Seems the file system is wiped on that partition. Please, rerun the mkfs.extX and fsck.extX commands.