Arch Linux Install

From packets2photons
Jump to navigation Jump to search

This install guide mostly follows the following tutorial, which is the best and easiest to follow. If you prefer a visual guide, you are free to make some use of this video but there are some differences so be careful. Some information has also come from the much more detailed, official installation guide.

The following is a guide based on a 64-bit Host OS, a 64 bit Arch Linux image and the default settings in VMware or Virtualbox.

Formatting Drives =

If you need to change your keyboard layout you can do so with:

loadkeys [keyboard_layout_name]

This will boot you into Arch. Look at the disks by typing:

fdisk -l 

You will be asked about the label type. Select "dos"

This should show you your drives. The /dev/sda is the one that we are going to partition. You can start this with:

cfdisk /dev/sda

Create a new primary partition. I would recommend starting with the swap partition. You can make it 1G. After you have created it, go to type and make it Linux swap.

Make a second partition using the remaining space. Goto Type and ensure it is Linux filesystem. Make it bootable. After you have done this write the changes and then quit.

Format /dev/sda2 with ext4 using the following:

mkfs.ext4 /dev/sda2

Then mount the root drive

mount /dev/sda2 /mnt

Then make the swap partition. Type:

mkswap /dev/sda1
swapon /dev/sda1


We will be installing the base software from a mirror. You should prioritise a mirror that is geographically close to you. Edit the following file with:

vim /etc/pacman.d/mirrorlist

Move an Australian entry to the top.

This is an important step and will dramatically reduce your install time. After this change you can install the base packages with:

pacstrap /mnt base base-devel linux linux-firmware nano vim nmap net-tools

Wait for it to install.

Final Configuration

To perform some final configuration tasks before we boot into the system we will have to utilise the chroot evironment. Type:

arch-chroot /mnt

Then create a root password with:


And create a root password. Then, lets setup the locale, or the location-specific variables.

nano /etc/locale.gen

Remove the comments, the #'s, from any languages that you would use. For me, this was the lines that started with en_AU. Then save and exit.

Create the locale file with:


Set the timezone:

ln -sf /usr/share/zoneinfo/Reigon/City /etc/localtime

Finally, you can set the hostname with:

nano /etc/hostname

Just write the name you want to call your box on the first line, then save and exit.

Installing the bootloader

Lets install the grub bootloader with

pacman -S grub-bios grub os-prober
grub-install /dev/sda

Generate the grub configuration file with:

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

Generate an init file:

mkinitcpio -p linux

After this type:


to exit out of the chroot environment then create the fstab file with:

genfstab /mnt >> /mnt/etc/fstab

Unmount the drive

umount /mnt

Then reboot


Make sure you remove the installation media from the drive.