My Dearest Mad-Readers,
I had not played around in VirtualBox in a few weeks, except to have a quick first look at MageiaOS (which will be the subject of a later post and video). Since I am in great need of a Virtual Machine to demonstrate things in future YouTube videos, I figured I would install Arch Linux and seize this opportunity to re-work a guide I wrote many months ago.
Shred Of Nostalgia
Since I have already done it once on camera, I will not do it again today. If you are curious, here is my very first YouTube video. You may compare it with my latest ones and notice there (hopefully) has been some progress over the months. You can also use this video as a guide, since it goes through the whole installation process in a Virtual Machine, from zero to Xorg.
Some Of Its Upsides
- The first and most obvious one is its community. Arch has a wide community of passionate users and it is a rare thing not to be able to find an answer to a question or an issue you may have. This is a huge advantage.
- The second one is its documentation. As a beginner, and sometimes even now (becomes do not be fooled, I am no expert), I struggled a lot with documentation. Today, I am ready to acknowledge that Arch has the best documentation out there. Gentoo is a fair competitor but, in my humble opinion, Arch is doing a slightly better job. You want proof? I switched to Gentoo and still search for solutions to my issues in their documentation (if I didn’t find it in Gentoo’s)!
- The third advantage is its package manager. Let’s face it, pacman rules. Plus, who wouldn’t like watching pacman updating their system? You also get the AUR, and that cannot stay overlooked!
Its Main Downside
You see, even though arch gives you much freedom, I believe it still does not give you enough. When running Arch, like with most other distributions, you cannot choose whether you will install the dependencies of a program or not. You have no choice. If you want to install gdm (gnome-display-manager), for instance, you have to install all its dependencies (like gnome-sessions). Same thing when updating your system: what if you do not want to update a package? Well, again you have no choice. As for Gentoo-based distributions, they have a nice way for fixing this issue, but this will be the topic for another post. If you are curious, check out “Gentoo @world file”.
I could go on for hours speaking about Arch, or I could actually explain how to install it. So let us move on to the second part of this post: installing Arch.
You want to proceed methodically. It is no difficult task, but it is easy to forget something and go through avoidable trouble just because you felt like going faster than you should have. Just take things slow, alright? There is no rush!
You may not be familiar with this abbreviation. If you are not, it is a friendly way of saying that you should open this link in a new tab: https://wiki.archlinux.org/index.php/Installation_guide.
Reading the manual is, in my experience, the most valuable skill you should practice above all others. Why? Because it will open the gates to the kingdom of knowledge to you. What does it matter if you know a programming language if you do not know what has changed from one day to the next, what has become deprecated overnight? Just learn reading. It is the most useful skill of all, and it should get you through the process of installing all the Linux distributions in the market without having to read long blog posts (such as this one).
Needless to say, I expect you to follow along with Arch installation guide opened in another tab. All the commands which you will need are clearly laid out on their guide. There really is no point in copy-pasting them here one more time, right?
Whatever virtualization tool you want to use does not matter, but if you have never installed a distribution, it is helpful to get into the habit of trying and making mistakes in a safe environment.
I will just use VirtualBox (you guessed it), because I am used to it. Just do the same if you have no idea what else to use. It is free and opensource, which should be enough to convince you.
Download Arch’s ISO Image
Pick a mirror on this page https://www.archlinux.org/download/ and download the ISO file which you will need to boot the live environment. For a faster download, select a mirror which is as close to your location as possible.
When you have done it, you may or may not verify the image signature. As this is (is it not?) a tutorial, I strongly recommend verifying it. As I am going to do the whole thing in a virtual machine, I will not bother doing it. It is the whole point of virtual machine… you know… breaking things (and then fixing them, let us be serious for a second).
Are you done verifying the signature and all? OK! Let’s move on! Get psyched, it should get more interesting from here. I mean, soon you should have the satisfaction of having installed the “most difficult” (LOL?) linux system, so get ready to be proud of yourself, alright?
Boot The Live Environment
Fire up virtualbox. It is done? Good. Now, click on “New”. It is the button on the left of “Settings” and next to “Tools” at the top of your screen. I know, it is SO accurate… but you are so talented I am absolutely sure you will find where it is. After clicking on “New”, name your virtual machine “Arch Linux” (or whatever…), select “Linux” for the “type” drop-down and “archlinux” for the “version” drop-down. Then click next. You can keep the default settings for the memory you want to allocate your virtual machine. I personally like to give it 2048Mo, but you are free to do whatever you feel like doing. I mean, we are Linux users, freedom is our kingdom, init? (hum, systemd? Moving on…)
Just keep the default settings for most things. The only thing I would really recommend that you do is that you increase the size of your virtual disk. You would not go very far with just 8G, so move it up to 15G, alright? Click next and… Yay, you are done! Oh, no actually there is one last thing. Press the “start button”.
Now, it is very important that you select the right iso. If you are a normal person (as normal as you can be cause you are installing arch, guys). If you do not, I have to tell you that you probably would not be installing arch. Sorry…
Mess In The Live Environment
Be curious, fire an “ls”. You should at least see “install.txt”. from now until the end of this installation, this file is your best friend. Or, if you are like me and you have wi-fi, the arch wiki does a pretty good job on its own. If you are in the US, the good news is that you should not have to change your keyboard layout. For the others, if you have to change the keyboard layout, #RTFM. I have not counted how many times my brother told me to RTFM, so I am proud to do just like him today. You will thank me one day. I am sure you will. I mean, I hope you will…
You will, right?
BIOS or UEFI
- ls /sys/firmware/efi/efivars
This command is most important. You need to know whether you are in UEFI or BIOS mode. That is why I took the time to type this command here. If you want the installation process to go well, do not neglect this step!
Connect To The Internet
If you are following my advice (you better be :p), then just run ping google.com and you should soon realize that you are connected to the internet. When you found out that you are, just read the next two sections of the installation guide: Update the system clock & Partition the disk.
If you are going head-on and installing Arch on an actual machine, it is to be expected that you will have no internet connection. I recommend you check out this link then. You will soon discover that connecting to a network is a piece of cake.
Is it though?
I do not believe you will need any help regarding the system clock, but I will say a quick word on partitioning. If this is your first install of arch, just keep things as simple as possible. Use cfdisk, you may find it much more clear than fdisk, and keep a simple partition layout. Create a partition for root, aka / and a swap partition. As a rule of thumb, the swap partition should be twice the size of your RAM. Otherwise you will not be able to enable hibernation on your newly-installed system. Since I expect all of you to be working in a VM, you do not have to make a swap partition. Who would hibernate a VM when you can simply save its state?
When you are satisfied with your partition scheme, move on to Format the partition & Mount the file systems. These two sections are quite self-explanatory and there is a lot of copy-pasting going on, so I will not dwell on them. Same with “selecting the mirrors“.
I will merely add that you want to only keep the mirrors closest to you. if you live in the USA, keep 4 or 5 mirrors located in the USA and delete the others (or comment them out, your choice).
Installing Essential Packages
When you run this command: pacstrap /mnt base linux linux-firmware, I recommend that you install vim, neovim (or emacs, if you want to feel different).
Do not forget to install a network manager as well. I recommend networkmanager. Also, do not forget the packages to access the man and info pages. You never know, you might need to RTFM.
If you want to be able to log in, it can be nice to set a password for root, and while you are at it, you may as well create another user…
…and set its password too!
Rebooting & Praying
Once you have done that, there is only one thing left to do: exit the chroot environment & reboot (I know, that’s two). Or… no, actually, I believe there IS one thing we have forgotten to do:
The boot loader!
I recommend you install grub and then configure it with the commands provided in the arch wiki. Be careful though, the commands are not the same if you are on BIOS or UEFI mode.
Congratulations & Sign-Off
Did you pray hard enough? Has it worked? If it has, you can be proud of yourself. You are one step closer to becoming a power-user. If it has not, you can still be proud of yourself! Re-read this tutorial, study some more the arch-wiki and give it another go. Do not give up! Your curiosity led you to arch, this is no coincidence. You have a lot of potential, so USE IT. Always keep learning!
Any program to recommend? Any constructive comment on this short guide?
I hope you liked it and that it was helpful. If you did, consider supporting me by subscribing to my blog, via email or WordPress, or to my YouTube channel. You are also welcome to spend some more time here too! If you are facing any difficulties, let me know too! Shoot me an email, or comment below 😉