- Install Git and Ansible:
$ pacman -S git ansible
- Install Ansible "aur" module :
$ git clone https://github.com/kewlfft/ansible-aur.git ~/.ansible/plugins/modules/aur
- Clone this repository:
$ git clone https://github.com/thled/ansible-arch.git
- Change to project directory:
$ cd ansible-arch
- Run the Ansible Playbook:
$ ansible-playbook playbook.yml
- Reboot system.
- Login with your chosen username and start the window manager:
$ startx
- Add SSH keys to
~/.ssh/
. - Sync Firefox config and addons by logging in.
- Configure bluetooth headset:
$ pulseaudio -k
$ systemctl start bluetooth
$ bluetoothctl
$ default-agent
$ scan on
$ pair CC:98:8B:1B:7B:B1
$ connect CC:98:8B:1B:7B:B1
$ trust CC:98:8B:1B:7B:B1
$ exit
- Start Neovim by typing
$ nvim
and wait while it initializes. - Use the shortcut Win+p to start any application.
- Install any application by using
$ paru APP
. - Use Arandr to configure screenlayout. Or use presets like
$ .screenlayout/xps49.sh
.
- Download Arch Linux ISO.
- Verify UEFI:
$ ls /sys/firmware/efi/efivars
- Verify internet:
$ ping -c3 google.com
- If no internet:
$ iwctl
$ device list
$ station DEVICE scan
$ station DEVICE get-networks
$ station DEVICE connect SSID
- Still no internet:
$ dhcpcd
- If no internet:
- Verify block device is
/dev/nvme0n1
:$ fdisk -l
- Download script:
$ curl -LO https://raw.githubusercontent.com/thled/ansible-arch/master/arch-install.sh
- Execute script:
$ bash arch-install.sh
- Reboot, login as root and connect to wifi
- List wifi networks:
$ nmcli device wifi list
- Connect to wifi:
$ nmcli device wifi connect SSID password PASSWORD
- List wifi networks:
- Download Arch Linux ISO.
- Verify UEFI:
$ ls /sys/firmware/efi/efivars
- Verify internet:
$ ping -c3 google.com
- If no internet:
$ iwctl
$ device list
$ station DEVICE scan
$ station DEVICE get-networks
$ station DEVICE connect SSID
- Still no internet:
$ dhcpcd
- If no internet:
- Verify block device is
/dev/sda
:$ fdisk -l
- Partition disks:
$ fdisk /dev/sda
- New partition layout:
$ g
- New efi partition:
$ n
, Return, Return,$ +500M
- Set type of efi:
$ t
,$ 1
("EFI") - New boot partition:
$ n
, Return, Return,$ +500M
- New root partition:
$ n
, Return, Return, Return - Set type of root:
$ t
, Return,$ 24
("root x86_64") - Write partitions:
$ w
- New partition layout:
- Format partitions
$ mkfs.fat -F32 /dev/sda1
$ mkfs.ext4 /dev/sda2
$ cryptsetup luksFormat /dev/sda3
$ cryptsetup open /dev/sda3 cryptroot
$ mkfs.ext4 /dev/mapper/cryptroot
- Mount file systems
$ mount /dev/mapper/cryptroot /mnt
$ mkdir /mnt/boot
$ mount /dev/sda2 /mnt/boot
$ mkdir /mnt/boot/efi
$ mount /dev/sda1 /mnt/boot/efi
- Install system:
$ pacstrap /mnt base linux linux-lts linux-firmware vim networkmanager grub efibootmgr
- Generate UUID for FS:
$ genfstab -U /mnt >> /mnt/etc/fstab
- Switch to new system:
$ arch-chroot /mnt
- Set root PW:
$ passwd
- Setup mkinitcpio
- Add
encrypt
inHOOKS
beforefilesystem
:$ vim /etc/mkinitcpio.conf
- Create images
$ mkinitcpio -p linux
$ mkinitcpio -p linux-lts
- Add
- Make swap file
$ fallocate -l 2G /swapfile
$ chmod 600 /swapfile
$ mkswap /swapfile
$ echo /swapfile none swap sw 0 0 >> /etc/fstab
- Select mirrors:
$ vim /etc/pacman.d/mirrorlist
- Update clock:
$ timedatectl set-ntp true
- Set timezone
$ ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
$ hwclock --systohc
- Add localization
- Uncomment
en_US.UTF-8 UTF-8
:$ vim /etc/locale.gen
$ locale-gen
$ echo LANG=en_US.UTF-8 >> /etc/locale.conf
- Uncomment
- Enable NetworkManager:
$ systemctl enable NetworkManager
- Configure network
$ echo HOSTNAME > /etc/hostname
- Add hosts
$ echo 127.0.0.1 localhost >> /etc/hosts
$ echo ::1 localhost >> /etc/hosts
$ echo 127.0.1.1 HOSTNAME.localdomain HOSTNAME >> /etc/hosts
- Configure bootloader
- Edit
$ vim /etc/default/grub
- Add to
GRUB_CMDLINE_LINUX_DEFAULT
beforequiet
:cryptdevice=/dev/sda3:cryptroot:allow-discards
- Uncomment
GRUB_ENABLE_CRYPTODISK
- Add to
$ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch --recheck
$ grub-mkconfig -o /boot/grub/grub.cfg
- Edit
- Reboot system
$ exit
$ umount -R /mnt
$ shutdown
- Login as root and connect to wifi
- List wifi networks:
$ nmcli device wifi list
- Connect to wifi:
$ nmcli device wifi connect SSID password PASSWORD
- List wifi networks:
- Verify internet:
$ ping -c3 google.com
- If no internet:
$ iwctl
$ device list
$ station DEVICE scan
$ station DEVICE get-networks
$ station DEVICE connect SSID
- Still no internet:
$ dhcpcd
- If no internet:
- Verify block device is
/dev/sda
:$ fdisk -l
- Partition disks:
$ fdisk /dev/sda
- New partition layout:
$ o
- New boot partition:
$ n
, Return, Return,$ +500M
- New root partition:
$ n
, Return, Return, Return - Write partitions:
$ w
- New partition layout:
- Format partitions
$ mkfs.ext4 /dev/sda1
$ cryptsetup luksFormat /dev/sda2
$ cryptsetup open /dev/sda2 cryptroot
$ mkfs.ext4 /dev/mapper/cryptroot
- Mount file systems
$ mount /dev/mapper/cryptroot /mnt
$ mkdir /mnt/boot
$ mount /dev/sda1 /mnt/boot
- Install system:
$ pacstrap /mnt base linux linux-lts linux-firmware vim networkmanager grub efibootmgr
- Generate UUID for FS:
$ genfstab -U /mnt >> /mnt/etc/fstab
- Switch to new system:
$ arch-chroot /mnt
- Set root PW:
$ passwd
- Setup mkinitcpio
- Add
encrypt
inHOOKS
beforefilesystem
:$ vim /etc/mkinitcpio.conf
- Create images
$ mkinitcpio -p linux
$ mkinitcpio -p linux-lts
- Add
- Make swap file
$ fallocate -l 2G /swapfile
$ chmod 600 /swapfile
$ mkswap /swapfile
$ echo /swapfile none swap sw 0 0 >> /etc/fstab
- Select mirrors:
$ vim /etc/pacman.d/mirrorlist
- Update clock:
$ timedatectl set-ntp true
- Set timezone
$ ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
$ hwclock --systohc
- Add localization
- Uncomment
en_US.UTF-8 UTF-8
:$ vim /etc/locale.gen
$ locale-gen
$ echo LANG=en_US.UTF-8 >> /etc/locale.conf
- Uncomment
- Enable NetworkManager:
$ systemctl enable NetworkManager
- Configure network
$ echo HOSTNAME > /etc/hostname
- Add hosts
$ echo 127.0.0.1 localhost >> /etc/hosts
$ echo ::1 localhost >> /etc/hosts
$ echo 127.0.1.1 HOSTNAME.localdomain HOSTNAME >> /etc/hosts
- Configure bootloader
- Edit
$ vim /etc/default/grub
- Add to
GRUB_CMDLINE_LINUX_DEFAULT
beforequiet
:cryptdevice=/dev/sda2:cryptroot:allow-discards
- Uncomment
GRUB_ENABLE_CRYPTODISK
- Add to
$ grub-install /dev/sda
$ grub-mkconfig -o /boot/grub/grub.cfg
- Edit
- Reboot system
$ exit
$ umount -R /mnt
$ shutdown
- Login as root and connect to wifi
- List wifi networks:
$ nmcli device wifi list
- Connect to wifi:
$ nmcli device wifi connect SSID password PASSWORD
- List wifi networks: