0
2
I am trying to partition my 2GB emmc using sgdisk to have a GPT partion table. The commands show success and also the GPT partition table looks updated (even on reboot) but the partitions are not created at all. Means when I check using ls /dev/mmcblk0 it does not show the partitions I crated. and the my sgdisk always try to create the partitions on p1 but no p2,p3,.... are shown.
Below are the commands I am using and sgdisk -p shows the partitions I created but there is no partitions created /dev/mmcblk0 (p1, p2, p3). Also in the logs you can see it always try to create p1 which was supposed to be p2 and p3 for later partitions. Can you please help using sgdisk for creating the partitions in emmc...
# sgdisk -og /dev/mmcblk0
mmcblk0: p1
The operation has completed successfully.
# sgdisk -p /dev/mmcblk0
Disk /dev/mmcblk0: 3751936 sectors, 1.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 27F5FD73-8C2A-4448-91F6-251B72C64843
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3751902
Partitions will be aligned on 2048-sector boundaries
Total free space is 3751869 sectors (1.8 GiB)
Number Start (sector) End (sector) Size Code Name
# sgdisk -n 1:2048:264191 -c 1:"kernel" /dev/mmcblk0
Setting name!
partNum is 0
REALLY setting name!
mmcblk0: p1
The operation has completed successfully.
# sgdisk -n 2:264192:395263 -c 2:"rootfs" /dev/mmcblk0
Setting name!
partNum is 1
REALLY setting name!
mmcblk0: p1
The operation has completed successfully.
# sgdisk -n 3:395263:460799 -c 3:"data" /dev/mmcblk0
Information: Moved requested sector from 395263 to 395264 in
order to align on 2048-sector boundaries.
Setting name!
partNum is 2
REALLY setting name!
mmcblk0: p1
The operation has completed successfully.
# sgdisk -p /dev/mmcblk0
Disk /dev/mmcblk0: 3751936 sectors, 1.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 27F5FD73-8C2A-4448-91F6-251B72C64843
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3751902
Partitions will be aligned on 2048-sector boundaries
Total free space is 3293117 sectors (1.6 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 264191 128.0 MiB 8300 kernel
2 264192 395263 64.0 MiB 8300 rootfs
3 395264 460799 32.0 MiB 8300 data
# ls /dev/mmcblk0
mmcblk0 mmcblk0boot0 mmcblk0boot1 mmcblk0p1
# cat /proc/partitions
major minor #blocks name
179 0 1875968 mmcblk0
179 1 1875967 mmcblk0p1
179 16 1024 mmcblk0boot1
179 8 1024 mmcblk0boot0
No logical partitions created.
1Can you show the output of the commands you tried? – Mokubai – 2015-06-25T18:11:56.050
Mokubai: I updated the question with output – Reddy – 2015-06-25T20:26:06.663
@RodSmith This is right up your alley – MariusMatutiae – 2015-06-25T21:00:49.530