Subject: mount btrfs subvolume as apk cache in data mode

From: Jacob Sinclair <[email-masked]>
Date: Mon, 5 May 2025 23:09:55 +0100

I've installed Alpine on my Raspberry Pi 4, and I have it's microSD card
partitioned into 2 parts -- the firmware/boot partition and a data
partition. The system is installed in data mode.

On the data partition, I have a subvolume @cache that I would like to
use as my apk cache. Mounting it in my fstab is too late in the boot
process for it to pull packages from, and thus it can't populate my
system from my /etc/apk/world.

Where would I go to ensure that @cache is mounted early enough to be
used by apk? My current theories are that I need to either:
   a. Create an mdev rule that runs a script to mount it
   b. Provide a custom /init script in my initramfs

I apologise if this is a little outside the scope of this list, I'm a
little out of my depth here.