From b58f083b760190604e5ae8c4089eb5f2ca3d9a0b Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Mon, 15 Jan 2024 17:24:03 -0800 Subject: [PATCH] Reinstall apk packages on reboot Because we are running from a RAM disk, any packages not installed from the ISO are removed after a reboot. They are still registered in /etc/apk/world (which is on /mnt/data/etc/apk/world), and the packages themselves are cached on /mnt/data/apk/cache, so reinstalling is quick and easy. Signed-off-by: Jan Dubois --- pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh index 6e2c55553a3..61a852310c3 100644 --- a/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh +++ b/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh @@ -90,4 +90,6 @@ if [ "$(awk '$2 == "/" {print $3}' /proc/mounts)" == "tmpfs" ]; then done # Make sure to re-mount any mount points under /tmp mount -a + # Reinstall packages from /mnt/data/apk/cache into the RAM disk + apk fix --no-network fi