mistfire wrote: Tue Sep 06, 2022 4:34 am
wiak wrote: Tue Sep 06, 2022 2:45 am
The way I do it successfully in WDL is that I mount the savefile to a different mount point than what I use when save folder, then I mount bind it across to where savefolder mount would have been
May I see that code in order to have an idea on what you talked about?
At first I couldn't get savefile to work, but then this simple arrangement worked without issue. This is new, so I may find a better way to do it later, but what works works:
Code: Select all
mount "${ucimg}" ${layers_base}/uc_rw && mkdir -p ${layers_base}/uc_rw/upper_changes ${layers_base}/uc_rw/work
mount --bind ${layers_base}/uc_rw/upper_changes ${layers_base}/uc_ro
In WDL layers_base is /mnt/layers/.
KLV-Airedales save2flash -> snapmergepuppy variant by fredx181, with savefolders rsync back to uc_ro
so above makes that same script (without change) now also rsync back to uc_rw (the rw mounted Linux-formatted savefile) via uc_ro
Possibly I could do things via symlinks instead (uc_ro being made symlink to uc_rw here), but above worked quickly, and without as I say needing any changes to existing KLV-Airedale save2flash -> snapmergepuppy routines of fredx181 (and I was already taking too long coding all the combinations after many failures - I'll try Linux filesystem symlink later...).
EDIT: yes, as far as WDL initrd itself is concerned symlind instead of bind mount certainly fine, but I remember now - Fredx181's simple wee rsync script detects RAM2 mode (like Pupmode 13 basically) via noticing uc_ro is mounted, hence I used a bind mount for savefile case so no change needed to the save2flash script - could be changed of course, but I'll just leave it as it is since just for savefile and working okay.
I have never myself been interested in using savefiles before (and still much prefer save folders), until recently when wanted to install various KLV and WDL-initrd-booted distros to ntfs partition, so KLV-Airedale did not include savefile support until I implemented it recently, but savefile support all working fine now no matter the weedog RAM modes selected (like Pupmodes in a way and DebianDog porteus boot changes= modes, but done per my own recipes/experiments).
Above code is used in WDL RAM2 mode which mounts existing savefile on top ro overlayfs layer and session changes (top overlayfs rw layer) into RAM/upper_changes, which as I say ends up getting rsync'd back to the rw mounted savefile when save2flash done.