Yet Another Arch Guide

Setting up Arch with other bells and whistles.

Target

Lenovo X240 i5-4300U 8GB DDR3 RAM 500GB SSD

Pre-requirements

  • Bootable USB with Arch installer installed
  • Cabled connection
  • Device connected to a power supply

First things first

Keyboard layout

loadkeys [keyboard-identifier]

Check your internet connection

ping archlinux.org

Set timezone

timedatectl set-timezone Europe/Brussels

Prepairing your disks

Check which disks you have available

fdisk -l

Partitioning

Device your disk into individual partitions:

  1. boot
  2. arch
  3. windows

Some letters we gonna use

  • p show your partition
  • n new partition
  • a set the bootflag
  • t set the type
  • L show available types
  • w write the changes

The actual work

fdisk [your-disk]

press n to create a new partition, the first prompt asks the type of partition, use p for Primary Partition number, enter. first sector, enter. goto ‘Specify your sizes’.

Specify your sizes

+[SIZE][TGMK]

Set the bootflag

A partition needs a bootflag for the MBR know which partition use at startup

Set the types

Use t to set the type:

83 for boot (linux) 8e for arch (lvm) 7 for windows (HPFS/NTFS/exFAT)

LVM

pvcreate /dev/sda2
vgcreate vg0 /dev/sda2
lvcreate -L +2G -n swap vg0
lvcreate -l 100%FREE -n swap vg0

Filesystems

mkswap /dev/mapper/vg0-swap
mkfs.ext4 /dev/sda1
mkfs.xfs /dev/mapper/vg0-root

Mount your disks and strap your seatbelt, we gonna pacstrap

mount /dev/mapper/vg0-root /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
pacstrap /mnt base base-devel vim bash-completion networkmanager

Make sure it boots!

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

making it yours

arch-chroot /mnt

Time, Date, Region

ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime
hwclock --systohc
locale-gen

/etc/locale.conf

LANG=en_US.UTF-8 UTF-8

/etc/vconsole.conf

KEYMAP=be-latin1

/etc/hostname

myhostname

/etc/hosts

127.0.0.1   localhost
::1     localhost
127.0.0.1   myhostname.localdomain  myhostname
passwd

Grub

pacman -S grub
grub-install /dev/sda
grub-mkconfig > /boot/grub/grub.cfg

Ignore warnings

fstab

Add swap to fstab

/dev/mapper/vg0-swap swap swap default 0 0

Check your work by swapping the swap

swapoff -a
mount -a
swapon -a
free

does your swap have bytes?

LVM can’t bot

Add the LVM module to the mkinitcpio config file at /etc/mkinitcpio.conf

add lvm2 to the HOOKS Array before filestystems

...
HOOKS=(base udev autodetect modconf block lvm2 filestystems keyboard fsck)
...
mkinitcpio -p linux

Cross fingers - reboot

Enable services

systemctl enable NetworkManager
systemctl start NetworkManager
Tags// ,
More Reading
comments powered by Disqus