loading...

Traveling through the Arch — Vol. 2

svettwer profile image Sven Hettwer Originally published at Medium on ・6 min read

Here we are again! In the last post, I summarized what I know about Arch Linux™ and its ecosystem. This time I’ll go through the installation using the Arch Linux™ distribution Anarchy Linux form https://arch-anywhere.org.

Let’s start up the (virtual) machines!

Installation

After telling the system to boot the live environment and choosing to install Arch Linux™, one is asked to answer some basic questions well known from other installers like preferred language and keyboard layout in a shell based dialog. After answering that, it’s time to partition your drive. In the first attempt, I’ll try the Auto partition encrypted LVM option, because I’ve a encrypted LVM on all my machines and will definitely use some kind of encryption with Arch Linux™, too. Choosing the partition size, choose to create a swap partition, typing in the encryption passphrase for the LVM.

Encryption passphrases… These little nasty things…

Well, if you have not guessed it yet, I’m from Germany and here in Germany, we’ve a different keyboard layout (qwertz). So using a passphrase that contains special characters led me into some very annoying situations when I realized, that the installer absolutely supported the German keyboard settings, but the prompt when booting your system after the fresh installation, does not! There we’ve the american layout and the special characters are located in different places. So I added a special character to my test password to try out, what’s going on with Arch Linux™ concerning this problem.

The partitioning has been finished. Time to choose your kernel. I’ll stay with the base kernel for no special reason. After that I was choosing bash, grub, the networkmanager, the 32 bit repositories in addition to the 64 bit, enabled DHCP, disabled wifi utils, excluded PPPoE DSL connections (2017 u know?) and excluded os-prober because I’ve no multi boot system here. Typing my choices into this article took way longer that choosing them via the dialog.

Now I’m at the point of choosing my desktop environment.

I’ll go with the default Xfce4 Light Desktop, just as always. But wait! There is something called Arch Anywhere Xfce, which is some kind of a custom Xfce4 from the Anarchy Linux developer. I’ll try this one out!

Going to the next screen…

Screenshot of the installation process — Detected VirtualBox installation

So the installer is clever enough to detect that I’m using a VirtualBox installation and will therefore install the guest utils package? Awesome!

After choosing the last few components for the installation, the installer asks me if I want to install all of the packages I’ve chosen. For sure I will and there we go…

A few minutes later…

All packages have been installed. I choose a name for the computer, set the root password and created a test user with root privileges. Rebooted the system… aaaaaand…

O’rly? That was not what I expected…

Okay so the ever so promising installer left me with a broken system after the fresh installation. Honestly, I’m not a into the deeps Linux expert so that I would exactly know what went wrong and what I have to do, to solve the problem. Therefore I’ll try to install the system again with the exact same setup.

A few more minutes later…

Okay… it seems like it worked this time…

So what could be the reason for that? I’ll come back to this point later on. Now let us enjoy the magnificence of Arch that everybody told me about!

Ah! Before I forget: The LVM passphrase prompt comes with an English keyboard layout, while the booted OS loads the default keyboard setup you’ve chosen during the installation. So remember kids: Before you setup your LVM passphrase, change the layout of your keyboard to English!

Screenshot after the first time booting successfully into Arch Linux™

Mission complete! Clicked a little bit around to discover what’s behind all the fancy symbols. Yep! Feels like a Xfce4 with some nice extras like the drop down shell. I’ll keep that one in mind. But for some reason I’m not satisfied with what I found here. And the reason is not Arch Linux™, it’s not the custom Xfce4 (which IMHO brings an awesome look and feel with it) but the installation of the System. So let’s get back and try to find some reasons why the first installation was broken after reboot.

Research about the broken installation

Due to the fact, that I’m unable to reconstruct the technical environment, the only thing I could do now is guessing. But even if I’m not a Linux kernel hacker, the installation process is nothing more than a program. I can read programs! So, lets visit the Anarchy Linux github repository. With as of today round about 2k commits and 41 contributors, happily developing.

Contributions of Anarchy Linux

Now lets find the place where the setup of the hard drive is made. A quick look into the arch-installer.sh showed up that prepare_divers is what we’re looking for and this is contained in configure_devices.sh.

Before I go any further into details, I want to make clear that I appreciate the work of everyone who is providing free/open software to the world! I even more appreciate if someone offers her or his work to everyone free of charge! This is why the free software/open source community has grown so much and is so strong! So many thanks to the Anarchy Linux team for your work and the effort you put into your project! I really much appreciate it!

As of today, the configure_devices.sh script is 850 lines long, whereas the auto_encrypt method, which has been called after my set of choices, is 111 lines of that. The maximum indentation I’ve found in that file is 10. So navigating the code and finding what may have caused the troubles isn’t that easy, if you haven’t seen the code before. So after 5 Minutes scrolling the code I just left it. Googling the issue was not helpful too, because I could not find out what has exactly been done by the installation scripts.

Conclusion

I think the main question now is: Would I recommend the arch-anywhere.org installer? The answer is, as ever so often: It depends.

If you’re a technical or Linux newbie, I wouldn’t recommend Arch Linux at all, start with Mint, Ubuntu or something like that.

If you know how Linux basically works and you’re looking for a distribution you can grow with, use the arch-anywhere.org and start to hack your distribution to your heart’s content.

If you know Linux quite well and just want to get rid off the extra ballast coming with the more end user oriented distributions and start with bleeding edge technology, write the installation by yourself and avoid any predefined installer.

IMHO the benefits of doing the installation manually are huge.

  1. You know exactly what you configured or installed on your system. So if a problem occurs, you know the parameters of every command you’ve set during installation so troubleshooting is way easier as if you would use a tool that selects the parameter due to user choices.
  2. A predefined installer is never able to provide all the options to you that the software comes with. E.g. the Anarchy Linux installer is not able to set user home encryption on top of the LVM encryption.
  3. Your system is truly minimal. You don’t know if an installer is choosing some additional packages and if you want to find out how the installer exactly works, you’ll have to bring a lot of time with you.
  4. You learn a lot! You’ll never learn as much as doing things with your own hands. This includes running into pitfalls, some level of frustration and pain, but at the end you will succeed and get a deep understanding of how things work together.

In the previous post, I said, that installing everything by my own hands is not state of the art. And depending on the use case, this is still true. A non technical user would never be able to setup an Arch Linux™ out of the box. But this is not the use case of the distribution. It wants to be simple (not meaning user friendly), efficient and lightweight whereas the target audience is focused on people with technical know how.

So contrary to my statement from the last article, I’ll setup my Arch Linux™ by my own hands!

So lets start to explore strange new commands, to seek out for new packages to use and new setup options to choose in the next Episode of “Traveling through the Arch”.

This article is originally published at medium.com/@SvenHettwer

Posted on by:

svettwer profile

Sven Hettwer

@svettwer

Nerd, software developer, clean code enthusiast, motorcycle rider, passionated cook, lover of challenges

Discussion

markdown guide