Installing Arch Linux from scratch

… and in about 5 minutes …

As of today, it’s been more or less 3 years I am happily using Arch Linux as my primary Operating System, and I’ve used it daily not only on my laptop, but also on my Gaming PC and many Single Board Computers too.

I’ve been using my archibold.io installer for quite a while, and recently I’ve rewritten it after learning more and more about Arch Linux.

This post is about me giving back few things I’ve learned from the Arch Linux project and its community, hopefully simplifying life to whoever would like to embrace this awesome distribution!


Booting a Linux OS in a nutshell

You need a special partition recognized as bootable, and with some automatically recognized binary file capable of telling the motherboard how to booth, and where to boot on.

In Arch Linux land, there are basically 3 major players: U-Boot, the default boot loader used by Arch Linux ARM ports, Syslinux, which is the preferred choice of the very same Arch Linux ISO installer, and Grub, usually easier to configure on multi-boot systems, which is not part of this very post scope.

Tools to deal with partitions are usually 2: parted, preferred when it comes to advanced features like UEFI partition and optimized disk alignment, or fdisk, which just works and does the job in a “less scriptysh” way.

Booting How ?

There are few ways to tell a motherboard how to boot a system: UEFI configuration, which is mostly suitable for Windows OS running on Intel CPUs but usable to boot Linux distros too, and legacy BIOS compatible, which has less features than UEFI but it always delivers (and is the most widely available).

On top of this distinction, while UEFI has a secure boot mode, which is again basically a Windows specific thing only, a boot can also include special commands capable of enabling, or disabling, an EDD mode, which is a good old Enhanced Disk Drive technology that might not be needed on boot time and in some case should be explicitly disabled like in VirtualBox images or some AMD based SBC like the Gizmo 2 board.

Booting What ?

There is one and one only consolidated cross platform and universal File System out there and it’s sadly or thankfully the good old FAT one.

There are surely more suitable, more secure, faster, and more HW caring options out there, but FAT with a loader is a safe bet with both UEFI and legacy.

In few words, the most basic amount of partitions on your system should be 2: a FAT bootable one, and a “whatever you want” else. Please note that ext4 is still a very valid choice for daily tasks, but there are few valid alternatives to consider, yet not part of this post scope.

Any Swap ?

If you are installing Arch Linux on a system with more than 4GB or RAM, and you are not planning to use such system to develop complex software, I’d say you shouldn’t worry much about having a backup swap partition.

Generally speaking, old laptops I’ve tested, with just 2GB of RAM, has been doing great without any extra swap and a graphical Desktop like GNOME without effort.

However, if you’d like to have some extra room to build more complex software, and you have more than 1GB of RAM, use 1/4 of your RAM amount and you’d be fine.

OK but where are all the commands to install Linux ?

This is the best part of this post, the moment you’ve reached this part is the moment you are self trained to answer all basic questions archibold.io installer is going to ask you.

Download the Arch Linux ISO from the website, and use it for a VirtualBox boot, or burn it to an USB stick following this Wiki Page, you’ll have everything you need to boot into a terminal and run the following code:

$ bash <(curl -s archibold.io/base)

That’s basically it, the procedure will install the most basic Arch Linux you could think of on your machine or, like the video on top of this post shows, on a VirtualBox, in case you want to try it forst.

OK, cool … but I’d like to have a Desktop too!

In this case, oce you have booted into your account, you can check if you have an internet connection typing:

ip addr

and if nothing appears under your wifi or ethernet name, follow these instructions:

# if not logged as root already, type 'su'
su
# use root as default password
# now, in case you have a wired connection
ip addr # to see the name of the adapter
dhcpcd enp0s3 # where enp0s3 is just a made up name, use your one
# if it was wi-fi card
wifi-menu # and configure it
exit # to go back to your user

Once you have an internet connection, you can simply use another helper:

bash <(curl -s archibold.io/install/gnome)

The latter will guide you to install the best Desktop environment out there.

Right .. but …

If you’re stuck at any point, please don’t hesitate to file a bug in the Open Source archibold repository, or simply ask me questions in here.

I’m pretty sure I can answer most of them so … bring it on! :-)