I am trying to partition hard disk using sgdisk. After running the sgdisk partitioning commands i can see that the gpt partition table is getting created but the logical partitions are not getting created. Below are the commands i used.
sgdisk -og /dev/sda
Creating new GPT entries.
sda: sda1
The operation has completed successfully.
sgdisk -n 1:2048:264191 -c 1:"kernel" /dev/sda
Setting name!
partNum is 0
REALLY setting name!
sda: sda1
The operation has completed successfully.
sgdisk -n 2:264192:395263 -c 2:"rootfs" /dev/sda
Setting name!
partNum is 1
REALLY setting name!
sda: sda1
The operation has completed successfully.
sgdisk -n 3:395263:460799 -c 3:"data" /dev/sda
Information: Moved requested sector from 395263 to 395264 in order to align on 2048-sector boundaries.
Setting name!
partNum is 2
REALLY setting name!
sda: sda1 The operation has completed successfully.
sgdisk -p /dev/sda
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1FE36D38-3427-40CC-A0B0-08664DC76C74 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3907029134 Partitions will be aligned on 2048-sector boundaries
Total free space is 3906570349 sectors (1.8 TiB)
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
cat /proc/partitions
major minor #blocks name
8 0 1953514584 sda
8 1 1953514583 sda1
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 1.8T 0 disk
`-sda1 8:1 0 1.8T 0 part
I am using sgdisk version 0.8.10. I am doing this test on an ARM A9 board using initrd image.
thanks