Skip to main content

Provision a FriendlyElec NanoPi R6S

This procedure replaces the factory operating system on a FriendlyElec NanoPi R6S (RK3588S) with FriendlyElec's Ubuntu 24.04 Noble image and prepares it to run Kerrigan's arm64 containers.

danger

Installing an EFlasher image erases the R6S eMMC. Back up anything needed from the factory installation before powering on with the EFlasher card.

Requirements​

  • NanoPi R6S with its USB-C power supply
  • Class 10 or faster microSD card, 8 GB minimum
  • SD-card reader
  • Ethernet connection with DHCP
  • Computer from which to download and write the image

FriendlyElec documents the image types and board-specific flashing process in the NanoPi R6S wiki. Use only an image from the official NanoPi R6S download area.

Download the Ubuntu 24.04 EFlasher image​

  1. Open the official download area.

  2. Enter 01_Official images, then 02_SD-to-eMMC images.

  3. Download the newest Ubuntu Noble EFlasher image. Its filename follows one of these patterns:

    rk3588-eflasher-ubuntu-noble-gnome-minimal-6.1-arm64-YYYYMMDD.img.gz
    rk3588-eflasher-ubuntu-noble-gnome-desktop-6.1-arm64-YYYYMMDD.img.gz

    The minimal image is sufficient for a headless Kerrigan host.

  4. If the download directory provides a checksum file, verify the image before writing it. Keep the filename and checksum with the board's provisioning record.

Do not select an sd image for this procedure. An sd image runs Ubuntu from the card; an eflasher image boots from the card and installs Ubuntu onto eMMC.

Write the EFlasher card on macOS​

Kerrigan includes a guarded macOS writer. First identify the microSD card:

diskutil list external physical

Insert the card after opening Terminal if that makes the newly appearing disk easier to identify. Then run the writer with the downloaded image and the whole disk identifier:

scripts/write_nanopi_r6s_sd_macos.sh \
~/Downloads/rk3588-eflasher-ubuntu-noble-gnome-minimal-6.1-arm64-YYYYMMDD.img.gz \
/dev/disk4

The tool refuses partitions and disks macOS reports as internal. It displays the media name and capacity, requires the complete /dev/diskN value as confirmation, unmounts the card, writes through the faster /dev/rdiskN device, and ejects it when complete. Press Control-T while dd is running to display progress.

danger

Check the media name and capacity before confirming. The selected disk is completely overwritten, and this cannot be undone.

Graphical macOS alternative​

The simplest cross-platform method is balenaEtcher, which can write the compressed .img.gz file directly:

  1. Select the downloaded .img.gz.
  2. Select the microSD card.
  3. Check the target capacity and device name carefully.
  4. Flash and allow Etcher to validate the card.
  5. Eject the card safely.

Write the EFlasher card on Linux​

The equivalent Linux command-line process is:

lsblk -o NAME,SIZE,MODEL,TRAN,MOUNTPOINTS
gzip -dc rk3588-eflasher-ubuntu-noble-gnome-minimal-6.1-arm64-YYYYMMDD.img.gz \
| sudo dd of=/dev/sdX bs=4M status=progress conv=fsync
sync

/dev/sdX must be the whole microSD device, not a partition. Choosing the wrong device destroys its contents.

Replace the factory image​

  1. Power off the R6S.

  2. Insert the EFlasher microSD card.

  3. Connect Ethernet and optionally an HDMI display.

  4. Apply power. The EFlasher image begins installing to eMMC automatically.

  5. Observe the LEDs:

    StateRed SYSGreen LANGreen WAN
    BootingSlow flashOffOff
    Flashing eMMCFast flashOffOff
    CompleteSlow flashSolidSolid
  6. Only after the complete state, remove the microSD card. The board reboots from eMMC into Ubuntu.

  7. Allow several minutes for the first boot, then find the DHCP lease and SSH to the board. For the lab board described here:

    ssh pi@10.0.0.81

Change the default password immediately if the image prompts for or ships with one.

Initialize Ubuntu for Kerrigan​

Copy the initialization tool from this repository to the R6S:

scp scripts/setup_nanopi_r6s.sh pi@10.0.0.81:setup-r6s.sh
ssh pi@10.0.0.81
chmod +x setup-r6s.sh
./setup-r6s.sh

The tool:

  • verifies the board, arm64 architecture, and Ubuntu Noble
  • backs up /etc/apt/sources.list as /etc/apt/sources.list.friendlyelec-backup-YYYYMMDD
  • disables source files that use the unreachable USTC mirror or enable noble-proposed
  • configures ports.ubuntu.com/ubuntu-ports
  • installs basic development tools
  • installs Docker Engine, Compose, and Buildx from Docker's official arm64 repository
  • adds the login user to the docker group and enables Docker at boot
  • selects Docker's vfs driver because the FriendlyElec root filesystem uses OverlayFS and cannot reliably host nested OverlayFS
  • validates the installation with the arm64 hello-world container

The tool deliberately does not run apt upgrade or dist-upgrade. FriendlyElec images contain customized Rockchip packages; review a full-system upgrade separately before applying it.

Log out and reconnect after the tool completes so the new Docker group membership takes effect:

exit
ssh pi@10.0.0.81
docker info --format 'architecture={{.Architecture}} driver={{.Driver}}'
docker compose version
docker buildx version
docker run --rm --platform linux/arm64 hello-world

The expected Docker storage driver is vfs and the architecture is aarch64 or arm64, depending on the command reporting it.

Install Kerrigan​

Install the arm64 Ubuntu-host package from the desired branch:

sima-cli neat install kerrigan/arm64@develop:latest

Replace develop with the release or feature branch being validated.