-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstep2uefi.sh
More file actions
executable file
·53 lines (42 loc) · 1.33 KB
/
step2uefi.sh
File metadata and controls
executable file
·53 lines (42 loc) · 1.33 KB
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
50
51
52
53
#!/bin/bash
timedatectl set-ntp true
#PARTITIONING THE DISKS: boss fight #1
#ask which disk to install on, set disk to variable
clear
lsblk
read -p "Which disk would you like to install Aperture Linux to? [/dev/sdX or /dev/nvmeXn1]: " installdrive
#warn user that disk will be totally wiped
clear
read -p "$installdrive will be totally wiped, are you sure you want to continue? [Y/n]: " agreement
if [ $agreement != Y ];
then
exit 00
fi
export installdrive
#clear signature from install drive
wipefs --all --force $installdrive
read -p "THIS WILL DELETE THE ENTIRE HARD DRIVE. NOTHING WILL REMAIN. EVERYTHING WILL BE COMPLETELY WIPED. ARE YOU SURE YOU WISH TO CONTINUE? [Y/n]: " agreement2
if [ $agreement2 != Y ];
then
exit 00
fi
#fdisk process based on variables
sgdisk $installdrive -Z
sgdisk $installdrive -o
sgdisk $installdrive -n 1:0:512MiB
sgdisk $installdrive -n 2:513MiB:
sgdisk $installdrive -t 1:ef00
if [[ $var == *"nvme"* ]]; then
mkfs.ext4 "$installdrive"p2
mkfs.fat -F32 "$installdrive"p1
mount "$installdrive"p2 /mnt
mkdir /mnt/efi
mount "$installdrive"p1 /mnt/efi;
else
mkfs.ext4 "$installdrive"2
mkfs.fat -F32 "$installdrive"1
mount "$installdrive"2 /mnt
mkdir /mnt/efi
mount "$installdrive"1 /mnt/efi
fi
. ./step3.sh