Posts: 1
Joined: Sun Mar 22, 2020 2:01 am

Arch Linux ARM Installation Guide

Sun Mar 22, 2020 3:16 am

The first Installation steps I took were to follow the ArchLinuxARM Install wikki to the letter. Getting this right is important as it will affect everything else down the track (like user permissions which are truncated by tar causing file access escalation issues; like needing to run ping as a super user, and disk RW acces issues when setting up/changing users home directories).

These instructions are here; ... berry-pi-2

For the longevity of this tutorial I won't repeat the instructions here as arch is a rolling distro; this could change at any time, and probably will.

The Installation files are zipped in a special format called bsdtar which allows the storage of extended file meta-data which Arch uses to dynamically control file and service access permissions. If we use the incorrect program to extract these files we will lose these extended file headers and then we will begin to get into trouble.

If you went this far and didn't use the correct program to unzip and install, and don't want to go back and repeat what you've already done, there is a solution, reinstalling a package will fix the extended file headers.

So we can use this article here to create a recovery script to re-install everything. Even if we didn't mess anything up we can still do this step so that we have a viable recovery option. NOTE: The "--force" option can be dangerous and isn't really necessary, personally I omit it from the script. Also watch for the missing closing bracket in the Authors code and refer to his screenshots of nano. Add the option --color=auto to the pacman command for a colourful pacman display. ... rch_linux/

I went one step further here and added an additional file called

Code: Select all

echo "Deleting old package list."
         rm packages.txt
echo "Done.  Creating new Catalogue..."
         pacman -Qq > packages.txt
echo "Done.  Update successful."
Now when we add any changes to our packages and we want to reflect this in our recovery file we can issue the command;

Code: Select all


Before you do any pacman related things here llike initializing the keyring you will want to jump across to the main-line ArchLinux install wikki and follow the section on setting up the pacman mirrorlist.

We will also want to set up our config.txt for our screen hardware as well as any other Pi-specific instructions like alsa sound and poll only once to preserve the sd card. Refer to the wikki tab on the arm installation page for details. Then finnish the instructions in the ARM install wikki from above.

Once the ARM install wikki has been followed I browse through the main-line ArchLinux install wikki to see if there are any additional steps that are applicable. It turns out there are; Setting up locale and timezone, as well as setting up swap, the fstab, and localhost and network.

If you have any wireless issues try using a wired connection for initial updates, this can often "kick" the wireless module into full life so it wont keep saying "DNS ERROR" even though it can ping and curl. I have no idea why this dirty trick works, it just does.

Once you have booted into your new system and initialized your pacman key rings youre going to want to modify your command prompt (or in Arch lingo; your ps1) to make the terminal a bit easier on your eyes, this can be equated to the choice of playing pacman in monochrome as opposed to playing pacman in colour. ... tomization

Seasoned Arch users consider the ps1 a signature of their work, and many exciting things can be done with modification to the bash files. For instance, all of the custom commands in the arch install iso are actually stored in script in the very same file we will be modifying to change our ps1.

I consider the arch iso bash to be a work of art and a beautiful template for anyone who wants to heavily modify their command prompt; ... el/.bashrc

This is my Root User PS1;

Code: Select all

alias ls='ls --color=auto'
alias pacman='pacman --color=auto'
PS1='[\[\033[1;31m\]\[email protected]\[\033[0m\]\033[1;30m\]\h\[\033[0m\]\033[1;34m\]\w\[\033[om\]]\$'
This is my Normal User PS1;

Code: Select all

alias ls='ls --color=auto'
PS1='[\[\033[1;32m\]\[email protected]\[\033[0m\]\033[1;30m\]\h\[\033[0m\]\033[1;34m\]\w\[\033[om\]]\$'

At this stage we can treat the installation the same as we would a standard one. so follow the main-line installation guide, and then follow the post-installation guide here; ... stallation

Return to “Arch”