I am back. Finally…after weeks of studying for my finals and then some more of me just being lazy, here I am. And I even got some content prepared for you guys. So from now on: no more missing out on your weekly dosage of me.
I think I need to answer some questions before we start this and explain why exactly I’m doing a “Summer Series” on my blog and what this format is actually going to be like.
So…Why a summer series?
Well…as some of you guys already know, I am starting a new job in September. I am going to be working in the “Emerging Technologies” Department (basically an even more vacuous word for RnD). This is great and all…but working in RnD also means always staying on edge with the newest technology. Knowing the latest and greatest frameworks, coding in the newest languages, etc. In this more-or-less-bi-weekly, 4-maybe-5-part summer series, I am attempting to teach myself some of the newer technologies I haven’t used so far, to prepare myself for my job.
Is this going to be like all the other blogs?
Yes and no. I’ll definitely try to explain everything as good as I can, but this really is mainly for me to get to know new technologies. So, occasionally, I will have absolutely no clue of what exactly I am doing and will write exactly that. Don’t expect any deeper- or “expert”-knowledge on the technologies I’ll be trying out. This is all going to follow the same cookie-cutter approach of me presenting a technology in 3-4 sentences and me documenting the process of me actually using said technology.
Shouldn’t I be spending my summer getting shitfaced at Danube canal?
Yes. And I am doing so (hi, future employer 😊). But to be honest…at this point I am tired of partying and actually just wanna be productive for a while and just write some code again.
Now…Arch Linux definitely is not “new technology”. It initially released in 2001, which means it is as new as Windows XP, the first “Lord of the Rings” movie or the final studio album “Celebrity” by NSYNC. But what makes Arch Linux get the honorary status of “new technology” is it’s “always up-to-date” approach. With Arch, you know you’re getting the latest and greatest. But you also know that it’s going to be a lot of work. Arch literally makes nothing easier for you. You want a specific program to run on Arch? Go compile it yourself. It doesn’t work? Read into the source code and make it work. The program is not FOSS? Well go back to Windows, n00b.
Oh, also…Arch Linux is a meme so imma #doitforthememe.
Since I am not (completely) insane I won’t be installing this beast of an operating system onto metal. Rather, I’ll install it onto a VM in Hyper-V. Why Hyper-V? Because it came with Windows 10 Pro, is easy to use and, since Hyper-V is a type 1 hypervisor, it’s also faster than VirtualBox or VMware Workstation Player.
I’ll be starting out with assuming that you have some Linux knowledge, know how to download and verify an ISO (not verifying is a crime of the same magnitude as removing your USB stick without clicking “Eject” first) and create a virtual machine in Hyper-V.
For the VM, I’ll use a Gen. 1 Hyper-V VM with 8 gigs of RAM and 4 vCPUs assigned. Since I want this VM to be connected to my home network and the internet, I created a new external vSwitch in the Hyper-V manager and just hooked it up to my physical NIC.
Once we booted Arch Linux, we are greeted with a nice little shell and are logged into root. From here on out, we’re on our own. As some of you figured at this point, the keyboard layout is set to
en-US which is slightly problematic. Figuring out how to do stuff is really not that hard in Arch Linux because someone probably did it before you did and documented the whole process on the Arch Wiki.
Luckily enough, setting the keyboard layout is pretty straight-forward and is just as simple as
Next, we’re going to verify the boot mode (so…if we booted in BIOS mode or not). I honestly don’t know the exact technical differences between BIOS and UEFI, I just heard that UEFI is supposed to better for dual booting and is way more secure. Checking if we’re in BIOS or UEFI mode is also really easy. UEFI exposes variables which allows the OS to communicate with the firmware. If these variables exist, we know for sure that the system is booted in UEFI mode, if not, it’s booted into BIOS mode. This all will be very helpful when installing the bootloader later. I don’t really need to check because I’m working with a Hyper-V Gen. 1 machine which is in BIOS mode per default. Nonetheless, checking for the UEFI variables can be done like so:
The Arch installation image enables
dhcp per default. I prefer setting a static address for my VMs but in this case, this is a post-install step. Let’s just check if the system detected our network device and see what IP address we got.
ip addr sh eth0
Since we already got a network connection, let’s just enable a network clock with:
timedatectl set-ntp true
Now we need to prepare our hard drive for the install. I am going to create a 2 GB swap partition…you know…for shits and giggles. A swap partition is completely useless with the ridiculous amounts of RAM we have nowadays but this is not a VM I am actually going to use, it’s more of an educational experiment. I am going to use
fdisk because I have worked with it before and can’t be bothered to look up the
parted commands for what I need to do. Since I am using a VM with only one drive, I am pretty sure that I don’t need to look up my drive names because my one drive will register as
/dev/sda. In case you do wanna list all of your drives, you can do that with:
As expected, this yields
/dev/sda for me. Surprisingly enough, it also returns another drive
/dev/loop0. I have no clue what that is about…but I don’t think it matters, so I’ll ignore it for now.
I am going to create a partition (
n) which should be primary (
p) and should fill up the entire hard drive except for the last 2 GB (
-2GB). Then, I am going to create (
n) another primary (
p) partition (this time, you can just spam enter). We still have to make the second partition a swap partition (
t followed by
82) and write the partitions to disk (
w). We can exit the tool now and actually create our filesystems.
mkfs.ext4 /dev/sda1 mkswap /dev/sda2 swapon /dev/sda2
Now we can mount the partitions to actually install Arch Linux.
mount /dev/sda1 /mnt
Actually installing the damn thing
Now that we have our hard drive ready to go, let’s configure our mirror servers and then we can start the installation via
pacstrap. Since I want some dev tools, I am not only going to install the
base package group, but also the
I honestly haven’t found a better way than to
dd my way through this list in VI until I have a suitable mirror list that looks like this:
And now, finally, we get to install the actual system.
pacstrap /mnt base base-devel
After that is done (expect this to run for a while) we need to generate an
fstab file. Honestly…no idea what it is or what it does. I just know that most people pronounce it as
f-stab when it should be pronounced
f-s-tab and that it stands for file system table and the system doesn’t work without it ¯\(ツ)/¯
genfstab -U /mnt >> /mnt/etc/fstab
Okay…we have our system installed, we already installed some packages. Now comes the fun part: configuration.
chroot into Arch on our mounted drive.
I’ll just write the commands I used to do the basic configurations and write what they do in a comment next to them.
ln -sf /usr/share/zoneinfo/Europe/Vienna /etc/localtime #set the time zone hwclock --systohc #set the hardware clock to the correct time nano /etc/locale.gen # enable needed locales by uncommenting them (I'll set my locale to en_US) locale-gen # generate the locales echo "LANG=en_US.UTF-8" >> /etc/locale.conf # more locale stuff echo "KEYMAP=de-latin1-nodeadkeys" >> /etc/vconsole.conf # set the keyboard layout echo "dev" >> /etc/hostname nano /etc/hosts # associate localhost with 127.0.1.1 # 127.0.0.1 localhost # ::1 localhost passwd # set the root password
Now that that’s done, let’s install a bootloader and reboot. I’ll just go with grub because it’s easy and basically foolproof.
pacman -S grub grub-install --target=i386-pc /dev/sda grub-mkconfig -o /boot/grub/grub.cfg exit shutdown
Our Arch install is technically complete, but we still have quite an empty, unimpressive system on our hands. Let’s make this a little bit more usable by installing the Gnome desktop environment. But before we do so, we first need to get our network up and running.
My network address is
192.168.0.0/24 and my DHCP range is
192.168.0.100. I’ll assign my Arch machine the IP
192.168.0.105. To do so, we will need to create a netctl profile.
Interface=eth0 Connection=ethernet IP=static Address=('192.168.0.105/24') Gateway='192.168.0.1' DNS=('188.8.131.52' '184.108.40.206')
Now we just need to enable the profile, reboot and verify the configuration.
netctl enable eth0profile reboot
ip addr sh eth0 ping google.com
Also, because I don’t want to type everything in by hand and much rather just paste commands, I’ll install OpenSSH and configure it accordingly.
pacman -S openssh systemctl enable sshd nano /etc/ssh/sshd_config
sshd_config I’ll set
Also, let’s add a user so we can install an AUR package later.
visudo #uncomment %wheel ALL=(ALL) ALL useradd -m -G wheel -s /bin/bash ariel passwd ariel usermod -d /home/ariel -m ariel
Originally, I wanted to use Pantheon but I couldn’t get that to work. Not over AUR, not over snap. So Gnome it is. For Gnome to work, we need an x server. The simplest way is to install x11 via the xorg package group.
pacman -S xorg xorg-xinit
Next, we need some standard apps so our desktop environment is actually usable.
pacman -S xorg-twm lxterminal
For Gnome to work we need a specific font (I really don’t know why but Gnome kept crashing on me until I installed it).
pacman -S ttf-dejavu
Installing and enabling Gnome and the Gnome Display Manager is really easy since Gnome is directly available from the Arch mirrors.
pacman -S gnome systemctl enable gdm.service
Now we just need to reboot, and we’re done.
I think pacman is quite nice but to be honest I prefer snap. So when I heard that I could install snap on Arch I was very happy.
git clone https://aur.archlinux.org/snapd.git cd snapd makepkg -si journalctl -u snapd --full --no-pager
So now we can install Chromium or GitKraken, for instance!
snap install chromium snap install gitkraken snap install snap-store
Installing zsh (with oh my zsh) also just requires two commands:
pacman -S zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Installing Arch Linux was a fun experience. I don’t know why someone would do this and have Arch as their daily driver…for me this simply sounds like too much work. But I did learn a lot and I would definitely do it again with a more complicated setup (something like Pantheon with Wayland and reFind as the bootmanager).