ARCH R

Updating ArchR

How to upgrade to a new release without losing your saves and configs

There are two ways to update. archr-update updates the installed system in place with pacman. Re-flashing writes a whole new image and is the safer option when a release changes the bootloader or the partition layout.

Either way your /storage partition survives: saves, ROMs and configs are not touched by a re-flash, only BOOT and ROOT are overwritten.


In-place update

archr-update is a wrapper around pacman. It points /etc/pacman.d/mirrorlist at the ArchR package repository published on GitHub Releases and then runs the usual sync and upgrade:

archr-update check    # sync metadata and list what is pending
archr-update update   # pacman -Syu
archr-update info     # current version, channel and mirror

The channel comes from updates.branch in /storage/.config/system/configs/system.cfg and can be stable, next or dev. Anything else falls back to stable. Each channel maps to a release tag on github.com/archr-linux/archr-repo: repo-stable, repo-next, repo-dev.

The first run on a fresh install downloads a seed of the local package database. A freshly flashed image carries no pacman database, so without the seed pacman has nothing to compare against and every check would report that there is nothing to do.

An update needs a working network connection; archr-update checks that first and stops with a message if there is none.


Re-flash flow

Back up the things you can't easily re-create

/storage survives the re-flash, but a copy costs nothing. Over SSH:

# from your PC
scp -r root@archr.local:/storage/roms/savestates  ~/r36s-backup/savestates/
scp -r root@archr.local:/storage/.config     ~/r36s-backup/config/
scp -r root@archr.local:/storage/roms/screenshots ~/r36s-backup/screenshots/

ROMs are large; you don't need to back those up unless you've curated metadata in gamelist.xml per system.

Power off cleanly

ES → power button (long press) → Power Off. Ensures any pending writes hit the SD.

Flash the new image

Using the ArchR Flasher, pick the new image and the same panel/board you used before. The Flasher wipes the partition table and writes from scratch, wiping is what gives you a clean install.

Alternatively: dd if=ArchR-R36S.aarch64-DATE-*.img of=/dev/sdX bs=4M conv=fsync status=progress.

First boot

The first boot of the new image resizes the storage partition to use the full card again, then reboots. The second boot sees that /storage/.config already has your data and skips re-creating it, so ROMs, saves and custom themes stay as they were.

Verify

ES boots. Your ROM library is there. Your save-states load. Your custom configs are intact.

If something looks off, restore selectively from the backup you took in step 1.


What gets reset by a re-flash

PathSurvives re-flash?
/ (ROOT, ext4)Replaced
/flash (BOOT, FAT32)Replaced
/storage/roms/Survives
/storage/roms/savestates/Survives
/storage/roms/screenshots/Survives
/storage/.config/Survives
/storage/.cache/services/*.confSurvives, your enabled services persist
Theme overrides in /storage/.emulationstation/themes/Survives

Everything you put on the card as a user survives. Everything that comes from the image gets replaced.

The only edge case: if you customized something in /etc/ or /usr/ directly (over SSH, as root), that's gone, those live on ROOT. Persistent customizations belong in /storage/.config/ or /etc/profile.d/ (which 045-userconfig regenerates from /storage/.config/profile.d/ if present).


Going back

Same flow in reverse: re-flash an older image. /storage data created on a newer ArchR may have config schema deltas the older one doesn't recognise, usually it falls through to defaults gracefully, but in extreme cases (renamed settings) you may need to re-toggle a few options.


Manual update (without the Flasher)

If you only have an older .img.gz:

# decompress
gunzip ArchR-R36S.aarch64-*.img.gz

# write
sudo dd if=ArchR-R36S.aarch64-*.img of=/dev/sdX bs=4M conv=fsync status=progress

# (optional) verify checksum
sha256sum -c ArchR-R36S.aarch64-*.img.gz.sha256

The Flasher additionally wipes the FAT BOOT signatures (1 MB at start + 1 MB at end of the disk) before dd, which prevents stale partition tables from confusing U-Boot. Manual dd doesn't do this, if you see a black screen after re-flashing manually, run:

sudo dd if=/dev/zero of=/dev/sdX bs=1M count=1
sudo dd if=/dev/zero of=/dev/sdX bs=1M count=1 \
        seek=$(( $(blockdev --getsize64 /dev/sdX) / 1024 / 1024 - 1 ))

Then re-dd the image.


Which one to use

Use archr-update for the ordinary case: new emulator versions, fixes, new packages.

Re-flash when the release notes say the bootloader, the kernel or the partition layout changed, since those live outside what pacman replaces. Re-flashing also gives you a clean ROOT partition if you have been editing system files by hand.

On this page