forked from miguelrcborges/archinstallscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
46 lines (38 loc) · 938 Bytes
/
start.sh
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
#!/bin/bash
if [ $root ]
then
mkfs.xfs -f $root || exit && mount $root /mnt && mkdir /mnt/boot
else
echo "Root partition not added. Read the README of the github repo."
exit
fi
if [ $boot ]
then
mkfs.fat -F32 $boot || exit && mount $boot /mnt/boot
else
echo "Boot partition not added. Read the README of the github repo."
umount /mnt
exit
fi
if [ $swap ]
then
mkswap $swap || exit && swapon $swap
fi
if [ $home ]
then
mkfs.xfs -f $home || exit && mount $home /mnt/home
fi
if ! [ $kernel ]
then
export kernel=linux
fi
pacstrap /mnt base $kernel $kernel-headers linux-firmware || exit
timedatectl set-ntp true
genfstab -U /mnt >> /mnt/etc/fstab
curl -L https://raw.githubusercontent.com/miguelrcborges/archinstallscript/main/chroot-script.sh -o /mnt/chroot-script.sh
arch-chroot /mnt sh chroot-script.sh
if [ $network == "systemd-networkd" ]
then
cp -r /etc/systemd/network /mnt/etc/systemd/network
fi
reboot