Created
June 24, 2016 15:59
-
-
Save tolleiv/c1e274d5bf222227f97e75ce433b1877 to your computer and use it in GitHub Desktop.
Small script which provides fdisk with the proper parameters without leaving the necessary documentation out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk ${1} | |
o # clear the in memory partition table | |
n # new partition | |
p # primary partition | |
1 # partition number 1 | |
# default - start at beginning of disk | |
# default, extend partition to end of disk | |
t # change a partition's system id | |
83 # Linux partition | |
p # print the in-memory partition table | |
w # write the partition table | |
q # and we're done | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment