Trial and installation methods for Arch Linux

Now we will talk about installation in various versions of such a well-known Linux distribution kit - Arch Linux. At the time of this writing, he is ranked 12th in distrowatch in terms of the number of search requests in 6 months with an honorable average rating of the distribution 9.3 / 10. Many people consider it a real Linux, for real programmers, but he is famous first of all not for this, but for his nontrivial installation process. When launching a bootable media, the user first of all sees not the usual “click here to install X” interface, but a large black window into the Linux world.

Hope for a graphical interface for setting up / using your system will eventually bring only problems to the user. At some point in time, the user will feel that he needs to know what the graphical interface is hiding ...

Act one: installation on a virtual machine

This is probably the safest way to try your hand at installing this system, or at least a good way to “ rehearse ” the installation side by side instead of Windows, another Linux or MacOS. I personally will use the licensed VMware Workstation Pro 14 ...

But any other program for working with virtual machines is also suitable.

First we need a fresh iso image downloaded from
. Cool!

Create a new virtual machine with it. We give the memory, how much is not a pity, we launch and open the guide on the Internet, we read further.

To install the system, we need an Internet connection, which should be at the standard settings of the new virtual machine. We check with the help

Then we need to partition the disk. To do this, in the image that we launched, there are several utilities, for example cfdisk, fdisk, gdisk, cgdisk, partitionmanager, parted, gparted ... The list goes on. I like to use the cfdisk utility, because it allows you to partition in both the MBR and GPT.

Which partition table to choose is everyone’s business, I’d just say that the GPT will be newer than the MBR. More information about the choice between GPT and MBR can be read here .

Run cfdiskwhich should ask us about the partition table. Choose GPT (or dos). Make a partition of 100 MB. Then you can get confused and make separate partitions for different mount points : under / home, / boot, / var ... But on the virtual machine, I think it's useless - we are sawing a single partition for all remaining space as root.

Do not forget to write the changes to disk by selecting the write item.

Next, you need to create file systems using the mkfs utility. I propose to format the EFI partition in FAT32:

mkfs.vfat -F 32 /dev/sdaX

Where X is the partition number (for me, for example, sda1).

The rest of the sections are usually formatted in either ext4 or ext3:

mkfs.ext4 /dev/sda2

Then we first mount the root partition in / mnt, then everything else into the corresponding created directories in / mnt

mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
//повторяем для любых оставшихся разделов если таковые имеются

Before installing directly, I like to set up mirrors using the reflector utility :

pacman -S reflector
reflector —verbose -l 200sort rate —save /etc/pacman.d/mirrorlist

Reflector will sort all mirrors by ping and record the first 200 of them in the mirrorlist.
Now we put the system itself :
pacstrap -i /mnt base base-devel

After the command has been completed, we need to let the system know which sections should be mounted at boot time - for this we write:
genfstab -U /mnt >> /mnt/etc/fstab

And now we stretch our fingers, now we have to knock on the keyboard a little more ...

Let's make a small initial setup of the system. To do this, go to its root directory:
arch-chroot /mnt

Set up the time:

ln -sf /usr/share/zoneinfo/%Регион%/%Город% /etc/localtime
hwclock --systohc

Then in the /etc/locale.gen file we find our native language and uncomment it, then we write it, actually locale-gen.

Next, you should specify the computer name in the / etc / hosts file. Example of the final file:	%моёимяхоста%.localdomain	%моёимяхоста%

Add one user gram

useradd -m -g users -G wheel -s /bin/bash %userName%

Pinch of passwords:

//то был пароль для root
passwd %userName%
//а это был пароль к нашему пользователю

And finally, to boot the system, set the bootloader. Read more about what you can install here . Which one to install is up to you, of course, and here and now we will install the most common grub:

pacman -S grub
grub-install--target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg

In general, you are ready, you can exit the chroot, unmount the disks and restart the machine. Then you can already put on her graphic environment . Read more about it here .

Well, you can basically enjoy it ...

Act Two: installation on external media

Let's solve the problem: we have a clogged hard drive with Windows 10 / Mac Os Mojave , which has a downloaded Arch Linux image and a completely empty external ssd or hdd.

Task: Install the system on an external disk without leaving Windows / MacOS.

Think a couple of minutes, and then see an elegant life hacking .

See the solution ...
А решение довольно таки простое: мы используем для этого всю ту же виртуальную машину
Для этого мы просто создаём её без какого либо виртуального жесткого диска, а затем подключаем к ней внешний носитель (далее — флешка) и повторяем этапы, описанные выше.

Замечание: при загрузке с полученной флешки могут возникнуть разного вида проблемы с сетью, в большинстве случаев из-за конфликтов между службами, отвечающими за подключение и реализацию доменных имён. Решается она выбором, какую службу использовать, и последующим отключением через systemctl всех остальных. Важно также упомянуть про стандартную утилиту wifi-menu

How can this come in handy later? And I will say - situations are different. Once your working machine broke down, you live for a week or two without it, because It is being repaired, and you need to work on anything. Or you bought / assembled a new computer, on which so far there is not even ms-dos, you will be able to at least make a bootable USB flash drive / disk or continue working from external media. Portability, so to speak. At the same time, it is better to install on an external disk, at least manjaro.

Act three: installation next to another operating system

Having thoroughly trained in installing archa on virtuals, you can try to install it on a real disk. The only difference is that if there were other operating systems on the disk before, then you shouldn’t get rid of them by deleting partitions ... You can also make some “improvements” to the installation: for example, allocate space for the swap partition

mkswap /dev/sdxy
swapon /dev/sdxy

It remains only to custom settings, which I will not describe here, because this process is creative and individual.

Epilogue: why is all this necessary

Personally, I am inclined to the version that Arch Linux is the best distribution. Yes, it can sometimes break when updating (many rolling release are sinful with this), but in 2018 this happens as rarely as possible. Arch is the most lightweight distribution "on the market", this title can only be challenged by Gentoo. Unlike the latter, by the way, we don’t have to force our machine by compiling packages. Archa's repositories are huge, they have almost everything. And if not, then almost any deb-package can be configured specifically for PKGBUILD. If something still somehow breaks, then most likely there is already an article on archwiki on this subject , which, if you have the ability to read, can be easily corrected. Arch can be customized. As you wish.
And he has a beautiful logo.

On this I think the topic has been settled, on which I complete this fascinating story. Happiness to those who read up to this point.

Apparently I’ve been a little impatient with the flags when installing grub, and also forgot to mention about os-prober, the utility needed to detect other operating systems.
pacman -Syu grub os-prober
grub-mkconfig > /boot/grub/grub.cfg
grub-install --target=i386-pc /dev/sdX

Also popular now: