blob: 6931fe9edadbe9601954ccf6f575503c4fcedd82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/sh
# First we define the function
ConfirmOrExit ()
{
while true
do
echo -n "Please confirm (y or n) :"
read CONFIRM
case $CONFIRM in
y|Y|YES|yes|Yes) break ;;
n|N|no|NO|No)
echo "Aborting - you entered $CONFIRM"
exit
;;
*) echo "Please enter only y or n"
esac
done
echo "You entered $CONFIRM. Continuing ..."
}
DEV=$1
echo "Device: $DEV\n"
ConfirmOrExit
parted --script $DEV \
mklabel gpt \
unit mib \
mkpart primary 1 3 \
name 1 grub \
set 1 bios_grub on \
mkpart ESP fat32 3 125 \
name 2 efi \
set 2 boot on \
mkpart primary ext4 125 1128 \
name 3 boot \
mkpart primary ext4 1128 5128 \
name 4 root \
mkpart primary ext4 5128 6128 \
name 5 var \
mkpart primary ext4 6128 14128 \
name 6 usr \
mkpart primary linux-swap 14128 18128 \
name 7 swap \
mkpart primary ext4 18128 100% \
name 8 home
exit 0;
|