## Booting installer from USB

### Creating bootable USB

In order to create bootable USB, we need to download *.iso file with Arch from https://www.archlinux.org/download/. We also need to have dd (disk dump) program installed. We need to invoke lsblk before inserting USB drive to see our drives and invoke lsblk again after inserting the USB drive to see, which one it is. We can also have a look at disk sizes, what helps in recognizing our disk. Next, we can call dd:

status="progress" parameter will allow us to monitor progress of the whole process.

Note: please, be sure that you are writing on the correct disk! In the example above, we’re writing to /dev/sdb. It may be the same in your case, but it may be different too! It’s just an example!

### BIOS configuration

We need to go into the BIOS before installation. It may be different on different computers. On mine it’s hitting Enter after reboot and then F1. Inside BIOS, we need to change order of booting devices and move USB drive to the top. I also had to disable secure boot and quick boot. Moreover I set UEFI/Legacy Boot to Both (UEFI/Legacy Boot Priority: UEFI First, CSM Support: YES). Sometimes network boot may interrupt boot process, so I set it to USB HDD. I had to play more with this stuff on freshly installed system because it was not booting in the beginning. It may be different on your computer. Sometimes, there may be no issue with it.

## First things

### UEFI check

Once we have booted installer from USB stick, we need to perform UEFI check as follows.

If it outputs an error or nothing, that’s ok and we can proceed with installation. If you see bunch of files, then installation procedure may be different or may require additional steps.

### Internet check

We need to check an internet connection because we will need it to download packages. We can do it just by simple ping:

When we see response, that’s ok.

It’s worth to mention, that it’s good to have ethernet cable connection for the installation process. Optionally, you can use wifi-menu to connect wirelessly, but it’s not recommended for the installation.

## System time and date initial setup

To perform system time and date initial setup, we need to run the following command:

## Partitions

Let’s see what partitions do we have on our system. We can view them with lsblk program.

Before we start doing anything, we should remove existing partitions. We can do it with fdisk tool by running it with our main disk as a parameter. Usually it will be /dev/sda, but in my case it was /dev/nvme0n1. We can get this name from lsblk output.

### Removing existing partitions

Next, we can choose different options. In our case, we need to choose :d to delete partitions. We need to call this option for each partition.

Sometimes, we may have problems with installation or removing old partitions. In that case, we can use alternative method of cleaning disk:

### Creating new partitions

Now, we have to prepare our disk for the future system installation. Our goal is to have the following configuration of the partitions

This is the output from my current system and nvme0n1 is the disk. First partition (nvme0n1p1) is boot partition used during the system boot. Next partition (nvme0n1p2) is a SWAP partition, which acts as an overflow for our RAM memory, when it gets filled up. Third partition (nvme0n1p3) is root partition, which is the root of the file system and programs will be installed there. The last partition (nvme0n1p4) is home partition, where we are going to keep our files.

In order to create new partition, we have to call fdisk /dev/nvme0n1p1 (if we haven’t done it yet).
Let’s create boot partition. Type :c for create. We leave first sector empty, hit Enter in the last sector we put +200M for 200 megabytes, which is recommended value for boot partitoin and confirm it with Enter. We follow this procedure for SWAP, which should have size = 1.5 * size of RAM in computer. I currently have 16GB of RAM, so it’s 1.5 * 16 GB = 24 GB, so I put +24G in the last sector. Next, we can create root partition. It should have around +25G. You can decrease it if you have small disk or increase it if you have huge disk and plans to install a lot of programs. In the end, we are creating home partition, where in the last sector option we can just hit Enter and fdisk will assign remaining disk space to this partition. When we’re done, we should confirm our partition configuration with :w like write. Then, we can type lsblk again to see our written configuration. It should look like in the example above.

### Creating file systems

Next, we can to create file systems on our partitions. In general, we can use ext4, which is Linux file system. Some devices may have boot problems or may have specific BIOS setup. In that case, it’s recommended to use FAT32 file system. Let’s use mkfs program to create file systems.

We will create FAT32 file system on our boot partition:

Then, we will create ext4 file systems on root and home partitions:

