Browse Source

Added script to partition disk

Matteo Zeccoli Marazzini 5 years ago
parent
commit
4f292912f1
2 changed files with 14 additions and 1 deletions
  1. 4 1
      newdisk-automator.sh
  2. 10 0
      sfdisk-script

+ 4 - 1
newdisk-automator.sh

@@ -3,4 +3,7 @@ SWAP_SIZE=$2
 CONDOR_SIZE=$3
 TEMP_SIZE=$4
 VM_SIZE=$5
-DISK_SIZE=/
+SFDISK_SCRIPT=sfdisk-script
+
+# sfdisk partitions the disk following instruction in the $SFDISK_SCRIPT
+sfdisk $DEVICE < $SFDISK_SCRIPT

+ 10 - 0
sfdisk-script

@@ -0,0 +1,10 @@
+#sfdisk-script
+#This script is to be passed as standard input to sfdisk
+#It creates a new partition table on the specified disk, and create a new Linux LVM partition
+#
+#partition table info
+label: gpt
+#
+#partitions info
+#start	size	type	bootable
+	,	,31	,