Arch

From Indie IT Wiki

Install A Package

pacman -S packagename

Update System

pacman -Syu

Installation in Oracle VirtualBox

After boot ensure network/internet available:

ping www.google.com

Update system clock

timedatectl set-ntp true

Partition disk

cfdisk

From 'Select label type' options pick 'dos'

New -> size main partition (ie 7GB for standard 8GB VB setup) > select 'primary' > tab across to Bootable, press enter

Arrow down to free space > press enter > new > primary > type > 82 (swap) > enter Write > yes (in full) > enter > quit

Format the partition(s)

mkfs.ext4 /dev/sda1

Initialize swap partition

mkswap /dev/sda2
swapon /dev/sda2

Mount system files

mount /dev/sda1 /mnt

Install essential packages and extras

pacstrap /mnt base base-devel linux linux-firmware nano dhcpcd grub amd-ucode vim virtualbox-guest-utils xf86-video-vmware virtualbox-guest-modules-arch

Generate an fstab file

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

Change to root in new system

arch-chroot /mnt

Set timezone

ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime

Setting up Locale.

File /etc/locale.gen contains all the local settings and system language in a commented format. Open the file using vi editor and un-comment the language you prefer. for my purposes it is en_GB.UTF-8.

Now generate the locale config in /etc directory file using the commands below:

locale-gen
echo LANG=en_GB.UTF-8 > /etc/locale.conf
export LANG=en_GB.UTF-8

Enable dhcpcd

systemctl enable dhcpcd 

Add required users

useradd -m firstinitiallastname

Add password for new user

passwd firstinitiallastname

Add user to groups

usermod -aG wheel,audio,video,optical,storage firstinitiallastname

Add user to sudoers file

visudo

Uncomment the line that reads

%wheel ALL=(ALL) ALL

Install bootloader

grub-install /dev/sda

After installation, run configuration of GRUB

grub-mkconfig -o /boot/grub/grub.cfg

Configure network, first identify network card

ip link

For instance 'enp0s3'

nano  /etc/systemd/network/enp0s3.network

Save and exit, then restart systemd network for the changes to be reflected

systemctl restart systemd-networkd
systemctl enable systemd-networkd

Add the below two entries in /etc/resolv.conf file

nameserver 8.8.8.8
nameserver 8.8.4.4

Save and exit

Install the Xorg as display server

pacman -S xorg xorg-server

Install display drivers for you brand of GFX card

Intel

sudo pacman -S xf86-video-intel mesa

AMD

sudo pacman -S xf86-video-amdgpu mesa

NVIDIA

sudo pacman -S nvidia nvidia-utils