Parcourir la source

Add partitioning

Bob Mottram il y a 9 ans
Parent
révision
96d6fea7ab
1 fichiers modifiés avec 18 ajouts et 1 suppressions
  1. 18
    1
      src/freedombone-format

+ 18
- 1
src/freedombone-format Voir le fichier

34
    exit 1
34
    exit 1
35
 fi
35
 fi
36
 
36
 
37
-USB_DRIVE=/dev/${1}
37
+USB_DRIVE=/dev/${1}1
38
+LABEL='Freedombone'
39
+
40
+echo 'Partitioning drive'
41
+echo "o
42
+d
43
+2
44
+d
45
+1
46
+n
47
+p
48
+1
49
+
50
+
51
+a
52
+1
53
+w
54
+" | fdisk /dev/${1};mkfs.ext4 -L "$LABEL" /dev/${1}1
38
 
55
 
39
 echo "Formatting $USB_DRIVE as LUKS"
56
 echo "Formatting $USB_DRIVE as LUKS"
40
 cryptsetup -y -v luksFormat ${USB_DRIVE}
57
 cryptsetup -y -v luksFormat ${USB_DRIVE}