Arch Installation Guide
You must be thinking - yet another installation guide! There is no dearth of Installation guides of Arch on web. So why another one?
With advancements like BTRFS file system, UEFI motherboards and modern in-development desktop environment like Plasma 5; traditional Arch Wiki guide and Arch Beginners' Guide can only be of a limited help. After I got my new desktop, my goal was to setup it with a modern setup. I decided to go with Arch Linux with btrfs file system and Plasma 5 desktop. Coming from OSX, I just love how far linux has come in terms of looks - quite close to OSX!
For all of you who love installation videos-
I will cover this in two parts. First in this post, I will install the base system. Then, in a follow up post, I will discuss details of setting up final working Plasma 5 desktop.
Download the latest iso from Arch website and create the uefi usb installation media. I used my mac to do this on terminal:
Use this media to boot into your machine. You should boot into UEFI mode if you have a UEFI motherboard and UEFI mode enabled.
To verify you have booted in UEFU mode, run:
This should give you a list of set UEFI variables. Please look at the Begineers' Guide in case you do not get any list of UEFI variables.
Ethernet should have started by default on your machine. If you do not plan to use wifi during installation, you can skip to the next section. If desired later, wifi will still be configurable after you are done with all the installation.
To setup wifi simply run:
This is a pretty straight forward tool and will setup wifi for you for this installation session.
This will also create a file at /etc/netctl/. We will use this file later to enable wifi at the first session after installation.
For editing different configurations, I tend to use vim. So we will update our package cache and install vim.
In my desktop, I have three hard drives, one 256 GB solid state drive (SDD), one 1 TB HDD and another 3TB HDD. I set up my drives as follows: -SDD for root(/), /boot, and /home partitions, 1st HDD for /data and the 2nd HDD for /media partitions.
For UEFI machines, we need to use a GPT partition table and /boot partition has to be a fat32 partition with a minimum size of 512 MB. We will format rest other partitions with BTRFS. See this link for benefits of using btrfs partitions.
First list your hard drives with the following:
Assuming, my setup above, now create gpt partitions and format them.
Then press 2 to create a blank GPT and start fresh
It might now kick us out of gdisk, so get back into it:
Repeat the above procedure for /dev/sdb and /dev/sdc, but create just one partition with all values as default. At the end we will have three partitions: /dev/sda1, /dev/sda2, /dev/sdb1 and /dev/sdc1
Now we will format these partitions.
Now, we will create btrfs subvolumes and mount them properly for installation and final setup.
Now, once the sub-volumes have been created, we will mount them in appropriate locations with optimal flags.
Now, we will do the actually installation of base packages.
Edit the /mnt/ect/fstab file to add following /tmp mounts.
Copy our current wifi setup file into the new system. This will enable wifi at first boot. Next, chroot into our newly installed system.
Finally bind root for installation.
Here are some basic commands you need to run to get the installation started.
We will also add hostname to our /etc/hosts file:
systemd-boot, previously called gummiboot, is a simple UEFI boot manager which executes configured EFI images. The default entry is selected by a configured pattern (glob) or an on-screen menu. It is included with the systemd, which is installed on an Arch systems by default.
Assuming /boot is your boot drive, first run the following command to get started:
It will copy the systemd-boot binary to your EFI System Partition (
/boot/EFI/Boot/BOOTX64.EFI - both of which are
identical - on x64 systems ) and add systemd-boot itself as the default EFI application (default
boot entry) loaded by the EFI Boot Manager.
Finally to configure out boot loader, we will need the UUID of out root drive (/dev/sda2). You can find that by:
Now, make sure that the following two files look as follows, where $UUID is the value obtained from above command:
Please note that you will to need manually run
bootctlcommand every time
First setup hostname using systemd:
Check the "Ethernet controller" entry (or similar) from the
lspci -v output. It should tell you
which kernel module contains the driver for your network device. For example:
Next, check that the driver was loaded via
dmesg | grep module_name. For example:
Proceed if the driver was loaded successfully. Otherwise, you will need to know which module is needed for your particular model. Please follow the Arch Wiki Networking guide for further assistance.
Get current device names via
ip link. For example:
Using this name of the device, we need to configure, enable following two systemd services: systemd-networkd.service and systemd-resolved.service.
For compatibility with resolv.conf, delete or rename the existing file and create the following symbolic link:
Network configurations are stored as *.network in /etc/systemd/network. We need to create ours as follows.:
Now enable these services:
Your network should be ready for first use!
Now we are ready for the first boot! Run the following command:
Awesome! We are ready to play with our new system. Alas! what you have is just a basic installation without any GUI.
Please see my next post for where to go next!