bowseruk/alarm-imager

By bowseruk

Updated over 4 years ago

Create images of ARM Arch Linux (ALARM) for various SBCs

Image
0

520

bowseruk/alarm-imager repository overview

ALARM (ArchLinuxArm) Imager

I wrote this docker container as I install Arch Arm Linux (ALARM) on a number of my SBCs as part of a low(er) cost Kubernetes cluster I am building at home, and it was a pain to go through multiple devices manually using the Arch Linux Arm website instructions for the board. So far I have implemented a build method for the following Single Board Computers (SBCs) in the script the container runs:

  • Banana Pi - The script recognises this board as BANANA_PI. As this is not officially supported by ALARM and I had the most deviations from the guide to get working, this is the most likely to break again.
  • Banana Pro - The script recognises this board as BANANA_PRO. Same as the banana pi in terms of issues.
  • Raspberry Pi model 2B - The script recognises this board as RASPBERRY_PI_2. The script goes as described on the website, except the boot partition is mounted in the root partition to avoid the copy stage.
  • Raspberry Pi model 3B/3B+ - The script recognises this board as RASPBERRY_PI_3. The script goes as described on the website, except the boot partition is mounted in the root partition to avoid the copy stage.
  • Raspberry Pi model 4 - The script recognises this board as RASPBERRY_PI_4. The script goes as described on the website, except the boot partition is mounted in the root partition to avoid the copy stage.
  • Rock 64 - The script recognises this board as ROCK64. The script goes as described on the website.

The docker image is hosted here at Docker Hub. The script and dockerfile can be found at the GitHub bowseruk/alarm-imager repo.

If you make an image, you can then write it with your favourite image writing solution. Using WSL2 it is possible to build an image from Windows and image it using Rufus or Balena, etc.

Getting Started

The following guide is how to use the docker image. For using the script or modifying the image, please refer to the GitHub repo.

First pull the image from Docker Hub:

docker pull bowseruk/alarm-imager

Then run the docker run command

docker run -e BOARD=board -e ARCH=architecture -e IMAGE_SIZE=desired_size  -v "/your/directory":/data/alarm-imager --privileged bowseruk/alarm-imager:latest

In this command the environment variables can be set:

VariableDescription
BOARDThis sets the '-b' flag and chooses the board to build for. The current list of options for this are:
* All Boards = All - Create all possible images with all Arch combinations.
* Banana pi = BANANA_PI - arch = armv7 - arch flag will be ignored
* Banana pi pro = BANANA_PRO - arch = armv7 - arch flag will be ignored
* Raspberry pi 2 = RASPBERRY_PI_2 - arch = armv7 - arch flag will be ignored
* Raspberry pi 3 = RASPBERRY_PI_3 - arch = armv7 or arm64
* Raspberry pi 4 = RASPBERRY_PI_4 - arch = armv7 or arm64
* Rock 64 = ROCK64 - arch = arm64 - arch flag will be ignored
The Raspberry Pi 4 board is the default board the script will make an image for.
ARCHThis sets the -a flag which chooses the architecture to build for when there is a choice. This will default to ARM64 when there is a choice between ARM (armv7) and ARM64. An invalid choice will revert to the default.
IMAGE_SIZEThis sets te '-s' flag which is used to make a custom sized image. The units are MB and the default is 8000. 8000 MB is the minimum size recommended for ALARM images, so the smallest that can be selected.

The /data/alarm-image directory is the working directory, and is where the image will be saved.

A sensible docker run command for Rock 64 Board might look like:

docker run -e BOARD=ROCK64 -v "/home/user/alarm-imager":/data/alarm-imager --privileged bowseruk/alarm-imager:latest

And for an armv7 build on a raspberry pi 3 would look like:

docker run -e BOARD=RASPBERRY_PI_3 -e ARCH=ARM -v "/home/user/alarm-imager":/data/alarm-imager --privileged bowseruk/alarm-imager:latest

The image will be saved in the Images directory of the working directory in the format ALARM-BOARD-ARCH e.g. ALARM-RASPBERRY_PI_3-ARM.img. Most of the files used will be saved in the working directory to save time if a new image is made. You can delete these if this is not wanted.

To Do

To see planned features, please look at the GitHub repo

Contribution

Feel free to contribute through the GitHub repo. I do this as a hobby, so progress speed may vary.

Tag summary

Content type

Image

Digest

Size

681.6 MB

Last updated

over 4 years ago

docker pull bowseruk/alarm-imager:d9966dbb