geo_c wrote: Thu Nov 03, 2022 7:28 pm
One question. Once the remaster is made, should the /work directory should be deleted? And I suppose it would be easy enough to leave the 13 levels of upper_changes in the /home directory as a backup by prepending them with a non numerical character to keep them from being loaded.
Oh also, the remastered sfs should replace the 00KLV-airedale_rootfs.sfs, and not the others? Or should it also replace 00modules and 01firmware and 10gtkdialog?
You shouldn't delete the work directory while a booted run session is in progress of course. If thereafter you are booted into a different distro you could delete that KLV work directory if you wished, prior to rebooting into KLV, and work/ directory would be auto-regenerated on boot, but I don't think you need to delete it at all.
Since the remaster contains whole of previously running system, you are correct, you would need to disable the previous upper_changes (including the non-numbered previous top read-write upper_changes folder) via that renaming method you describe (for example, just put a D in front of all such file names) which allows them to be kept as a backup (for use with pristrine original 07KLV-airedale_rootfs.sfs - in your post you accidentally I think used the wrong number, 00, for the KLV sfs. We normally reserve 00 for modules).
An alternative to an all-system remaster such as the one described would be a 'merging' of the upper_changes sequence of files only - I think rockedge mentioned an alpha version of a 'merge utility' also being in existence, which may or may not need some work on it to ensure it works correctly; I believe that alternative "merge utility" probably creates a new overlay only consisting of all the upper_changes components and the merged result is then resquashed by the utility - that should certainly work.
Probably the most common firstrib-based system wouldn't have separate 00modules and 01firmware layers since modules and firmware would be built-in to the underlying root filesystem by default anyway. However, if a huge kernel is being used (such as one from Puppy Linux that has all media access drivers built directly into the kernel) then there is an advantage to having modules and firmware provided as addons (00<modules_name> and 01<firmware_name>) since makes it very easy to swap kernel/modules/firmware then. I'm surprised the system is at all significantly faster or smoother when everything merged together though - I suppose there will be some speed overhead having to keep track of layers though so that must be why (also a little bit more RAM uses for each mounted layer I imagine).
What I know does make a significant difference to smoothness/speed of running system is the level of compression used in the sfs files - lz4 having been tested as pretty fast, but uncompressed layers being fastest since no decompression by CPU required. Bearing that situation in mind, I suppose one main sfs only would therefore be a bit faster/smoother anyway (and could be improved further by using low compression on the result or unsquashed version). Boot time is a different matter since depends also if copying addon layer files to RAM (personally I don't do that and not the default), which takes long..... time if uncompressed or low compression being used.
I can't say I know anything about the technical underlying system-level operation of overlayfs though - so your guess would be as good as mine in terms of performance when multiple layers are involved and so on.