Crossing the Arch (Linux) Part 2 Prepping

Published on February 5, 2022 at 5:06 am by LEW

Arch LogoIntroduction

Having discussed what we want to do in the previous post, it is time to move forward. In this post we will create and configure both a dedicated computer and a VirtualBox virtual machine (VM). We will then boot said machines with the Arch installation image downloaded last time. We will finish up by making a few adjustments to the Arch environment (required and optional), mostly for ease of use.

At this point I need to provide a bit of an explanation about what will be happening during this process, as this is probably the most confusing part for many first time users.

The installer will create a live Arch instance running in RAM. Nothing will have been done with your drive at this point. This live image will disappear once the machine is powered off or rebooted.

Once the image is running, we need to check/do some basic setup stuff to the Arch instance.

After that, in the next post, we will partition, format, and mount our drive(s). Then actually install Arch to the drive.

Note: there are many variations on the basic Arch install. What is presented here is Arch Install according to Retired Techie. If you visit other how-to sites, you will most likely find some significant differences. This is part of what sometimes makes Arch Linux difficult for new users. But it is also what gives you a large amount of control over your install.

VirtualBox Setup

These steps will setup a new VM to install Arch Linux on. As of this writing, I am using VirtualBox 6.1.

  1. Select the new icon in VirtualBox. A “Create Virtual Machine” Window will open.
  2. Give your Virtual Machine a name. I used “Arch-Base” for mine. Select the “Machine Folder” folder where the VM will be stored. By using Arch in the name, the Type should already be set to Linux and the Version should already be set to Arch Linux (64-bit). Click Next.
  3. In the next window allocate Memory for your virtual machine. There should be a green and red bar at the bottom showing how much memory you can safely allocate. I set mine for 2048 MB (or 2 GB). Click Next.
  4. We can now select the type of hard drive. I use the default “Create a virtual disk now”. I suggest doing this unless you have specific reasons not to. Click Create.
  5. I use a VDI disk image. VHD and VMDK are proprietary virtual disk file formats for Microsoft and Vmware virtual drives. Click Next.
  6. I chose to use “Dynamic allocation”. This means a minimal disk file is created, and will expand as needed up to the maximum size. Click Next.
  7. Now the maximum size of the virtual disk can be set. I use 20 GB. Click Create.
  8. You should end up back in the Virtual box interface. Highlight your new virtual machine, and click on Settings.
  9. Under System in the Motherboard tab uncheck Floppy drive, and check Enable EFI. Move to the Processor tab and assign some processor cores to the virtual machine. This has similar green red lines showing the maximum you should assign. I use 2 processors for this VM.
  10. Drop down to Storage. Click the “Add Disc” icon for Controller:IDE. You will need to select and add your Arch Install ISO here.
  11. Under Network set the “Attached to:” for Adapter 1 to Bridge. This will make your virtual machine appear just like another computer on your network. Click OK to save settings.

Computer Setup

Setting up a computer for installing Arch Linux is straight forward.

    1. Create a bootable USB key with the arch install ISO
    2. Make sure your computer BIOS/UEFI is setup to boot from a USB key.
    3. Make sure your internet connection is working

I am assuming in this day and age, your plan is to install Arch Linux with the UEFI bootloader, as your computer should support this. So I am not going to cover setting up Arch Linux for Legacy BIOS.

Booting into the Arch Installer

Virtual Box: With the new VM selected, click on Start. You may or may not be asked to select a startup disc. If this happens, select your arch Linux Installer ISO. You should boot into the Arch Installer. Select the default image at the grub boot screen, or just wait a few seconds.

Computer: Boot your computer from the Arch Installer USB key. At the GRUB screen select the default image, or just wait a few seconds. You should then boot into the arch installer. Seconds.

Both: After a few minutes you will find yourself at a command prompt.

root@archiso ~ #

Arch Instance Configurations

At this point we may want to do some configuration of the Arch instance created by the installer. These are mostly for ease of use, and depending on your locale may be default settings already.

Keyboard Map: This one may be required for your locale. Once the key map is set, wecan continue with the assurance that what we type is what we actually meant to type.

Lets first look at what is configured, and if it needs to be changed. This can be done with the following command.

localectl status

By default language should be set to en_US.UTF-8. If this is not correct for your locale, then you can list other available layouts. There are a lot of layouts, so you might want to filter the output using grep. Lets say you needed to use a French keyboard, then the command would look like this.

ls /usr/share/kbd/keymaps/**/*.map.gz | grep fr

Note the double star within the ls path will cause a search all directories. On the current installer I am using there are seven directorates in the keymaps folder.

Once you find the correct key map, you can set it with the following command (we will continue with the French example).

loadkeys fr-latin1

Internet Connection Verification: Next we will want to validate our internet connection. This will be a required check.

To do this we will use the following command.

ip a

This will list all network interfaces. Check to make sure your active interface has an IP address. This is usually setup automatically for a wired connection, which is what we are using with Virtualbox.

For configuring a wireless connection, the Arch installer supports iwd (INet wireless daemon). Please refer to the documentation on the Arch wiki, as this is outside of the scope of this post.

Optionaly, assuming we have an IP address, we can try to ping a known website to verify that the internet is reachable. For example the Arch Linux home page.

ping -c 3 archlinux.org

The -c option sets the number of pings that will be sent. Under most Linux based Operating Systems (OS) the ping command will run continually until you stop it. The -c option limits that behavior.

Setting the Time: You may want to update the system clock in the Arch instance. This is not stricdtly required, and we will do it again to the actual install. In this optional step we will pull time from the internet by enabling the Network Time Protocol (NTP). Use the following command.

timedatectl set-ntp true

We can then verify the current date and time as well as the status of the NTP service with the following command. Note the time should be in UTC at this point.

timedatectl status

Boot Mode: If you are not sure, you may also want to verify the boot mode that is being used. To do this we need to check in the following directory. If there is anything here, and no errors occur, then the boot mode is UEFI. Otherwise it is BIOS.

ls /sys/firmware/efi/efivars

Sync pacman: You need to download the Arch Repository index to populate the pacman database in the running instance. Otherwise you will not be able to download any packages.

This can be done with the following command

pacman -Sy

Conclusion

At this point we have finished prepping the live Arch instance. We are ready to move forward with the actual install of Arch. This will be the subject of the next post.

Remember that if you powered down, all configuration we did disappears. You will need to revisit this post to set it up again.

Crossing the Arch (Linux) Part 1 Introduction

Crossing the Arch (Linux) Part 2 Prepping

Crossing the Arch (Linux) Part 3 Install

Crossing the Arch (Linux) Part 4 Configure

Add New Comment

Your email address will not be published. Required fields are marked *