Featured image of post Installing and Configuring Arch Linux

Installing and Configuring Arch Linux

Introduction to Arch Linux system and installation configuration

Motivation

I have an old Surface Pro 6 from 2018, which is now a bit outdated in performance, but still usable for playing around. So I decided to install one or two lightweight Linux systems to familiarize myself with different Linux distributions and prepare for updating the Linux system on my main machine.

I have always heard that Arch Linux is the “cult” of Linux distributions, known for its minimalist, highly customizable, and rolling update features, so I decided to give it a try and see how “cult” Arch Linux really is.

Introduction to Arch Linux

Arch Linux is an extremely lightweight Linux distribution with a design philosophy of simplicity, lightness, and flexibility. The main features of Arch Linux are:

  • Rolling Update: Arch Linux is a rolling update distribution, unlike Ubuntu, Debian, and other distributions with fixed version numbers, it continuously updates software packages, allowing users to use the latest system. However, this also means that users need to update the system frequently, otherwise there may be software package incompatibility issues, and they need to bear the risk of new system bugs or instability, commonly known as “rolling hang” when updating the system (although I think the frequency of “rolling hang” in Arch Linux systems is already very low now).

  • Simple: The design philosophy of Arch Linux is simplicity, it provides a clean system, and users can customize the system according to their needs. Arch Linux installation packages do not include graphical interfaces or pre-installed software, users need to choose to install them themselves.

  • Rich Software: Arch Linux provides a powerful software package management tool pacman, users can install, uninstall, and update software packages through pacman, and can also install third-party software packages through AUR (Arch User Repository). pacman+AUR may be the largest software repository in Linux distributions, users can find almost all software packages in AUR, but the packaging quality of some software may not be high, users need to pay attention to it themselves.

These features make Arch Linux have advantages and disadvantages. In general, Arch Linux is suitable for users with some experience, who like to tinker, have cleanliness, and pursue new features.

Arch Linux Installation

In the early days, the installation of Arch Linux relied entirely on users typing commands, but now Arch Linux provides an installation wizard archinstall, which greatly simplifies the installation process. Nevertheless, installing Arch Linux still requires users to know some basic knowledge, such as disk partitioning, file systems, boot methods, network configuration, etc.

Prepare Installation USB Drive

First, we need to make a boot disk, it is recommended to use the Ventoy tool. Ventoy is a very easy-to-use tool that can write multiple ISO files to a USB drive, making it easy for us to choose different system installations without affecting the normal use of the USB drive. For specific usage, please refer to the official documentation.

Ventoy

Download Arch Linux ISO

Download the latest Arch Linux ISO file from the Arch Linux official website, and then copy the ISO file to the USB drive. Arch Linux system images are generally updated on the 1st of each month.

Installation

  1. Insert the USB drive, start the Surface Pro 6, press and hold the Volume Up key to enter the BIOS settings, and set the USB drive as the first boot item. For other devices, you may need to press F2, F12, ESC, etc. to enter the BIOS settings.

  2. Select Boot Arch Linux (x86_64) to enter the Arch Linux installation interface. Then you will see a bunch of scrolling commands, wait a while and you will enter the command line interface of the Root user.

  3. Before starting the installation, we need to connect to the network. Arch Linux generally automatically recognizes wired networks, if it is a wireless network, you need to use the command line tool iwctl to connect. Common commands include

    • device list
    • station <device_name> connect <wifi_name> and then enter the password
    • station <device_name> show to view the connection status
  4. Run archinstall to start the installation

    • It is recommended to partition the disk in advance
    • Select manual partition during installation, select the disk and partition in turn, and assign a mount point to the partition. As for how to partition, you can refer to Multi-System Boot Loader Configuration
    • As for network options, I didn’t quite understand, but the basic principle is:
      1. If you choose not to install the graphical interface, choose to copy the network settings in the ISO, that is, the network settings before executing archinstall
      2. If you choose to install the graphical interface, choose NetworkManager. But Network Manager seems to need to disable iwd, and you need to install the Surface-specific driver.
  5. After the installation is complete, it will automatically chroot into the installed system, where you can execute post-installation commands.

    1. Install the driver needed for Surface networking: pacman -S linux-firmware-marvell.
    2. If you don’t install the graphical interface, to connect to the network smoothly after restarting, you need to install iwd and dhcpcd.
  6. Restart

    • I use rEFInd as the boot loader, rEFInd will scan two Arch boot items, but one of them cannot boot
  7. Connect to the network after restarting

    • If you use the graphical interface, if there is no network icon, either NetworkManager is not installed or the driver is not installed
    • If you don’t install the graphical interface, you need to use iwd to connect to the network, start iwd first:
      1
      
      sudo systemctl start iwd
      
      1
      
      en start `dhcpcd.service`
      
      1
      
      do systemctl start dhcpcd.service
      
    • You can also use NetworkManager to connect to the network in the command line interface:
      • nmcli device show
      • nmcli device wifi connect <wifi_name> password <password>
Licensed under CC BY-NC-SA 4.0
Last updated on Jul 04, 2024 00:00 UTC
comments powered by Disqus