...
Code Block |
---|
device=/dev/sdb dd if=/dev/zero of=${device} obs=512 count=100 dd if=/dev/zero of=${device} obs=512 count=100 seek=$(( $(blockdev --getsz ${device}) -100 )) parted ${device} "mklabel gpt" parted ${device} "mkpart primary 0% 100%" |
Verify that the partition is created:
Code Block |
---|
fdisk -l /dev/sdb
-->
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sdb: 274.9 GB, 274877906944 bytes, 536870912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: E7FF3D92-84BB-44E1-B0B0-26150DB80639
# Start End Size Type Name
1 2048 536868863 256G Microsoft basic primary |