ArchLinux

ArchLinux installation instructions is found here.

This is supposed to be a shorter comprehensive description on how I usually do a basic installation of ArchLinux. This note does not describe how you install a desktop system.

Start by downloading an iso using a link found here (for a more direct link see references).

Installation

Boot the iso and when on the prompt start by loading correct keyboard layout if needed, see available keymaps in /usr/share/kbd/keymaps/i386/qwerty/. E.g. for Swedish keyboard:

# loadkeys sv-latin1

Partition the disk

# fdisk /dev/sda

In fdisk create a new partition by pressing n and for a simple installation it is enough with one parition for the entire disk.

Create file system and mount the parition

# mkfs.ext4 /dev/sda1
# mount /dev/sda1 /mnt

Install base packages, optionally also base-devel packages, dhcp server and an editor, on the mounted partition. It can be a good idea to first edit /etc/pacman.d/mirrorlist and select only the mirrors to use.

# pacstrap /mnt base base-devel linux vim dhcpcd

Generate /etc/fstab

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

Change root into the installed system

# arch-chroot /mnt

Set time zone and clock

# ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime

# hwclock --systohc

Set locale by uncommenting the line for locale in/etc/locale.gen e.g. for Swedish and US locales:

en_US.UTF-8 UTF-8
sv_SE.UTF-8 UTF-8

Now generate the locales:

# locale-gen

Set LANG variable and other locale related variables in /etc/locale.conf:

LANG=C
LC_NUMERIC=sv_SE.utf8
LC_TIME=C
LC_MONETARY=sv_SE.utf8
LC_PAPER=sv_SE.utf8
LC_MEASUREMENT=sv_SE.utf8

With this configuration language in the console will be english, dates in english but all other as standard for a Swede.

Set keyboard layout peristent in /etc/vconsole.conf:

KEYMAP=sv-latin1

Set hostname in /etc/hostname and set hosts file /etc/hosts to

127.0.0.1   localhost
::1         localhost

Create initram

# mkinitcpio -p linux

Set root password

# passwd

Install grub bootloader

# pacman -S grub
# grub-install --target=i386-pc /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg

Exit chroot and reboot

# exit
# reboot

Configuration

When rebooted, log in as root with the password set above.

Networking

Start dhcp daemon and enable it persistent:

# systemctl start dhcpcd
# systemctl enable dhcpcd

Users

Add a user, e.g. with username arch

# useradd -m -G users -s /bin/bash arch
# passwd arch

Configure sudo

Enable sudo by adding user to sudo group and make members of sudo able to do sudo

# pacman -S sudo

Edit sudo properties with the command:

# visudo

Uncomment the line

%sudo ALL=(ALL) ALL

Create sudo group

# groupadd sudo

Add user to sudo group

# gpasswd -a arch sudo

Now logout root user and login as user arch.

Available VM image

I have made such an installation in a VirtualBox VM which can be found here as a VMDK (Virtual Machine Disk).

Use the VM image

Download the image. Open VirtualBox and create a new VM, in the Create Virtual Machine guide in the Hard Disk section select “Use existing virtual hard disk file” and browse to find the downloaded VM.

Start the vm. Log in as arch:arch. Update with

$ sudo pacman -Syu

Use the VM at your own risk. This VM is made for my own use if I need a new fresh VM.

References

ArchLinux

Arch Linux installation guide

Download latest iso (Norwegian link)