Skip to content

Instantly share code, notes, and snippets.

@gotbletu
gotbletu / gdisk GPT Hex code or GUID code
Created February 4, 2018 22:43
hex code for file system linux ntfs windows
echo -e "o\ny\nn\n1\n\n\n8300\nw\ny\n" | sudo gdisk /dev/"$DEVICE_NAME"
# o create a new empty GUID partition table (GPT) [Delete All Partition]
# y yes, proceed
# n add a new partition
# 1 partition number 1
# default, first sector
# default, last sector
# 8300 Hex code or GUID [8300 Linux filesystem]
# w write table to disk and exit
# y yes, proceed