This is a little guide/how-to on MY Arch Linux install process, this is just what I did and by no means a thorough walk through of the it all. My only aim is to simplify the documentation available on the Arch wiki for my use in the future or to help anybody who may find it useful.
First off, burn the latest Arch ISO to a DVD or flash it to a USB stick. I will assume you already know how to do this and get down to it.
I try to follow the Beginners Guide from the wiki however I partition my hard drive first using gparted from either a Live CD/USB or from an operating systems Live CD/DVD/USB BEFORE starting the Arch install.
Change the language
By default the keyboard layout is set to US. If you have a non-US keyboard layout then simply run:
# loadkeys uk
Next you should change the font :
# setfont Lat2-Terminus16
To change the language edit the locale file and delete the “#” before the language of choice, choose the UTF-8 entry :
# nano /etc/locale.gen
en_US.UTF-8 UTF-8 en_GB.UTF-8 UTF-8
CTRL+X to exit Y to save and then hit ENTER, then run these commands :
# locale-gen # export LANG=en_GB.UTF-8
Establish an internet connection
Try to ping a server to see if a connection was established. E.G googles webservers:
# ping -c 3 www.google.com
PING www.l.google.com (188.8.131.52) 56(84) bytes of data.
64 bytes from wb-in-f105.1e100.net (184.108.40.206): icmp_req=1 ttl=50 time=17.0 ms
64 bytes from wb-in-f105.1e100.net (220.127.116.11): icmp_req=2 ttl=50 time=18.2 ms
64 bytes from wb-in-f105.1e100.net (18.104.22.168): icmp_req=3 ttl=50 time=16.6 ms
--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms
If you get a
ping: unknown host error, first check to make sure the cable is inserted correctly both in your PC and your modem/router, if not head over to the Arch wiki and check the Beginners guide “Establish an internet connection” section.
NOTE : I partitioned my hard drive before starting the install process, i kept it easy with only 2 partitions; 1 = somewhere to install the OS and any documents/files, 2 = a swap partition, this is optional. I chose this simple layout as i tried installing Arch a few times before being successful and wasn’t sure if it was problems with my partition table/mounting or problems with the bootloader (tried GRUB many times and failed, when i tried syslinux it worked straight away).
Partitioning your hard drive isn’t enough, the partitions need a filesystem too. I formatted my partitions to ext4 and swap respectively.
WARNING : Double check and triple check that it is actually
/dev/sda2 that you want to format. You can use
lsblk to help with this.
# mkfs.ext4 /dev/sda1
# mkswap /dev/sda2
# swapon /dev/sda2
Mount the partitions
To display your current partition layout simply run :
# lsblk /dev/sda
NOTE : Do not mount more than one partition to the same directory. And pay attention, because the mounting order is important.
We mount the root partition on /mnt just run :
# mount /dev/sda1 /mnt
Select a mirror
Before installing, you need to edit the
mirrorlist file and place your preferred mirror(s) first.
# nano /etc/pacman.d/mirrorlist
## ## Arch Linux repository mirrorlist ## Sorted by mirror score from mirror status page ## Generated on 2012-MM-DD ##Server = http://mirror.example.xyz/archlinux/$repo/os/$arch ...
Alt+6to copy a
PageUpkey to scroll up.
Ctrl+Uto paste it at the top of the list.
Ctrl+Xto exit, and when prompted to save changes, press
Enterto use the same filename.
NOTE : Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with
pacman -Syy. This is considered to be good practice and will avoid possible headaches.
Install the base system
The base system is installed using the pacstrap script. this gives you just a base system, the rest can be installed later using pacman.
# pacstrap /mnt base
Generate an fstab
Generate an fstab file by running following command :
# genfstab -U -p /mnt >> /mnt/etc/fstab # nano /mnt/etc/fstab
WARNING : The fstab file should always be checked after generating it. If you encounter errors running genfstab or later in the install process, do not run genfstab again; just edit the fstab file.
Chroot and configure the base system
Now we are going to chroot into the freshly installed base system
# arch-chroot /mnt /bin/bash
There are two files that need editing :
locale.conf. Choose the UTF-8 encoding.
# nano /etc/locale.gen
en_US.UTF-8 UTF-8 en_GB.UTF-8 UTF-8 # locale-gen
# echo LANG=en_GB.UTF-8 > /etc/locale.conf # export LANG=en_GB.UTF-8
Console font and keymap
We need to reload the keymap/fonts we set earlier as things have changed.
# loadkeys uk # setfont Lat2-Terminus16
# nano /etc/vconsole.conf
Now we set the time zone
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime
Set the hardware clock mode uniformly between your operating systems.
NOTE: Using UTC for the hardware clock does not mean that software will display time in UTC.
# hwclock --systohc --utc
Set the hostname to something of your own (E.G. arch) :
# echo myhostname > /etc/hostname
Configure the network
The network needs configuring again for our newly installed system. If more info is needed check the wiki.
# systemctl enable dhcpcd.service
Set the root password
You can set the root password with :
Install and configure a bootloader
For my bootlader i chose syslinux (after several attempts with GRUB which all failed and ended up with me at a grub rescue screen). Much more detailed information can be found at the wiki.
# pacman -S syslinux # syslinux-install_update -i -a -m
# nano /boot/syslinux/syslinux.cfg
... LABEL arch ... APPEND root=/dev/sda3 rw ...
Unmount the partitions and reboot
First we exit the chroot environment :
Then unmount your partitions :
# umount -R /mnt
We will add a user so we do not have to be logged in as root all the time.
# useradd -m -g users -G wheel -s /bin/bash mic
To set your password, type :
# passwd [username]
Graphical User Interface
# pacman -S xorg-server xorg-server-utils xorg-xinit
Install mesa for 3D support:
# pacman -S mesa
Install a video driver
The Linux kernel includes open-source video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11.
If you do not know which video chipset is available on your machine, run:
$ lspci | grep VGA
For a complete list of open-source video drivers, search the package database:
$ pacman -Ss xf86-video | less
vesa driver is a generic mode-setting driver that will work with almost every GPU, but will not provide any 2D or 3D acceleration. If a better driver cannot be found or fails to load, Xorg will fall back to vesa. To install it:
# pacman -S xf86-video-vesa
In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required.
NOTE : If your input devices are not working during this test, install the needed driver from the xorg-drivers group, and try again. For a complete list of available input drivers, invoke a pacman search (press
Q to exit):
$ pacman -Ss xf86-input | less
You only need xf86-input-keyboard or xf86-input-mouse if you plan on disabling hot-plugging, otherwise,
evdev will act as the input driver (recommended).
Install the default environment:
# pacman -S xorg-twm xorg-xclock xterm
To start the (test) Xorg session, run:
A few movable windows should show up, and your mouse should work. Once you are satisfied that X installation was a success, you may exit out of X by issuing the
exit command into the prompts until you return to the console.
If the screen goes black, you may still attempt to switch to a different virtual console (e.g.
Ctrl+Alt+F2), and blindly log in as root. You can do this by typing “root” (press
Enter after typing it) and entering the root password (again, press
Enter after typing it).
You may also attempt to kill the X server with:
# pkill X
If this does not work, reboot blindly with:
Cinnamon desktop environment
We now need to install the display manager and a desktop environment, the display manager is for a graphical login. Simply run (as root) :
# pacman -S gdm cinnamon
To make GDM the default graphical login method for the system, use the packaged systemd service file,
gdm.service. Simply run the following command once to bring up GDM on boot:
# systemctl enable gdm.service
Once logged in you can install applications/programs from the terminal, here is a nice list to help get you started. If you need any help refer to the Arch wiki and forum as well as our good old friend google.