How to install Arch Linux on Raspberry Pi

The Raspberry Pi is a versatile credit card sized computer that can be used for a variety of electronic projects. The advantage of the Raspberry Pi is that you have the flexibility to install different operating systems and you are not limited to the Raspberry Pi operating system. This includes Arch Linux, which is revered for its simplicity. Fortunately, there is a version of Arch Linux designed to work with ARM processors. Let’s see how to install Arch Linux on Raspberry Pi.

Requirements

Before you begin, you will need the following:

  • Raspberry pie
  • Micro SD 8 GB (or more)
  • Arch Linux ARM (Scroll down to find the Raspberry Pi image link.)
  • Stable internet connection
  • Computer system capable of reading SD card. (We’ll be using Linux for this tutorial.)

Prepare the SD card

First, you will need to make a list of the storage devices connected to your machine in order to identify which one is your SD card. Do this with the following command:

Install Partitions 1 from Arch Linux Rpi List

The SD card I am using is “/ dev / sdc”.

We need to format the SD card. To do this, run the following command, keeping in mind that you will need to replace “/ dev / sdc” with the name of your SD card:

Install Arch Linux Rpi Partition StartInstall Arch Linux Rpi Partition Start

You will need to erase all partitions that exist on the drive. To do this, type o and hit enter in your terminal.

Install Arch Linux Rpi Erase existing partitionsInstall Arch Linux Rpi Erase existing partitions

Enter p in your terminal to check if there are any partitions left.

Install Arch Linux verification partitionsInstall Arch Linux verification partitions

If there are no partitions left, go ahead and create the boot partition by typing n, then p, followed by 1 in your terminal. p means primary, and 1 represents the first partition of the drive. You will need to press the Enter button after this sequence to continue.

Install Arch Linux Create new partitionsInstall Arch Linux Create new partitions
Install Arch Linux Boot Partition CreationInstall Arch Linux Boot Partition Creation

When prompted for the last sector, type +100M and press Enter.

Enter t in the command prompt followed by c to define the first partition as type “W95 FAT32 (LBA)”.

Install Arch Linux Rpi First Partition Type 1Install Arch Linux Rpi First Partition Type 1

Type n, followed by p (for primary), then 2 in order to create the root partition.

Install Arch Linux Rpi Create a 2nd partitionInstall Arch Linux Rpi Create a 2nd partition

Press Enter twice to accept the default settings for the first and last sectors.

Install Arch Linux Rpi Finalize the 2nd partitionInstall Arch Linux Rpi Finalize the 2nd partition

Write the partition table and exit fdisk by entering w.

We need to mount the FAT and ext4 file systems. To list the partitions, enter the following:

Your SD card will appear and you will be able to see the partitions. In my case, the partitions are “/ dev / sdb1” and “/ dev / sdb2”.

Install Arch Linux Rpi Check Partition LabelsInstall Arch Linux Rpi Check Partition Labels

Copy Arch Linux files to SD card

The boot and root partitions must be mounted next. Do this with the following series of commands. Remember to replace the partition names in these commands with your partition names.

Install Arch Linux Rpi File System MountInstall Arch Linux Rpi File System Mount

Now place the Arch Linux file you downloaded in your home folder and extract it to the root folder of your SD card with the following command:

The boot files will need to be moved to the boot partition of your SD card with:

You can unmount the two partitions with:

Insert the SD card into your Raspberry Pi.

Initial setup on Raspberry Pi

After inserting the SD card into your Raspberry Pi, launch it. You will either need to connect to the Internet via an Ethernet cable or a Wi-Fi network. To connect via Wi-Fi, first log in with the default root account. The username for this account is “root” and the password is “root”. Now run the following command:

A menu will load and you can select your Wi-Fi network and connect. Now, finalize the installation process by initializing the pacman keyring and filling the Arch Linux ARM package signing keys with:

You can go ahead and update the system packages with:

You need to change the default username. Do this with the following command:

Also change the password with:

You will be prompted to enter a new password and then confirm it. To change the name of the home folder to reflect the new user name, run the following command:

You must also change the password for the root account. Do this with:

In order to give sudo privileges to your user account, you will need to perform the following to install the sudo package:

You will need to edit the configuration file for sudo. Do this with:

Add newusername ALL=(ALL) ALL under the line that reads root ALL=(ALL) ALL

Close and save the file, and you’re good to go.

Now that you have Arch Linux installed on the Raspberry Pi, there are a lot of things you can do, including installing and playing Minecraft and turning it into a NAS or Plex server. The limit is your imagination.

Related:

William elcock
William elcock

William has been playing with technology for as long as he can remember. It naturally turned into helping friends solve their tech issues and then blogging about tech.

Is this article useful?

!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,’script’,
‘https://connect.facebook.net/en_US/fbevents.js’);
fbq(‘init’, ‘400239050508508’);
fbq(‘track’, ‘PageView’);

Leave a Reply