-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
64 lines (48 loc) · 1.25 KB
/
Copy pathinstall.sh
File metadata and controls
64 lines (48 loc) · 1.25 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
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
if [ "$(id -g)" != "0" ]; then
echo "You are not root !"
exit 1
fi
# Asuming the keyboard layout is 'azerty'
# otherwise choose a file from /usr/share/kbd/keymaps/*/*.map.gz
loadkeys fr-pc
#is_in_uefi=1
if [ ! -d /sys/firmware/efi/efivars ]; then
#is_in_uefi=0
echo "BIOS mode detected"
fi
if ! ping -c1 archlinux.org > /dev/null 2>&1; then
echo "fix your network connection first"
exit 1
fi
timedatectl set-ntp true
echo "Configure your partitions:"
echo "For example"
echo "BIOS with MBR: /boot and /"
echo "UEFI with GPT: /boot or /efi and /"
echo "[Press enter to continue]"
read -r
cfdisk
clear
echo "Enter the root partition / (for instance /dev/sda2): "
read -r root
echo "Enter the boot partition: "
read -r boot
mkfs.ext4 "$root"
mkfs.ext4 "$boot"
mount "$root" /mnt
mkdir /mnt/boot
mount "$boot" /mnt/boot
echo "Do you want to edit the mirror list ? [Y/n]: "
read -r ml
if [ "$ml" = "Y" ] || [ "$ml" = "y" ]; then
vi /etc/pacman.d/mirrorlist
fi
pacstrap /mnt base
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt sh -c "$(curl -fsSL https://github.com/ghuter/archinstall/raw/master/chroot_cmds.sh)"
echo "Do you want to reboot now ? [Y/n]"
read -r rb
if [ "$rb" = "Y" ] || [ "$rb" = "y" ]; then
reboot
fi