Provision an Arch Linux installation. Heavily inspired by pigmonkey/spark
# ansible-playbook -i localhost playbook.yml
wifi-menu
timedatectl set-ntp true
Get a list of partitions to determine what needs to be partitoned.
fdisk -l
Open up the target device for partitioning. If you are making a new EFI boot partition make sure it is of type EFI
.
cfdisk /dev/device
If you're making a new EFI boot partition you'll need to format it.
mkfs.fat -F32 /dev/bootpartition
Format the OS partition
mkfs.ext4 /dev/ospartition
Mount the OS and boot partitions
mount /dev/ospartition /mnt
mkdir -p /mnt/boot
mount /dev/bootpartition /mnt/boot
pacstrap /mnt base
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/US/America/Los_Angeles /etc/localtime
hwclock --systohc
Uncomment en_US.UTF-8 UTF-8
in locale file
/etc/locale.gen
en_US.UTF-8
Generate locale
locale-gen
Set the LANG variable in locale.conf file
/etc/locale.conf
LANG=en_US.UTF-8
Mount the EFI partition on windows by default
/etc/fstab
...
/dev/bootpartition /boot vfat defaults 0 0
pacman -S intel-ucode
Create files:
/etc/hosts
127.0.0.1 localhost.localdomain ravager
::1 localhost.localdomain ravager
/etc/hostname
ravager
Install prerequisites for wifi-menu
pacman -S dialog iw wpa_supplicant
Install bootloader
bootctl install
Configure bootloader
nano /boot/loader/loader.conf
default arch
timeout 10
editor 0
Add boot entry
ls --lart /dev/disk/by-partuuid/ | grep /dev/ospartition | cut -d' ' -f10 >> /boot/loader/entries/arch.conf
nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=[USE OUTPUT OF PREVIOUS COMMAND HERE] rw
Set root password
passwd
umount -R /mnt
reboot
Install prerequisites
pacman -Syy python2-passlib ansible git openssh
Install id_rsa and id_rsa.pub from usb:
mkdir /tmp/usb
mount /dev/sdb1 /tmp/usb
cp /tmp/usb/id_rsa* /tmp/
mkdir /root/.ssh/
cp /tmp/id_rsa* /root/.ssh/
cd /root/
git clone [email protected]:ratabora/arch-linux-provisioner.git
cd arch-linux-provisioner
git submodule init && git submodule update
- If installing using a VM make sure to boot the VM using EFI before your first boot.