Skip to content

Commit b58f083

Browse files
committed
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 <[email protected]>
1 parent cfd5a90 commit b58f083

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,6 @@ if [ "$(awk '$2 == "/" {print $3}' /proc/mounts)" == "tmpfs" ]; then
9090
done
9191
# Make sure to re-mount any mount points under /tmp
9292
mount -a
93+
# Reinstall packages from /mnt/data/apk/cache into the RAM disk
94+
apk fix --no-network
9395
fi

0 commit comments

Comments
 (0)