forked from trxxshed/archinstall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stage2.sh
70 lines (57 loc) · 2.25 KB
/
stage2.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env bash
# Set Hostname
read -p "[Enter Hostname]: " hostname
echo $hostname > /etc/hostname
# Change Root Passwd
echo "[Enter Root Passwd]"
passwd
# Setup User
read -p "[Enter Username]: " username
useradd -mG wheel $username
echo "[Enter Username Passwd]"
passwd $username
export EDITOR=nano
sed --in-place=.bak 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
# Sys Clock
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc
# Locale
sed --in-place=.bak 's/^#de_DE\.UTF-8/de_DE\.UTF-8/' /etc/locale.gen
locale-gen
echo LANG=de_DE.UTF-8 > /etc/locale.conf
echo LC_ALL= >> /etc/locale.conf
# Vconsole
echo "KEYMAP=de-latin1-nodeadkeys" > /etc/vconsole.conf
# Hosts file
echo -e "127.0.0.1\tlocalhost" >> /etc/hosts
echo -e "::1\t\tlocalhost" >> /etc/hosts
echo -e "127.0.1.1\t$hostname.localdomain\t$hostname" >> /etc/hosts
# Pacman
pacman -Syyu
pacman --noconfirm -S networkmanager iwd wireless_tools mtools reflector linux-headers xdg-utils xdg-user-dirs intel-ucode
# Mkinitcpio Config
sed --in-place=.bak 's/^MODULES=()/MODULES=(ext4)/' /etc/mkinitcpio.conf
sed --in-place=.bak 's/^HOOKS=.*/HOOKS=(base udev autodetect keyboard keymap modconf block encrypt lvm2 filesystems keyboard fsck)/' /etc/mkinitcpio.conf
mkinitcpio -p linux
# Systembootd Setup
bootctl --path=/boot install
echo default arch >> /boot/loader/loader.conf
echo timeout 5 >> /boot/loader/loader.conf
# blkid -s UUID -o value /dev/sda2 > uuid.tmp
# uuid=$(<uuid.tmp)
blkid -s PARTUUID -o value /dev/sda2 > partuuid.tmp
partuuid=$(<partuuid.tmp)
echo "title Arch Linux" >> /boot/loader/entries/arch.conf
echo "linux /vmlinuz-linux" >> /boot/loader/entries/arch.conf
echo "initrd /intel-ucode.img" >> /boot/loader/entries/arch.conf
echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf
# echo "options cryptdevice=UUID=$uuid:vg0 root=/dev/mapper/vg0-root" >> /boot/loader/entries/arch.conf
echo "options cryptdevice=PARTUUID=$partuuid:vg0 root=/dev/mapper/vg0-root" >> /boot/loader/entries/arch.conf
# Systemd
systemctl disable NetworkManager
systemctl enable iwd
# Login Errors
echo "blacklist dell_laptop" > /etc/modprobe.d/blacklist.conf
rfkill block bluetooth
# Get Dots
# git clone https://github.com/archungus333/dots.git /home/$username