-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
122 lines (109 loc) · 2.53 KB
/
index.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/bash
source config
function createPartitions
{
sgdisk --zap-all $DRIVE
sleep 1
sgdisk --clear \
--new=1:0:+600MiB --typecode=1:ef00 --change-name=1:EFI \
--new=2:0:+500MiB --typecode=2:8300 --change-name=2:BOOT \
--new=3:0:0 --typecode=3:8300 --change-name=3:SYSTEM \
$DRIVE
sleep 1
# Init Filesystem
mkfs.vfat -F32 /dev/disk/by-partlabel/EFI
sleep 1
mkfs.ext4 /dev/disk/by-partlabel/BOOT
sleep 1
mkfs.ext4 /dev/disk/by-partlabel/SYSTEM
}
function setupEncryption
{
modprobe dm-crypt dm-mod
sleep 1
cryptsetup luksFormat -v -s 512 -h sha512 /dev/disk/by-partlabel/SYSTEM
sleep 1
cryptsetup --persistent open /dev/disk/by-partlabel/SYSTEM archsystem
sleep 1
}
function setupFilesystemExt4
{
if [ "$ENCRYPT_SYSTEM" = true ]; then
SYSTEM_DRIVE=/dev/mapper/archsystem
else
SYSTEM_DRIVE=/dev/disk/by-partlabel/SYSTEM
fi
mount $SYSTEM_DRIVE /mnt
sleep 1
}
function setupFilesystemBtrfs
{
if [ "$ENCRYPT_SYSTEM" = true ]; then
SYSTEM_DRIVE=/dev/mapper/archsystem
else
SYSTEM_DRIVE=/dev/disk/by-partlabel/SYSTEM
fi
mkfs.btrfs -f -L archbtrfs $SYSTEM_DRIVE
sleep 1
mount $SYSTEM_DRIVE /mnt
sleep 1
# Mount Filesystem
btrfs subvolume create /mnt/@
sleep 1
btrfs subvolume create /mnt/@home
sleep 1
btrfs subvolume create /mnt/@var
sleep 1
btrfs subvolume create /mnt/@snapshots
sleep 1
umount /mnt
sleep 1
mount -o noatime,compress=lzo,subvol=@ $SYSTEM_DRIVE /mnt
sleep 1
mkdir -p /mnt/{home,var,.snapshots}
sleep 1
mount -o noatime,compress=lzo,subvol=@home $SYSTEM_DRIVE /mnt/home
sleep 1
mount -o noatime,compress=lzo,subvol=@var $SYSTEM_DRIVE /mnt/var
sleep 1
mount -o noatime,compress=lzo,subvol=@snapshots $SYSTEM_DRIVE /mnt/.snapshots
sleep 1
}
function mountBoot
{
mkdir /mnt/boot
sleep 1
mount /dev/disk/by-partlabel/BOOT /mnt/boot
sleep 1
mkdir /mnt/boot/EFI
sleep 1
mount /dev/disk/by-partlabel/EFI /mnt/boot/EFI
sleep 1
}
function installSystemArch
{
pacstrap /mnt base base-devel linux linux-headers linux-firmware vim curl btrfs-progs
sleep 1
genfstab -U /mnt >> /mnt/etc/fstab
sleep 1
vim /mnt/etc/fstab
sleep 1
curl -LJO tomasrejhons.github.io/malis/post-install
sleep 1
cp post-install /mnt/post-install
sleep 1
cp config /mnt/config
sleep 1
arch-chroot /mnt
}
createPartitions
if [ "$ENCRYPT_SYSTEM" = true ]; then
setupEncryption
fi
if [ "$USE_BTRFS" = true ]; then
setupFilesystemBtrfs
else
setupFilesystemExt4
fi
mountBoot
installSystemArch