Tricks Of The Trades

Arch Linux VM Main System Installation

Pinterest LinkedIn Tumblr

This is a continuation of the previous post on installing the base components of Arch.

Except for this time I’m detailing the next steps of setting up the main system environment.

1 – Initial Login

Log into the system we created in the previous post this time on the actual file-system we generated (i.e. without the boot media), using the one and only root account currently in existence. Test to see if you have a working internet connection again by using Ping.

  1. $ ping -c 5
  2. $ ping -c 5

If you get ping: unknown host or connect: Network is unreachable for either of these commands then you need to do the rest of this step (1).

If everything looks fine and you are sending plus receiving through ping with a working internet connection, then move on to step 2 instead.

Find your Ethernet interface name (virtual VM shared host connection interface in this case) using:

  1. $ ip link

If you are unsure of the name, your Ethernet interface you are looking for is likely to start with the letter “e”, and unlikely to be “lo” or start with the letter “w”.

arch linux setup

In my case, my interface was named “eno167777736”. So I’ll use that as the example here.

Next, make sure the interface is up and running with this command syntax:

  1. $ ip link set eno16777736 up

Substituting the interface name ID with your own.

Then start and enable dhcpcd.service with systemctl.

  1. $ systemctl enable dhcpcd.service
  2. $ systemctl start dhcpcd.service

Attempt a ping once again and this time it should succeed, with the internet connection working correctly.

If despite this there’s no change, try the previous commands again, but this time specifying the interface name in the command like this:

  1. $ systemctl enable [email protected]
  2. $ systemctl enable [email protected]

If still, no joy here are some resources that might prove useful. Remember these links are not in the context of a VM installation, however.

2 – pacman.conf

If using a 64-bit system begin editing the /etc/pacman.conf with nano.

If not using a 64 bit system then move onto Step 3 now.

  1. $ vi /etc/pacman.conf

Now uncomment the two following lines in this file:

  1. [multilib]
  2. Include = /etc/pacman.d/mirrorlist

After doing this write/save to the file and exit it.

When back at the shell prompt sync and refresh repositories with pacman by running:

  1. $ pacman -Sy

3 – User Creation

Make another user account here so root isn’t the default account in use all the time (bad practice to do so), whilst at the same time adding it to some groups.

Note: There are no spaces present between the groups listed in this next command.

  1. $ useradd -m -g users -G wheel,storage,power,sys,adm -s /bin/bash scarlz

Set the password for the new user that has just been created.

  1. $ passwd scarlz

Install sudo with pacman if it did not install as part of your previous base Arch set-up.

  1. $ pacman -S sudo

If you ever want to see a list of packages related to a search term, you could type the following command, where the package name specified at the end is the “search term”.

  1. $ pacman -Ss sudo

Now sudo is installed on the system we need to enable it for users belonging to the wheel group in the sudoers file to gain privileges.

  1. $ EDITOR=vi visudo

Find the “user privilege specification” section and uncomment the following line so it looks like this:

  1. %wheel ALL=(ALL) ALL

After doing so hit CTRL+X then y and then ENTER.

I’m also going to install bash-completion here to help out before moving onto the next step.

  1. $ pacman -S bash-completion

4 – VMware Tools

I’m using Vmware as my virtualisation software in this instance, so here’s how to install the official VMware tools.

  1. $ pacman -S base-devel net-tools linux-headers

Press ENTER for the default All if prompted by the base-devel package.

Some Xorg Vmware related dependencies.

  1. $ pacman -S xf86-input-vmmouse xf86-video-vmware mesa

Then, create bogus initialization directories for the installer:

  1. $ for x in {0..6}; do mkdir -p /etc/init.d/rc$x.d; done

The VMware installer then needs to be mounted in our Arch system:

  1. $ mount /dev/cdrom /mnt

If you have errors here make sure your VMware software (Workstation in my case) has the latest tools downloaded and updated, and try running VMware “as an Administrator” if using Windows.

After this is successfully mounted extract it to /root .

  1. $ tar xf /mnt/VMwareTools*.tar.gz -C /root

Run the perl script to install the extracted VMware tools.

  1. $ tar xf /mnt/VMwareTools*.tar.gz -C /root

$ perl /root/vmware-tools-distrib/

You can safely ignore the following build failures:

  • VMNEXT 3 virtual network card
  • “Warning: This script could not find mkinitrd or update-initramfs and cannot remake the initrd file!”

Reboot the Virtual Machine:

  1. $ systemctl reboot

Log in and start VMware Tools:

  1. $ /etc/init.d/rc6.d/K99vmware-tools start

5 – Xorg

“Xorg is the public, open-source implementation of the X window system version 11. Since Xorg is the most popular choice among Linux users, its ubiquity has led to making it an ever-present requisite for GUI applications, resulting in massive adoption from most distributions.”

Now comes the part where we are going to install X server.

Note: To use Xorg in a Virtual Machine, a minimum of 32MB VGA memory is needed.

Install Xorg and some of its companion packages using pacman once again like so:

  1. $ pacman -S xorg-server xorg-xinit xorg-server-utils

Finally, in this section install the default X environment to ensure that all the x-org components we’ve installed prior to this are functioning correctly.

  1. $ pacman -S xorg-twm xorg-xclock xterm

Type startx to run the X environment.

  1. $ startx

arch linux setup guide

Display & Window Manager

Another forthcoming post will go into depth on how to install a tiling window manager (bspwm) and configure .xinitrc to serve as a display manager. With the exception of this being done in the context of a live system, and not a VM.

Alternatively, find and research another window manager/desktop environment from the Arch-wiki to setup and install.

Write A Comment