### Creating SWAP

Now, we can create SWAP on the nvme0n1p2 partition:

Next, we can turn the SWAP on:

### Mounting partitions

Right now, we are ready to mount our partitions.

We can mount the root partition as follows:

When we list this partition:

we should see lost+found file, which is a generic system file.

Now on the root partition we can create home and boot directories.

and mount our previously created partitions into these dirs:

and then we can type lsblk to see that everything is created properly.

## Arch installation

Now, there is an easy part. We have everything prepared and we’re ready to install the operating system.

Arch can be installed with literally one command:

It’s recommended to install base-devel package, which contains additional software, which may be required to run everything. We can also install vim, to have an editor to edit our configs and other stuff. The final command can look like this:

## Creating fstab

We should also create fstab file, which contains information about system drives and mounted partitions and file systems.
We can do it as follows:

My /etc/fstab file looks like that:

## Operations inside the system

### Changing root

Now, we can change the root:

After typing command above, we jumped from the bootable USB drive into the operating system installed on the disk of our computer.

Now, we’re able to perform operations inside the system.

### Installing network manager

First of all, we should install network manger via pacman to have network and Internet connectivity:

to enable network manager, we can type:

### Installing GRUB

We also have to install GRUB, which will be responsible for booting our operating system:

Next, we have to configure it:

Please note, we provided path to the disk (drive) - not the partition.

Next, we should create /boot/grub/grub.cfg configuration file:

to set the password, we can just type:

### Setting locale

To set locale, we need to edit /etc/locale.gen (e.g. via vim) and uncomment desired locales (one or more).

In my case I uncommented:

becasue I wanted to use both Polish and English language.

Now, we can type:

To set default locale, we have to edit /etc/locale.conf and set LANG variable as follows:

Of course, we can set pl_PL.UTF-8 too or any other language we want to use as default system language. I personally use English as a OS language, bacause it’s easier to diagnose possible issues, when you have English messages in terminal. Nevertheles, I use Polish as an input language, to be able to use Polish letters, european metric system, Polish currency, etc. It should be adjusted to our needs.

### Setting timezone

You can browse time zones in /usr/share/zoneinfo directory. To set our time zone, we need to create a symbolic lin between desired time zone and /etc/localtime file. Once we change our time zone, we can create a symbolic link again.

My time zone is Warsaw in Europe, but you can set your own time zone here.

### Setting hostname

To create our hostname, which is name of the computer, we can edit /etc/hostname file and put our name there.

My hostname is arch.

## Finalization

### Unmounting file systems

Before we reboot our computer, we should unmount partitions:

### Rebooting

To reboot computer, we can just type:

## What’s next?

Once, our computer will be restarted, GRUB should boot our operating system and we should see the black screen with white letters and command prompt. It means, everything went fine, our system is installed and booted! Now, we’re ready to install other sutff (e.g. Desktop Environment or Window Manager). We can also leave it without GUI, if our computer has really low specs or when we’re planning to use this machine as a server or something like that.

## Summary

To wrap up, installing Arch is not trivial and requires some proficiency with Linux and terminal. Neverhteless, once you have some basics, it’s no that hard as we can expect. In addition, we have great documentation and resources on the web about it. Going through this process can be nice lesson. You can see, how much stuff automatic installers are doing for us. Moreover, we can totally adjust system to our needs. We don’t need to have a bloat of not necessary packages and programs like we have on Ubuntu. We can install exactly what we need and track our packages. I haven’t mentioned it before, but Arch has rolling release system. It means, there are no huge system updates like in Ubuntu, Windows or macOS. We can gradually update our system by installing small amount of single packages and our system can be up to date basically everyday. I’m using Arch for a few weeks for now and it seems to be one of the best and most stable operating systems I have used so far. It’s quite hard to break something on this system until you explicitly break it (e.g. by typing into terminal commands you don’t understand). It’s also light-weight and customizable. I cannot recommend this system to people who are not familiar with Linux, don’t like to play with computers and software, don’t want to fix stuff for themselves, customize system etc., but if you’re are not in this group, this OS may be for you.