Skip to content

ratabora/arch-linux-provisioner

Repository files navigation

Stories in Ready

arch-linux-provisioner

Provision an Arch Linux installation. Heavily inspired by pigmonkey/spark

How to run

# ansible-playbook -i localhost playbook.yml

initial installation

wifi and time

wifi-menu
timedatectl set-ntp true

disk

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

base packages

pacstrap /mnt base

fstab

genfstab -U /mnt >> /mnt/etc/fstab

time

arch-chroot /mnt
ln -sf /usr/share/zoneinfo/US/America/Los_Angeles /etc/localtime
hwclock --systohc

locale

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

auto mounting boot partition

Mount the EFI partition on windows by default /etc/fstab ...

/dev/bootpartition	/boot	vfat	defaults	0 0

intel

pacman -S intel-ucode

network

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

bootloader

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

password

Set root password

passwd

clean up

umount -R /mnt
reboot

prepare ansible

Install prerequisites

pacman -Syy python2-passlib ansible git openssh

ssh keys

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/

clone the ansible repo

cd /root/
git clone [email protected]:ratabora/arch-linux-provisioner.git
cd arch-linux-provisioner
git submodule init && git submodule update

appendix

VMWare

  • If installing using a VM make sure to boot the VM using EFI before your first boot.

reference material

About

Provision an Arch Linux installation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages