Ver código fonte

Add partitioning

Bob Mottram 9 anos atrás
pai
commit
96d6fea7ab
1 arquivos alterados com 18 adições e 1 exclusões
  1. 18
    1
      src/freedombone-format

+ 18
- 1
src/freedombone-format Ver arquivo

@@ -34,7 +34,24 @@ if [ ! $1 ]; then
34 34
    exit 1
35 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 56
 echo "Formatting $USB_DRIVE as LUKS"
40 57
 cryptsetup -y -v luksFormat ${USB_DRIVE}